Core/DataStores: 9.1.0 db2 structures
Port From (https://github.com/TrinityCore/TrinityCore/commit/ce1046a8fd0f04aad6c414786949269fffea88f3)
This commit is contained in:
@@ -205,6 +205,7 @@ namespace Game.DataStorage
|
||||
ItemSpecStorage = ReadDB2<ItemSpecRecord>("ItemSpec.db2", HotfixStatements.SEL_ITEM_SPEC);
|
||||
ItemSpecOverrideStorage = ReadDB2<ItemSpecOverrideRecord>("ItemSpecOverride.db2", HotfixStatements.SEL_ITEM_SPEC_OVERRIDE);
|
||||
ItemXBonusTreeStorage = ReadDB2<ItemXBonusTreeRecord>("ItemXBonusTree.db2", HotfixStatements.SEL_ITEM_X_BONUS_TREE);
|
||||
ItemXItemEffectStorage = ReadDB2<ItemXItemEffectRecord>("ItemXItemEffect.db2", HotfixStatements.SEL_ITEM_X_ITEM_EFFECT);
|
||||
//KeyChainStorage = ReadDB2<KeyChainRecord>("KeyChain.db2", HotfixStatements.SEL_KEYCHAIN);
|
||||
LanguageWordsStorage = ReadDB2<LanguageWordsRecord>("LanguageWords.db2", HotfixStatements.SEL_LANGUAGE_WORDS);
|
||||
LanguagesStorage = ReadDB2<LanguagesRecord>("Languages.db2", HotfixStatements.SEL_LANGUAGES, HotfixStatements.SEL_LANGUAGES_LOCALE);
|
||||
@@ -576,6 +577,7 @@ namespace Game.DataStorage
|
||||
public static DB6Storage<ItemSpecRecord> ItemSpecStorage;
|
||||
public static DB6Storage<ItemSpecOverrideRecord> ItemSpecOverrideStorage;
|
||||
public static DB6Storage<ItemXBonusTreeRecord> ItemXBonusTreeStorage;
|
||||
public static DB6Storage<ItemXItemEffectRecord> ItemXItemEffectStorage;
|
||||
//public static DB6Storage<KeyChainRecord> KeyChainStorage;
|
||||
public static DB6Storage<LanguageWordsRecord> LanguageWordsStorage;
|
||||
public static DB6Storage<LanguagesRecord> LanguagesStorage;
|
||||
|
||||
@@ -241,9 +241,8 @@ namespace Game.DataStorage
|
||||
|
||||
foreach (ContentTuningXExpectedRecord contentTuningXExpectedStat in ContentTuningXExpectedStorage.Values)
|
||||
{
|
||||
ExpectedStatModRecord expectedStatMod = ExpectedStatModStorage.LookupByKey(contentTuningXExpectedStat.ExpectedStatModID);
|
||||
if (expectedStatMod != null)
|
||||
_expectedStatModsByContentTuning.Add(contentTuningXExpectedStat.ContentTuningID, expectedStatMod);
|
||||
if (ExpectedStatModStorage.ContainsKey(contentTuningXExpectedStat.ExpectedStatModID))
|
||||
_expectedStatModsByContentTuning.Add(contentTuningXExpectedStat.ContentTuningID, contentTuningXExpectedStat);
|
||||
}
|
||||
|
||||
foreach (CurvePointRecord curvePoint in CurvePointStorage.Values)
|
||||
@@ -1214,6 +1213,49 @@ namespace Game.DataStorage
|
||||
return null;
|
||||
}
|
||||
|
||||
float ExpectedStatModReducer(float mod, ContentTuningXExpectedRecord contentTuningXExpected, ExpectedStatType stat)
|
||||
{
|
||||
if (contentTuningXExpected == null)
|
||||
return mod;
|
||||
|
||||
//if (contentTuningXExpected->MinMythicPlusSeasonID)
|
||||
// if (MythicPlusSeasonEntry const* mythicPlusSeason = sMythicPlusSeasonStore.LookupEntry(contentTuningXExpected->MinMythicPlusSeasonID))
|
||||
// if (MythicPlusSubSeason < mythicPlusSeason->SubSeason)
|
||||
// return mod;
|
||||
|
||||
//if (contentTuningXExpected->MaxMythicPlusSeasonID)
|
||||
// if (MythicPlusSeasonEntry const* mythicPlusSeason = sMythicPlusSeasonStore.LookupEntry(contentTuningXExpected->MaxMythicPlusSeasonID))
|
||||
// if (MythicPlusSubSeason >= mythicPlusSeason->SubSeason)
|
||||
// return mod;
|
||||
|
||||
var expectedStatMod = ExpectedStatModStorage.LookupByKey(contentTuningXExpected.ExpectedStatModID);
|
||||
switch (stat)
|
||||
{
|
||||
case ExpectedStatType.CreatureHealth:
|
||||
return mod * expectedStatMod.CreatureHealthMod;
|
||||
case ExpectedStatType.PlayerHealth:
|
||||
return mod * expectedStatMod.PlayerHealthMod;
|
||||
case ExpectedStatType.CreatureAutoAttackDps:
|
||||
return mod * expectedStatMod.CreatureAutoAttackDPSMod;
|
||||
case ExpectedStatType.CreatureArmor:
|
||||
return mod * expectedStatMod.CreatureArmorMod;
|
||||
case ExpectedStatType.PlayerMana:
|
||||
return mod * expectedStatMod.PlayerManaMod;
|
||||
case ExpectedStatType.PlayerPrimaryStat:
|
||||
return mod * expectedStatMod.PlayerPrimaryStatMod;
|
||||
case ExpectedStatType.PlayerSecondaryStat:
|
||||
return mod * expectedStatMod.PlayerSecondaryStatMod;
|
||||
case ExpectedStatType.ArmorConstant:
|
||||
return mod * expectedStatMod.ArmorConstantMod;
|
||||
case ExpectedStatType.CreatureSpellDamage:
|
||||
return mod * expectedStatMod.CreatureSpellDamageMod;
|
||||
}
|
||||
|
||||
return mod;
|
||||
|
||||
// int32 MythicPlusSubSeason = 0;
|
||||
}
|
||||
|
||||
public float EvaluateExpectedStat(ExpectedStatType stat, uint level, int expansion, uint contentTuningId, Class unitClass)
|
||||
{
|
||||
var expectedStatRecord = _expectedStatsByLevel.LookupByKey(Tuple.Create(level, expansion));
|
||||
@@ -1241,63 +1283,63 @@ namespace Game.DataStorage
|
||||
break;
|
||||
}
|
||||
|
||||
List<ExpectedStatModRecord> contentTuningMods = _expectedStatModsByContentTuning.LookupByKey(contentTuningId);
|
||||
List<ContentTuningXExpectedRecord> contentTuningMods = _expectedStatModsByContentTuning.LookupByKey(contentTuningId);
|
||||
float value = 0.0f;
|
||||
switch (stat)
|
||||
{
|
||||
case ExpectedStatType.CreatureHealth:
|
||||
value = expectedStatRecord.CreatureHealth;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.CreatureHealthMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.CreatureHealthMod;
|
||||
break;
|
||||
case ExpectedStatType.PlayerHealth:
|
||||
value = expectedStatRecord.PlayerHealth;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.PlayerHealthMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.PlayerHealthMod;
|
||||
break;
|
||||
case ExpectedStatType.CreatureAutoAttackDps:
|
||||
value = expectedStatRecord.CreatureAutoAttackDps;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.CreatureAutoAttackDPSMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.CreatureAutoAttackDPSMod;
|
||||
break;
|
||||
case ExpectedStatType.CreatureArmor:
|
||||
value = expectedStatRecord.CreatureArmor;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.CreatureArmorMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.CreatureArmorMod;
|
||||
break;
|
||||
case ExpectedStatType.PlayerMana:
|
||||
value = expectedStatRecord.PlayerMana;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.PlayerManaMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.PlayerManaMod;
|
||||
break;
|
||||
case ExpectedStatType.PlayerPrimaryStat:
|
||||
value = expectedStatRecord.PlayerPrimaryStat;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.PlayerPrimaryStatMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.PlayerPrimaryStatMod;
|
||||
break;
|
||||
case ExpectedStatType.PlayerSecondaryStat:
|
||||
value = expectedStatRecord.PlayerSecondaryStat;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.PlayerSecondaryStatMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.PlayerSecondaryStatMod;
|
||||
break;
|
||||
case ExpectedStatType.ArmorConstant:
|
||||
value = expectedStatRecord.ArmorConstant;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.ArmorConstantMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.ArmorConstantMod;
|
||||
break;
|
||||
@@ -1306,7 +1348,7 @@ namespace Game.DataStorage
|
||||
case ExpectedStatType.CreatureSpellDamage:
|
||||
value = expectedStatRecord.CreatureSpellDamage;
|
||||
if (!contentTuningMods.Empty())
|
||||
value *= contentTuningMods.Sum(expectedStatMod => expectedStatMod != null ? expectedStatMod.CreatureSpellDamageMod : 1.0f);
|
||||
value *= contentTuningMods.Sum(expectedStatMod => ExpectedStatModReducer(1.0f, expectedStatMod, stat));
|
||||
if (classMod != null)
|
||||
value *= classMod.CreatureSpellDamageMod;
|
||||
break;
|
||||
@@ -2275,7 +2317,7 @@ namespace Game.DataStorage
|
||||
MultiMap<uint, CurvePointRecord> _curvePoints = new();
|
||||
Dictionary<Tuple<uint, byte, byte, byte>, EmotesTextSoundRecord> _emoteTextSounds = new();
|
||||
Dictionary<Tuple<uint, int>, ExpectedStatRecord> _expectedStatsByLevel = new();
|
||||
MultiMap<uint, ExpectedStatModRecord> _expectedStatModsByContentTuning = new();
|
||||
MultiMap<uint, ContentTuningXExpectedRecord> _expectedStatModsByContentTuning = new();
|
||||
MultiMap<uint, uint> _factionTeams = new();
|
||||
MultiMap<uint, FriendshipRepReactionRecord> _friendshipRepReactions = new();
|
||||
Dictionary<uint, HeirloomRecord> _heirlooms = new();
|
||||
|
||||
@@ -329,9 +329,9 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class AzeriteEssenceRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public string Description;
|
||||
public uint Id;
|
||||
public int SpecSetID;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class BarberShopStyleRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string DisplayName;
|
||||
public string Description;
|
||||
public uint Id;
|
||||
public byte Type; // value 0 . hair, value 2 . facialhair
|
||||
public float CostModifier;
|
||||
public byte Race;
|
||||
@@ -48,7 +48,7 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public float StateMultiplier;
|
||||
public byte QualityEnum;
|
||||
public sbyte QualityEnum;
|
||||
}
|
||||
|
||||
public sealed class BattlePetBreedStateRecord
|
||||
@@ -67,7 +67,7 @@ namespace Game.DataStorage
|
||||
public uint CreatureID;
|
||||
public uint SummonSpellID;
|
||||
public int IconFileDataID;
|
||||
public byte PetTypeEnum;
|
||||
public sbyte PetTypeEnum;
|
||||
public ushort Flags;
|
||||
public sbyte SourceTypeEnum;
|
||||
public int CardUIModelSceneID;
|
||||
|
||||
@@ -41,10 +41,11 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class CharacterLoadoutRecord
|
||||
{
|
||||
public long RaceMask;
|
||||
public uint Id;
|
||||
public long RaceMask;
|
||||
public sbyte ChrClassID;
|
||||
public sbyte Purpose;
|
||||
public sbyte Unused910;
|
||||
|
||||
public bool IsForNewCharacter() { return Purpose == 9; }
|
||||
}
|
||||
@@ -58,9 +59,9 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class ChatChannelsRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public string Shortcut;
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
public string Shortcut;
|
||||
public ChannelDBCFlags Flags;
|
||||
public sbyte FactionGroup;
|
||||
public int Ruleset;
|
||||
@@ -131,10 +132,9 @@ namespace Game.DataStorage
|
||||
public uint ChrCustomizationOptionID;
|
||||
public uint ChrCustomizationReqID;
|
||||
public ushort SortOrder;
|
||||
public int SwatchColor1;
|
||||
public int SwatchColor2;
|
||||
public ushort UiOrderIndex;
|
||||
public int Flags;
|
||||
public int[] SwatchColor = new int[2];
|
||||
}
|
||||
|
||||
public sealed class ChrCustomizationDisplayInfoRecord
|
||||
@@ -212,6 +212,7 @@ namespace Game.DataStorage
|
||||
public float CustomizeFacing;
|
||||
public float CameraDistanceOffset;
|
||||
public float BarberShopCameraOffsetScale;
|
||||
public float BarberShopCameraHeightOffsetScale; // applied after BarberShopCameraOffsetScale
|
||||
public float BarberShopCameraRotationOffset;
|
||||
}
|
||||
|
||||
@@ -221,9 +222,10 @@ namespace Game.DataStorage
|
||||
public int ChrRacesID;
|
||||
public int ChrModelID;
|
||||
}
|
||||
|
||||
|
||||
public sealed class ChrRacesRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string ClientPrefix;
|
||||
public string ClientFileString;
|
||||
public LocalizedString Name;
|
||||
@@ -239,44 +241,45 @@ namespace Game.DataStorage
|
||||
public string NameFemaleL;
|
||||
public string NameLowercaseL;
|
||||
public string NameFemaleLowercaseL;
|
||||
public uint Id;
|
||||
public int Flags;
|
||||
public int BaseLanguage;
|
||||
public int FactionID;
|
||||
public uint CinematicSequenceID;
|
||||
public int ResSicknessSpellID;
|
||||
public int SplashSoundID;
|
||||
public int Alliance;
|
||||
public int RaceRelated;
|
||||
public int UnalteredVisualRaceID;
|
||||
public int DefaultClassID;
|
||||
public int CreateScreenFileDataID;
|
||||
public int SelectScreenFileDataID;
|
||||
public int NeutralRaceID;
|
||||
public int LowResScreenFileDataID;
|
||||
public uint[] AlteredFormStartVisualKitID = new uint[3];
|
||||
public uint[] AlteredFormFinishVisualKitID = new uint[3];
|
||||
public int[] AlteredFormStartVisualKitID = new int[3];
|
||||
public int[] AlteredFormFinishVisualKitID = new int[3];
|
||||
public int HeritageArmorAchievementID;
|
||||
public int StartingLevel;
|
||||
public int UiDisplayOrder;
|
||||
public int MaleModelFallbackRaceID;
|
||||
public int FemaleModelFallbackRaceID;
|
||||
public int MaleTextureFallbackRaceID;
|
||||
public int FemaleTextureFallbackRaceID;
|
||||
public int PlayableRaceBit;
|
||||
public int HelmetAnimScalingRaceID;
|
||||
public int TransmogrifyDisabledSlotMask;
|
||||
public int UnalteredVisualCustomizationRaceID;
|
||||
public float[] AlteredFormCustomizeOffsetFallback = new float[3];
|
||||
public float AlteredFormCustomizeRotationFallback;
|
||||
public ushort FactionID;
|
||||
public ushort CinematicSequenceID;
|
||||
public float[] Unknown910_1 = new float[3];
|
||||
public float[] Unknown910_2 = new float[3];
|
||||
public sbyte BaseLanguage;
|
||||
public sbyte CreatureType;
|
||||
public sbyte Alliance;
|
||||
public sbyte RaceRelated;
|
||||
public sbyte UnalteredVisualRaceID;
|
||||
public sbyte DefaultClassID;
|
||||
public sbyte NeutralRaceID;
|
||||
public sbyte MaleModelFallbackRaceID;
|
||||
public sbyte MaleModelFallbackSex;
|
||||
public sbyte FemaleModelFallbackRaceID;
|
||||
public sbyte FemaleModelFallbackSex;
|
||||
public sbyte MaleTextureFallbackRaceID;
|
||||
public sbyte MaleTextureFallbackSex;
|
||||
public sbyte FemaleTextureFallbackRaceID;
|
||||
public sbyte FemaleTextureFallbackSex;
|
||||
public sbyte UnalteredVisualCustomizationRaceID;
|
||||
|
||||
public ChrRacesFlag GetFlags() { return (ChrRacesFlag)Flags; }
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ChrSpecializationRecord
|
||||
{
|
||||
@@ -350,7 +353,8 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public int ExpectedStatModID;
|
||||
public int MythicPlusSeasonID;
|
||||
public int MinMythicPlusSeasonID;
|
||||
public int MaxMythicPlusSeasonID;
|
||||
public uint ContentTuningID;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ namespace Game.DataStorage
|
||||
public int CompleteWorldStateID;
|
||||
public sbyte Bit;
|
||||
public int CreatureDisplayID;
|
||||
public byte Flags;
|
||||
public int Flags;
|
||||
public int SpellIconFileID;
|
||||
public int Faction;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ namespace Game.DataStorage
|
||||
{
|
||||
public sealed class FactionRecord
|
||||
{
|
||||
public uint Id;
|
||||
public long[] ReputationRaceMask = new long[4];
|
||||
public LocalizedString Name;
|
||||
public string Description;
|
||||
public uint Id;
|
||||
public short ReputationIndex;
|
||||
public ushort ParentFactionID;
|
||||
public byte Expansion;
|
||||
|
||||
@@ -59,9 +59,9 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class GarrAbilityRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public string Description;
|
||||
public uint Id;
|
||||
public byte GarrAbilityCategoryID;
|
||||
public byte GarrFollowerTypeID;
|
||||
public int IconFileDataID;
|
||||
@@ -109,10 +109,10 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class GarrClassSpecRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string ClassSpec;
|
||||
public string ClassSpecMale;
|
||||
public string ClassSpecFemale;
|
||||
public uint Id;
|
||||
public ushort UiTextureAtlasMemberID;
|
||||
public ushort GarrFollItemSetID;
|
||||
public byte FollowerClassLimit;
|
||||
@@ -121,10 +121,10 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class GarrFollowerRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string HordeSourceText;
|
||||
public string AllianceSourceText;
|
||||
public string TitleName;
|
||||
public uint Id;
|
||||
public byte GarrTypeID;
|
||||
public byte GarrFollowerTypeID;
|
||||
public int HordeCreatureID;
|
||||
|
||||
@@ -205,7 +205,6 @@ namespace Game.DataStorage
|
||||
public ushort SpellCategoryID;
|
||||
public int SpellID;
|
||||
public ushort ChrSpecializationID;
|
||||
public uint ParentItemID;
|
||||
}
|
||||
|
||||
public sealed class ItemExtendedCostRecord
|
||||
@@ -299,11 +298,11 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class ItemSearchNameRecord
|
||||
{
|
||||
public uint Id;
|
||||
public long AllowableRace;
|
||||
public string Display;
|
||||
public uint Id;
|
||||
public byte OverallQualityID;
|
||||
public byte ExpansionID;
|
||||
public int ExpansionID;
|
||||
public ushort MinFactionID;
|
||||
public byte MinReputation;
|
||||
public int AllowableClass;
|
||||
@@ -343,7 +342,9 @@ namespace Game.DataStorage
|
||||
public string Display2;
|
||||
public string Display1;
|
||||
public LocalizedString Display;
|
||||
public int ExpansionID;
|
||||
public float DmgVariance;
|
||||
public uint InstanceBound;
|
||||
public uint DurationInInventory;
|
||||
public float QualityModifier;
|
||||
public uint BagFamily;
|
||||
@@ -370,7 +371,6 @@ namespace Game.DataStorage
|
||||
public ushort GemProperties;
|
||||
public ushort SocketMatchEnchantmentId;
|
||||
public ushort TotemCategoryID;
|
||||
public ushort InstanceBound;
|
||||
public ushort[] ZoneBound = new ushort[2];
|
||||
public ushort ItemSet;
|
||||
public ushort LockID;
|
||||
@@ -382,7 +382,6 @@ namespace Game.DataStorage
|
||||
public ushort RequiredSkill;
|
||||
public ushort ItemLevel;
|
||||
public short AllowableClass;
|
||||
public byte ExpansionID;
|
||||
public byte ArtifactID;
|
||||
public byte SpellWeight;
|
||||
public byte SpellWeightCategory;
|
||||
@@ -427,4 +426,11 @@ namespace Game.DataStorage
|
||||
public ushort ItemBonusTreeID;
|
||||
public uint ItemID;
|
||||
}
|
||||
|
||||
public sealed class ItemXItemEffectRecord
|
||||
{
|
||||
public uint Id;
|
||||
public int ItemEffectID;
|
||||
public uint ItemID;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class LanguagesRecord
|
||||
{
|
||||
public LocalizedString Name;
|
||||
public uint Id;
|
||||
public LocalizedString Name;
|
||||
}
|
||||
|
||||
public sealed class LFGDungeonsRecord
|
||||
|
||||
@@ -30,7 +30,6 @@ namespace Game.DataStorage
|
||||
public uint Id;
|
||||
public string Directory;
|
||||
public LocalizedString MapName;
|
||||
public string InternalName;
|
||||
public string MapDescription0; // Horde
|
||||
public string MapDescription1; // Alliance
|
||||
public string PvpShortDescription;
|
||||
@@ -134,7 +133,7 @@ namespace Game.DataStorage
|
||||
public uint Type;
|
||||
public uint Asset;
|
||||
public int SecondaryAsset;
|
||||
public sbyte TertiaryAsset;
|
||||
public int TertiaryAsset;
|
||||
}
|
||||
|
||||
public sealed class MountRecord
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class PlayerConditionRecord
|
||||
{
|
||||
public uint Id;
|
||||
public long RaceMask;
|
||||
public string FailureDescription;
|
||||
public uint Id;
|
||||
public int ClassMask;
|
||||
public uint SkillLogic;
|
||||
public int LanguageID;
|
||||
|
||||
@@ -289,6 +289,7 @@ namespace Game.DataStorage
|
||||
public float ResourceCoefficient;
|
||||
public float GroupSizeBasePointsCoefficient;
|
||||
public float EffectBasePoints;
|
||||
public int ScalingClass;
|
||||
public int[] EffectMiscValue = new int[2];
|
||||
public uint[] EffectRadiusIndex = new uint[2];
|
||||
public FlagArray128 EffectSpellClassMask;
|
||||
@@ -323,9 +324,9 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class SpellItemEnchantmentRecord
|
||||
{
|
||||
public uint Id;
|
||||
public string Name;
|
||||
public string HordeName;
|
||||
public uint Id;
|
||||
public uint[] EffectArg = new uint[ItemConst.MaxItemEnchantmentEffects];
|
||||
public float[] EffectScalingPoints = new float[ItemConst.MaxItemEnchantmentEffects];
|
||||
public uint IconFileDataID;
|
||||
@@ -485,7 +486,6 @@ namespace Game.DataStorage
|
||||
{
|
||||
public uint Id;
|
||||
public uint SpellID;
|
||||
public int Class;
|
||||
public uint MinScalingLevel;
|
||||
public uint MaxScalingLevel;
|
||||
public ushort ScalesFromItemLevel;
|
||||
@@ -552,7 +552,7 @@ namespace Game.DataStorage
|
||||
public byte DifficultyID;
|
||||
public uint SpellVisualID;
|
||||
public float Probability;
|
||||
public byte Priority;
|
||||
public int Priority;
|
||||
public int SpellIconFileID;
|
||||
public int ActiveIconFileID;
|
||||
public ushort ViewerUnitConditionID;
|
||||
|
||||
@@ -131,8 +131,8 @@ namespace Game.DataStorage
|
||||
|
||||
public sealed class TransmogSetGroupRecord
|
||||
{
|
||||
public string Name;
|
||||
public uint Id;
|
||||
public string Name;
|
||||
}
|
||||
|
||||
public sealed class TransmogSetItemRecord
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace Game.Entities
|
||||
public HolidayIds GetHolidayID() { return (HolidayIds)ExtendedData.RequiredHoliday; }
|
||||
public float GetDmgVariance() { return ExtendedData.DmgVariance; }
|
||||
public byte GetArtifactID() { return ExtendedData.ArtifactID; }
|
||||
public byte GetRequiredExpansion() { return ExtendedData.ExpansionID; }
|
||||
public byte GetRequiredExpansion() { return (byte)ExtendedData.ExpansionID; }
|
||||
|
||||
public bool IsCurrencyToken() { return (GetBagFamily() & BagFamilyMask.CurrencyTokens) != 0; }
|
||||
|
||||
|
||||
@@ -593,6 +593,11 @@ namespace Game.Entities
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
|
||||
TakenTotalMod *= GetTotalAuraMultiplier(AuraType.ModHealingTakenFromCaster, aurEff =>
|
||||
{
|
||||
return aurEff.GetCasterGUID() == caster.GetGUID();
|
||||
});
|
||||
}
|
||||
|
||||
float heal = healamount * TakenTotalMod;
|
||||
|
||||
@@ -4549,13 +4549,15 @@ namespace Game
|
||||
}
|
||||
|
||||
// Load item effects (spells)
|
||||
foreach (var effectEntry in CliDB.ItemEffectStorage.Values)
|
||||
foreach (var effectEntry in CliDB.ItemXItemEffectStorage.Values)
|
||||
{
|
||||
var itemTemplate = ItemTemplateStorage.LookupByKey(effectEntry.ParentItemID);
|
||||
if (itemTemplate == null)
|
||||
continue;
|
||||
|
||||
itemTemplate.Effects.Add(effectEntry);
|
||||
var item = ItemTemplateStorage.LookupByKey(effectEntry.ItemID);
|
||||
if (item != null)
|
||||
{
|
||||
var effect = CliDB.ItemEffectStorage.LookupByKey(effectEntry.ItemEffectID);
|
||||
if (effect != null)
|
||||
item.Effects.Add(effect);
|
||||
}
|
||||
}
|
||||
|
||||
Log.outInfo(LogFilter.ServerLoading, "Loaded {0} item templates in {1} ms", sparseCount, Time.GetMSTimeDiffToNow(oldMSTime));
|
||||
|
||||
@@ -5689,6 +5689,20 @@ namespace Game.Spells
|
||||
|
||||
Conversation.CreateConversation((uint)effectInfo.MiscValue, GetCaster(), unitTarget.GetPosition(), new List<ObjectGuid>() { unitTarget.GetGUID() }, GetSpellInfo());
|
||||
}
|
||||
|
||||
[SpellEffectHandler(SpellEffectName.SendChatMessage)]
|
||||
void EffectSendChatMessage(uint effIndex)
|
||||
{
|
||||
if (effectHandleMode != SpellEffectHandleMode.Hit)
|
||||
return;
|
||||
|
||||
uint broadcastTextId = (uint)effectInfo.MiscValue;
|
||||
if (!CliDB.BroadcastTextStorage.ContainsKey(broadcastTextId))
|
||||
return;
|
||||
|
||||
ChatMsg chatType = (ChatMsg)effectInfo.MiscValueB;
|
||||
unitTarget.Talk(broadcastTextId, chatType, Global.CreatureTextMgr.GetRangeForChatType(chatType), unitTarget);
|
||||
}
|
||||
}
|
||||
|
||||
public class DispelableAura
|
||||
|
||||
@@ -83,7 +83,6 @@ namespace Game.Spells
|
||||
SpellScalingRecord _scaling = data.Scaling;
|
||||
if (_scaling != null)
|
||||
{
|
||||
Scaling._Class = _scaling.Class;
|
||||
Scaling.MinScalingLevel = _scaling.MinScalingLevel;
|
||||
Scaling.MaxScalingLevel = _scaling.MaxScalingLevel;
|
||||
Scaling.ScalesFromItemLevel = _scaling.ScalesFromItemLevel;
|
||||
@@ -3750,7 +3749,6 @@ namespace Game.Spells
|
||||
|
||||
public struct ScalingInfo
|
||||
{
|
||||
public int _Class { get; set; }
|
||||
public uint MinScalingLevel;
|
||||
public uint MaxScalingLevel;
|
||||
public uint ScalesFromItemLevel;
|
||||
@@ -3785,6 +3783,7 @@ namespace Game.Spells
|
||||
TriggerSpell = effect.EffectTriggerSpell;
|
||||
SpellClassMask = effect.EffectSpellClassMask;
|
||||
BonusCoefficientFromAP = effect.BonusCoefficientFromAP;
|
||||
Scaling.Class = effect.ScalingClass;
|
||||
Scaling.Coefficient = effect.Coefficient;
|
||||
Scaling.Variance = effect.Variance;
|
||||
Scaling.ResourceCoefficient = effect.ResourceCoefficient;
|
||||
@@ -3933,7 +3932,7 @@ namespace Game.Spells
|
||||
float tempValue = 0.0f;
|
||||
if (level > 0)
|
||||
{
|
||||
if (_spellInfo.Scaling._Class == 0)
|
||||
if (Scaling.Class == 0)
|
||||
return 0;
|
||||
|
||||
uint effectiveItemLevel = itemLevel != -1 ? (uint)itemLevel : 1u;
|
||||
@@ -3942,21 +3941,21 @@ namespace Game.Spells
|
||||
if (_spellInfo.Scaling.ScalesFromItemLevel != 0)
|
||||
effectiveItemLevel = _spellInfo.Scaling.ScalesFromItemLevel;
|
||||
|
||||
if (_spellInfo.Scaling._Class == -8 || _spellInfo.Scaling._Class == -9)
|
||||
if (Scaling.Class == -8 || Scaling.Class == -9)
|
||||
{
|
||||
RandPropPointsRecord randPropPoints = CliDB.RandPropPointsStorage.LookupByKey(effectiveItemLevel);
|
||||
if (randPropPoints == null)
|
||||
randPropPoints = CliDB.RandPropPointsStorage.LookupByKey(CliDB.RandPropPointsStorage.Count - 1);
|
||||
|
||||
tempValue = _spellInfo.Scaling._Class == -8 ? randPropPoints.DamageReplaceStatF : randPropPoints.DamageSecondaryF;
|
||||
tempValue = Scaling.Class == -8 ? randPropPoints.DamageReplaceStatF : randPropPoints.DamageSecondaryF;
|
||||
}
|
||||
else
|
||||
tempValue = ItemEnchantmentManager.GetRandomPropertyPoints(effectiveItemLevel, ItemQuality.Rare, InventoryType.Chest, 0);
|
||||
}
|
||||
else
|
||||
tempValue = CliDB.GetSpellScalingColumnForClass(CliDB.SpellScalingGameTable.GetRow(level), _spellInfo.Scaling._Class);
|
||||
tempValue = CliDB.GetSpellScalingColumnForClass(CliDB.SpellScalingGameTable.GetRow(level), Scaling.Class);
|
||||
|
||||
if (_spellInfo.Scaling._Class == -7)
|
||||
if (Scaling.Class == -7)
|
||||
{
|
||||
GtGenericMultByILvlRecord ratingMult = CliDB.CombatRatingsMultByILvlGameTable.GetRow(effectiveItemLevel);
|
||||
if (ratingMult != null)
|
||||
@@ -4503,6 +4502,8 @@ namespace Game.Spells
|
||||
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 281 SPELL_EFFECT_LEARN_SOULBIND_CONDUIT
|
||||
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 282 SPELL_EFFECT_CONVERT_ITEMS_TO_CURRENCY
|
||||
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 283 SPELL_EFFECT_COMPLETE_CAMPAIGN
|
||||
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 284 SPELL_EFFECT_SEND_CHAT_MESSAGE
|
||||
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 285 SPELL_EFFECT_MODIFY_KEYSTONE_2
|
||||
};
|
||||
|
||||
#region Fields
|
||||
@@ -4540,6 +4541,7 @@ namespace Game.Spells
|
||||
|
||||
public struct ScalingInfo
|
||||
{
|
||||
public int Class;
|
||||
public float Coefficient;
|
||||
public float Variance;
|
||||
public float ResourceCoefficient;
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace Game
|
||||
return textEntry.duration;
|
||||
}
|
||||
|
||||
float GetRangeForChatType(ChatMsg msgType)
|
||||
public float GetRangeForChatType(ChatMsg msgType)
|
||||
{
|
||||
float dist = WorldConfig.GetFloatValue(WorldCfg.ListenRangeSay);
|
||||
switch (msgType)
|
||||
|
||||
Reference in New Issue
Block a user