Core/Battlegrounds: Use fields from DB2/battleground_template data in the Battleground Class
Port From (https://github.com/TrinityCore/TrinityCore/commit/d7623adf0e6b8c5cdc1e468b89172ed7db63fe92)
This commit is contained in:
@@ -104,6 +104,20 @@ namespace Game.DataStorage
|
||||
foreach (AzeriteUnlockMappingRecord azeriteUnlockMapping in CliDB.AzeriteUnlockMappingStorage.Values)
|
||||
azeriteUnlockMappings.Add(azeriteUnlockMapping.AzeriteUnlockMappingSetID, azeriteUnlockMapping);
|
||||
|
||||
foreach (BattlemasterListRecord battlemaster in CliDB.BattlemasterListStorage.Values)
|
||||
{
|
||||
if (battlemaster.MaxLevel < battlemaster.MinLevel)
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, $"Battlemaster ({battlemaster.Id}) contains bad values for MinLevel ({battlemaster.MinLevel}) and MaxLevel ({battlemaster.MaxLevel}). Swapping values.");
|
||||
MathFunctions.Swap(ref battlemaster.MaxLevel, ref battlemaster.MinLevel);
|
||||
}
|
||||
if (battlemaster.MaxPlayers < battlemaster.MinPlayers)
|
||||
{
|
||||
Log.outError(LogFilter.ServerLoading, $"Battlemaster ({battlemaster.Id}) contains bad values for MinPlayers ({battlemaster.MinPlayers}) and MaxPlayers ({battlemaster.MaxPlayers}). Swapping values.");
|
||||
MathFunctions.Swap(ref battlemaster.MaxPlayers, ref battlemaster.MinPlayers);
|
||||
}
|
||||
}
|
||||
|
||||
foreach (CharacterFacialHairStylesRecord characterFacialStyle in CliDB.CharacterFacialHairStylesStorage.Values)
|
||||
_characterFacialHairStyles.Add(Tuple.Create(characterFacialStyle.RaceID, characterFacialStyle.SexID, (uint)characterFacialStyle.VariationID));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user