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));
|
||||
|
||||
|
||||
@@ -90,18 +90,18 @@ namespace Game.DataStorage
|
||||
public string ShortDescription;
|
||||
public string LongDescription;
|
||||
public sbyte InstanceType;
|
||||
public sbyte MinLevel;
|
||||
public sbyte MaxLevel;
|
||||
public byte MinLevel;
|
||||
public byte MaxLevel;
|
||||
public sbyte RatedPlayers;
|
||||
public sbyte MinPlayers;
|
||||
public sbyte MaxPlayers;
|
||||
public byte MinPlayers;
|
||||
public byte MaxPlayers;
|
||||
public sbyte GroupsAllowed;
|
||||
public sbyte MaxGroupSize;
|
||||
public ushort HolidayWorldState;
|
||||
public BattlemasterListFlags Flags;
|
||||
public int IconFileDataID;
|
||||
public short RequiredPlayerConditionID;
|
||||
public short[] MapId = new short[16];
|
||||
public ushort[] MapId = new ushort[16];
|
||||
}
|
||||
|
||||
public sealed class BroadcastTextRecord
|
||||
|
||||
Reference in New Issue
Block a user