Core/Items: Implemented corruption and corruption resistance stats

Port From (https://github.com/TrinityCore/TrinityCore/commit/6533de31005fc9680d9f2b61a4d8ea4958fc8edc)
This commit is contained in:
hondacrx
2020-06-18 15:39:41 -04:00
parent d686aef6d3
commit 15192d6a38
12 changed files with 84 additions and 34 deletions
+2
View File
@@ -91,6 +91,7 @@ namespace Game.DataStorage
ContentTuningStorage = DBReader.Read<ContentTuningRecord>("ContentTuning.db2", HotfixStatements.SEL_CONTENT_TUNING);
ContentTuningXExpectedStorage = DBReader.Read<ContentTuningXExpectedRecord>("ContentTuningXExpected.db2", HotfixStatements.SEL_CONTENT_TUNING_X_EXPECTED);
ConversationLineStorage = DBReader.Read<ConversationLineRecord>("ConversationLine.db2", HotfixStatements.SEL_CONVERSATION_LINE);
CorruptionEffectsStorage = DBReader.Read<CorruptionEffectsRecord>("CorruptionEffects.db2", HotfixStatements.SEL_CORRUPTION_EFFECTS);
CreatureDisplayInfoStorage = DBReader.Read<CreatureDisplayInfoRecord>("CreatureDisplayInfo.db2", HotfixStatements.SEL_CREATURE_DISPLAY_INFO);
CreatureDisplayInfoExtraStorage = DBReader.Read<CreatureDisplayInfoExtraRecord>("CreatureDisplayInfoExtra.db2", HotfixStatements.SEL_CREATURE_DISPLAY_INFO_EXTRA);
CreatureFamilyStorage = DBReader.Read<CreatureFamilyRecord>("CreatureFamily.db2", HotfixStatements.SEL_CREATURE_FAMILY, HotfixStatements.SEL_CREATURE_FAMILY_LOCALE);
@@ -432,6 +433,7 @@ namespace Game.DataStorage
public static DB6Storage<ContentTuningRecord> ContentTuningStorage;
public static DB6Storage<ContentTuningXExpectedRecord> ContentTuningXExpectedStorage;
public static DB6Storage<ConversationLineRecord> ConversationLineStorage;
public static DB6Storage<CorruptionEffectsRecord> CorruptionEffectsStorage;
public static DB6Storage<CreatureDisplayInfoRecord> CreatureDisplayInfoStorage;
public static DB6Storage<CreatureDisplayInfoExtraRecord> CreatureDisplayInfoExtraStorage;
public static DB6Storage<CreatureFamilyRecord> CreatureFamilyStorage;
+2 -3
View File
@@ -663,7 +663,6 @@ namespace Game.DataStorage
hotfixRecord.RecordID = recordId;
hotfixRecord.HotfixID = id;
_hotfixData.Add(hotfixRecord);
++_hotfixCount;
deletedRecords[Tuple.Create(tableHash, recordId)] = deleted;
++count;
@@ -711,7 +710,8 @@ namespace Game.DataStorage
Log.outInfo(LogFilter.ServerLoading, $"Loaded {_hotfixBlob.Count} hotfix blob records in {Time.GetMSTimeDiffToNow(oldMSTime)} ms");
}
public uint GetHotfixCount() { return _hotfixCount; }
public uint GetHotfixCount() { return (uint)_hotfixData.Count; }
public List<HotfixRecord> GetHotfixData() { return _hotfixData; }
public byte[] GetHotfixBlobData(uint tableHash, int recordId)
@@ -2054,7 +2054,6 @@ namespace Game.DataStorage
}
Dictionary<uint, IDB2Storage> _storage = new Dictionary<uint, IDB2Storage>();
uint _hotfixCount = 0;
List<HotfixRecord> _hotfixData = new List<HotfixRecord>();
Dictionary<Tuple<uint, int>, byte[]> _hotfixBlob = new Dictionary<Tuple<uint, int>, byte[]>();
@@ -240,6 +240,15 @@ namespace Game.DataStorage
public byte EndAnimation;
}
public sealed class CorruptionEffectsRecord
{
public uint Id;
public float MinCorruption;
public uint Aura;
public int PlayerConditionID;
public int Flags;
}
public sealed class CreatureDisplayInfoRecord
{
public uint Id;
@@ -62,8 +62,8 @@ namespace Game.DataStorage
public float CritMelee;
public float CritRanged;
public float CritSpell;
public float MultiStrike;
public float Readiness;
public float Corruption;
public float CorruptionResistance;
public float Speed;
public float ResilienceCritTaken;
public float ResiliencePlayerDamage;