Core: Updated to 10.2.5
Port From (https://github.com/TrinityCore/TrinityCore/commit/a4a4d010a0e329d4dbd82c0be5feab1fc06c8834)
This commit is contained in:
@@ -437,13 +437,13 @@ namespace Game.DataStorage
|
||||
}
|
||||
|
||||
// Check loaded DB2 files proper version
|
||||
if (!AreaTableStorage.ContainsKey(14720) || // last area added in 10.0.7 (48520)
|
||||
!CharTitlesStorage.ContainsKey(762) || // last char title added in 10.0.7 (48520)
|
||||
!GemPropertiesStorage.ContainsKey(4059) || // last gem property added in 10.0.7 (48520)
|
||||
!ItemStorage.ContainsKey(205244) || // last item added in 10.0.7 (48520)
|
||||
!ItemExtendedCostStorage.ContainsKey(8043) || // last item extended cost added in 10.0.7 (48520)
|
||||
!MapStorage.ContainsKey(2616) || // last map added in 10.0.7 (48520)
|
||||
!SpellNameStorage.ContainsKey(409033)) // last spell added in 10.0.7 (48520)
|
||||
if (!AreaTableStorage.ContainsKey(15151) || // last area added in 10.2.5 (53007)
|
||||
!CharTitlesStorage.ContainsKey(805) || // last char title added in 10.2.5 (53007)
|
||||
!GemPropertiesStorage.ContainsKey(4081) || // last gem property added in 10.2.5 (53007)
|
||||
!ItemStorage.ContainsKey(215160) || // last item added in 10.2.5 (53007)
|
||||
!ItemExtendedCostStorage.ContainsKey(8510) || // last item extended cost added in 10.2.5 (53007)
|
||||
!MapStorage.ContainsKey(2708) || // last map added in 10.2.5 (53007)
|
||||
!SpellNameStorage.ContainsKey(438878)) // last spell added in 10.2.5 (53007)
|
||||
{
|
||||
Log.outFatal(LogFilter.ServerLoading, "You have _outdated_ DB2 files. Please extract correct versions from current using client.");
|
||||
Environment.Exit(1);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
class DBReader
|
||||
{
|
||||
private const uint WDC3FmtSig = 0x34434457; // WDC3
|
||||
private const uint WDC5FmtSig = 0x35434457; // WDC5
|
||||
|
||||
public WDCHeader Header;
|
||||
public FieldMetaData[] FieldMeta;
|
||||
@@ -36,9 +36,14 @@ namespace Game.DataStorage
|
||||
{
|
||||
Header = new WDCHeader();
|
||||
Header.Signature = reader.ReadUInt32();
|
||||
if (Header.Signature != WDC3FmtSig)
|
||||
if (Header.Signature != WDC5FmtSig)
|
||||
return false;
|
||||
|
||||
Header.Version = reader.ReadUInt32();
|
||||
if (Header.Version != 5)
|
||||
return false;
|
||||
|
||||
Header.Schema = reader.ReadStringFromChars(128);
|
||||
Header.RecordCount = reader.ReadUInt32();
|
||||
Header.FieldCount = reader.ReadUInt32();
|
||||
Header.RecordSize = reader.ReadUInt32();
|
||||
@@ -583,6 +588,8 @@ namespace Game.DataStorage
|
||||
}
|
||||
|
||||
public uint Signature;
|
||||
public uint Version;
|
||||
public string Schema;
|
||||
public uint RecordCount;
|
||||
public uint FieldCount;
|
||||
public uint RecordSize;
|
||||
|
||||
@@ -42,6 +42,9 @@ namespace Game.DataStorage
|
||||
foreach (var areaGroupMember in AreaGroupMemberStorage.Values)
|
||||
_areaGroupMembers.Add(areaGroupMember.AreaGroupID, areaGroupMember.AreaID);
|
||||
|
||||
foreach (AreaTableRecord areaTable in AreaTableStorage.Values)
|
||||
Cypher.Assert(areaTable.AreaBit <= 0 || (areaTable.AreaBit / 64) < PlayerConst.ExploredZonesSize, $"PLAYER_EXPLORED_ZONES_SIZE must be at least {((areaTable.AreaBit + 63) / 64)}");
|
||||
|
||||
foreach (ArtifactPowerRecord artifactPower in ArtifactPowerStorage.Values)
|
||||
_artifactPowers.Add(artifactPower.ArtifactID, artifactPower);
|
||||
|
||||
@@ -227,6 +230,9 @@ namespace Game.DataStorage
|
||||
_chrSpecializationsByIndex[storageIndex][chrSpec.OrderIndex] = chrSpec;
|
||||
}
|
||||
|
||||
foreach (ConditionalChrModelRecord conditionalChrModel in ConditionalChrModelStorage.Values)
|
||||
_conditionalChrModelsByChrModelId[conditionalChrModel.ChrModelID] = conditionalChrModel;
|
||||
|
||||
foreach (ConditionalContentTuningRecord conditionalContentTuning in ConditionalContentTuningStorage.Values)
|
||||
_conditionalContentTuning.Add(conditionalContentTuning.ParentContentTuningID, conditionalContentTuning);
|
||||
|
||||
@@ -1024,6 +1030,11 @@ namespace Game.DataStorage
|
||||
return _chrModelsByRaceAndGender.LookupByKey(Tuple.Create((byte)race, (byte)gender));
|
||||
}
|
||||
|
||||
public ConditionalChrModelRecord GetConditionalChrModel(int chrModelId)
|
||||
{
|
||||
return _conditionalChrModelsByChrModelId.LookupByKey(chrModelId);
|
||||
}
|
||||
|
||||
public string GetChrRaceName(Race race, Locale locale = Locale.enUS)
|
||||
{
|
||||
ChrRacesRecord raceEntry = ChrRacesStorage.LookupByKey(race);
|
||||
@@ -2267,6 +2278,7 @@ namespace Game.DataStorage
|
||||
MultiMap<Tuple<byte, byte>, ChrCustomizationOptionRecord> _chrCustomizationOptionsByRaceAndGender = new();
|
||||
Dictionary<uint, MultiMap<uint, uint>> _chrCustomizationRequiredChoices = new();
|
||||
ChrSpecializationRecord[][] _chrSpecializationsByIndex = new ChrSpecializationRecord[(int)Class.Max + 1][];
|
||||
Dictionary<int, ConditionalChrModelRecord> _conditionalChrModelsByChrModelId = new();
|
||||
MultiMap<uint, ConditionalContentTuningRecord> _conditionalContentTuning = new();
|
||||
List<(uint, int)> _contentTuningLabels = new();
|
||||
MultiMap<uint, CurrencyContainerRecord> _currencyContainers = new();
|
||||
|
||||
@@ -357,7 +357,7 @@ namespace Game.DataStorage
|
||||
public sealed class ConditionalChrModelRecord
|
||||
{
|
||||
public uint Id;
|
||||
public uint ChrModelID; // This is the PK
|
||||
public int ChrModelID;
|
||||
public int ChrCustomizationReqID;
|
||||
public int PlayerConditionID;
|
||||
public int Flags;
|
||||
|
||||
Reference in New Issue
Block a user