Core/DataStores: Updated db2 structures to 11.0.5

Port From (https://github.com/TrinityCore/TrinityCore/commit/b0352ef78ed93e18a869652e628345bc660f252b)
This commit is contained in:
Hondacrx
2024-11-11 11:12:45 -05:00
parent 3cca83e5bd
commit 25a716db9e
9 changed files with 72 additions and 34 deletions
+7 -7
View File
@@ -449,14 +449,14 @@ namespace Game.DataStorage
}
// Check loaded DB2 files proper version
if (!AreaTableStorage.ContainsKey(15786) || // last area added in 11.0.2 (56647)
!CharTitlesStorage.ContainsKey(854) || // last char title added in 11.0.2 (56647)
if (!AreaTableStorage.ContainsKey(15913) || // last area added in 11.0.5 (57171)
!CharTitlesStorage.ContainsKey(871) || // last char title added in 11.0.5 (57171)
!FlightCapabilityStorage.ContainsKey(1) || // default flight capability (required)
!GemPropertiesStorage.ContainsKey(4251) || // last gem property added in 11.0.2 (56647)
!ItemStorage.ContainsKey(232498) || // last item added in 11.0.2 (56647)
!ItemExtendedCostStorage.ContainsKey(9369) || // last item extended cost added in 11.0.2 (56647)
!MapStorage.ContainsKey(2786) || // last map added in 11.0.2 (56647)
!SpellNameStorage.ContainsKey(471174)) // last spell added in 11.0.2 (56647)
!GemPropertiesStorage.ContainsKey(4251) || // last gem property added in 11.0.5 (57171)
!ItemStorage.ContainsKey(233014) || // last item added in 11.0.5 (57171)
!ItemExtendedCostStorage.ContainsKey(9647) || // last item extended cost added in 11.0.5 (57171)
!MapStorage.ContainsKey(2792) || // last map added in 11.0.5 (57171)
!SpellNameStorage.ContainsKey(474722)) // last spell added in 11.0.5 (57171)
{
Log.outFatal(LogFilter.ServerLoading, "You have _outdated_ DB2 files. Please extract correct versions from current using client.");
Environment.Exit(1);
+1 -1
View File
@@ -122,8 +122,8 @@ namespace Game.DataStorage
public sealed class BroadcastTextDurationRecord
{
public uint Id;
public uint BroadcastTextID;
public int Locale;
public int Duration;
public uint BroadcastTextID;
}
}
@@ -196,8 +196,6 @@ namespace Game.DataStorage
public uint Id;
public ushort SecondaryID;
public int Flags;
public int ChrRacesID;
public int Sex;
public uint ChrModelID;
public int SortIndex;
public int ChrCustomizationCategoryID;
@@ -48,6 +48,7 @@ namespace Game.DataStorage
public uint GroupSizeHealthCurveID;
public uint GroupSizeDmgCurveID;
public uint GroupSizeSpellPointsCurveID;
public int Unknown1105;
public bool HasFlag(DifficultyFlags difficultyFlags) { return (Flags & (ushort)difficultyFlags) != 0; }
}
@@ -53,6 +53,7 @@ namespace Game.DataStorage
public ushort BonusReputationAmount;
public ushort MentorItemLevel;
public byte MentorCharLevel;
public byte MaxPremadeGroupSize;
public uint ContentTuningID;
public LfgFlags[] Flags = new LfgFlags[2];
+1 -1
View File
@@ -446,7 +446,7 @@ namespace Game.DataStorage
public sealed class SpellMiscRecord
{
public uint Id;
public int[] Attributes = new int[15];
public int[] Attributes = new int[16];
public byte DifficultyID;
public ushort CastingTimeIndex;
public ushort DurationIndex;
+19 -16
View File
@@ -56,6 +56,7 @@ namespace Game.Spells
AttributesEx12 = (SpellAttr12)_misc.Attributes[12];
AttributesEx13 = (SpellAttr13)_misc.Attributes[13];
AttributesEx14 = (SpellAttr14)_misc.Attributes[14];
AttributesEx15 = (SpellAttr15)_misc.Attributes[15];
CastTimeEntry = CliDB.SpellCastTimesStorage.LookupByKey(_misc.CastingTimeIndex);
DurationEntry = CliDB.SpellDurationStorage.LookupByKey(_misc.DurationIndex);
RangeEntry = CliDB.SpellRangeStorage.LookupByKey(_misc.RangeIndex);
@@ -3786,22 +3787,23 @@ namespace Game.Spells
return _visuals;
}
public bool HasAttribute(SpellAttr0 attribute) { return Convert.ToBoolean(Attributes & attribute); }
public bool HasAttribute(SpellAttr1 attribute) { return Convert.ToBoolean(AttributesEx & attribute); }
public bool HasAttribute(SpellAttr2 attribute) { return Convert.ToBoolean(AttributesEx2 & attribute); }
public bool HasAttribute(SpellAttr3 attribute) { return Convert.ToBoolean(AttributesEx3 & attribute); }
public bool HasAttribute(SpellAttr4 attribute) { return Convert.ToBoolean(AttributesEx4 & attribute); }
public bool HasAttribute(SpellAttr5 attribute) { return Convert.ToBoolean(AttributesEx5 & attribute); }
public bool HasAttribute(SpellAttr6 attribute) { return Convert.ToBoolean(AttributesEx6 & attribute); }
public bool HasAttribute(SpellAttr7 attribute) { return Convert.ToBoolean(AttributesEx7 & attribute); }
public bool HasAttribute(SpellAttr8 attribute) { return Convert.ToBoolean(AttributesEx8 & attribute); }
public bool HasAttribute(SpellAttr9 attribute) { return Convert.ToBoolean(AttributesEx9 & attribute); }
public bool HasAttribute(SpellAttr10 attribute) { return Convert.ToBoolean(AttributesEx10 & attribute); }
public bool HasAttribute(SpellAttr11 attribute) { return Convert.ToBoolean(AttributesEx11 & attribute); }
public bool HasAttribute(SpellAttr12 attribute) { return Convert.ToBoolean(AttributesEx12 & attribute); }
public bool HasAttribute(SpellAttr13 attribute) { return Convert.ToBoolean(AttributesEx13 & attribute); }
public bool HasAttribute(SpellAttr14 attribute) { return Convert.ToBoolean(AttributesEx14 & attribute); }
public bool HasAttribute(SpellCustomAttributes attribute) { return Convert.ToBoolean(AttributesCu & attribute); }
public bool HasAttribute(SpellAttr0 attribute) { return (Attributes & attribute) != 0; }
public bool HasAttribute(SpellAttr1 attribute) { return (AttributesEx & attribute) != 0; }
public bool HasAttribute(SpellAttr2 attribute) { return (AttributesEx2 & attribute) != 0; }
public bool HasAttribute(SpellAttr3 attribute) { return (AttributesEx3 & attribute) != 0; }
public bool HasAttribute(SpellAttr4 attribute) { return (AttributesEx4 & attribute) != 0; }
public bool HasAttribute(SpellAttr5 attribute) { return (AttributesEx5 & attribute) != 0; }
public bool HasAttribute(SpellAttr6 attribute) { return (AttributesEx6 & attribute) != 0; }
public bool HasAttribute(SpellAttr7 attribute) { return (AttributesEx7 & attribute) != 0; }
public bool HasAttribute(SpellAttr8 attribute) { return (AttributesEx8 & attribute) != 0; }
public bool HasAttribute(SpellAttr9 attribute) { return (AttributesEx9 & attribute) != 0; }
public bool HasAttribute(SpellAttr10 attribute) { return (AttributesEx10 & attribute) != 0; }
public bool HasAttribute(SpellAttr11 attribute) { return (AttributesEx11 & attribute) != 0; }
public bool HasAttribute(SpellAttr12 attribute) { return (AttributesEx12 & attribute) != 0; }
public bool HasAttribute(SpellAttr13 attribute) { return (AttributesEx13 & attribute) != 0; }
public bool HasAttribute(SpellAttr14 attribute) { return (AttributesEx14 & attribute) != 0; }
public bool HasAttribute(SpellAttr15 attribute) { return (AttributesEx15 & attribute) != 0; }
public bool HasAttribute(SpellCustomAttributes attribute) { return (AttributesCu & attribute) != 0; }
public bool CanBeInterrupted(WorldObject interruptCaster, Unit interruptTarget, bool ignoreImmunity = false)
{
@@ -3843,6 +3845,7 @@ namespace Game.Spells
public SpellAttr12 AttributesEx12 { get; set; }
public SpellAttr13 AttributesEx13 { get; set; }
public SpellAttr14 AttributesEx14 { get; set; }
public SpellAttr15 AttributesEx15 { get; set; }
public SpellCustomAttributes AttributesCu { get; set; }
public BitSet NegativeEffects { get; set; } = new BitSet(SpellConst.MaxEffects);
public ulong Stances { get; set; }