Core/Players: Use CharBaseInfo.db2 data to determine appropriate race for mercenary mode transforms
Port From (https://github.com/TrinityCore/TrinityCore/commit/c2ac37125b566cb4d9b659bc8ae2d381f60bc6db)
This commit is contained in:
@@ -113,6 +113,8 @@ namespace Game.DataStorage
|
||||
foreach (var broadcastTextDuration in BroadcastTextDurationStorage.Values)
|
||||
_broadcastTextDurations[(broadcastTextDuration.BroadcastTextID, (CascLocaleBit)broadcastTextDuration.Locale)] = broadcastTextDuration.Duration;
|
||||
|
||||
foreach (var (_, charBaseInfo) in CharBaseInfoStorage)
|
||||
_charBaseInfoByRaceAndClass[(charBaseInfo.RaceID, charBaseInfo.ClassID)] = charBaseInfo;
|
||||
|
||||
foreach (var uiDisplay in ChrClassUIDisplayStorage.Values)
|
||||
{
|
||||
@@ -989,6 +991,11 @@ namespace Game.DataStorage
|
||||
return _broadcastTextDurations.LookupByKey((broadcastTextId, SharedConst.WowLocaleToCascLocaleBit[(int)locale]));
|
||||
}
|
||||
|
||||
public CharBaseInfoRecord GetCharBaseInfo(Race race, Class class_)
|
||||
{
|
||||
return _charBaseInfoByRaceAndClass.LookupByKey((race, class_));
|
||||
}
|
||||
|
||||
public ChrClassUIDisplayRecord GetUiDisplayForClass(Class unitClass)
|
||||
{
|
||||
Cypher.Assert(unitClass < Class.Max);
|
||||
@@ -2272,6 +2279,7 @@ namespace Game.DataStorage
|
||||
MultiMap<uint, AzeritePowerSetMemberRecord> _azeritePowers = new();
|
||||
Dictionary<(uint azeriteUnlockSetId, ItemContext itemContext), byte[]> _azeriteTierUnlockLevels = new();
|
||||
Dictionary<(int broadcastTextId, CascLocaleBit cascLocaleBit), int> _broadcastTextDurations = new();
|
||||
Dictionary<(sbyte, sbyte), CharBaseInfoRecord> _charBaseInfoByRaceAndClass = new();
|
||||
ChrClassUIDisplayRecord[] _uiDisplayByClass = new ChrClassUIDisplayRecord[(int)Class.Max];
|
||||
uint[][] _powersByClass = new uint[(int)Class.Max][];
|
||||
MultiMap<uint, ChrCustomizationChoiceRecord> _chrCustomizationChoicesByOption = new();
|
||||
|
||||
Reference in New Issue
Block a user