Core: Updated to 10.0.2

Port From (https://github.com/TrinityCore/TrinityCore/commit/e98e1283ea0034baf6be9aa2ffb386eb5582801b)
This commit is contained in:
hondacrx
2022-12-28 15:25:15 -05:00
parent 2dc12dbb69
commit 989b80b056
100 changed files with 6591 additions and 4112 deletions
+16 -17
View File
@@ -4763,6 +4763,11 @@ namespace Game.Spells
if (m_spellInfo.ExcludeCasterAuraSpell != 0 && unitCaster.HasAura(m_spellInfo.ExcludeCasterAuraSpell))
return SpellCastResult.CasterAurastate;
if (m_spellInfo.CasterAuraType != 0 && !unitCaster.HasAuraType(m_spellInfo.CasterAuraType))
return SpellCastResult.CasterAurastate;
if (m_spellInfo.ExcludeCasterAuraType != 0 && unitCaster.HasAuraType(m_spellInfo.ExcludeCasterAuraType))
return SpellCastResult.CasterAurastate;
if (reqCombat && unitCaster.IsInCombat() && !m_spellInfo.CanBeUsedInCombat())
return SpellCastResult.AffectingCombat;
}
@@ -5589,21 +5594,15 @@ namespace Game.Spells
if (spellEffectInfo.Effect == SpellEffectName.ChangeBattlepetQuality)
{
var qualityRecord = CliDB.BattlePetBreedQualityStorage.Values.FirstOrDefault(a1 => a1.MaxQualityRoll < spellEffectInfo.BasePoints);
BattlePetBreedQuality quality = BattlePetBreedQuality.Poor;
switch (spellEffectInfo.BasePoints)
{
case 85:
quality = BattlePetBreedQuality.Rare;
break;
case 75:
quality = BattlePetBreedQuality.Uncommon;
break;
default:
// Ignore Epic Battle-Stones
break;
}
if (qualityRecord != null)
quality = (BattlePetBreedQuality)qualityRecord.QualityEnum;
if (battlePet.PacketInfo.Quality >= (byte)quality)
return SpellCastResult.CantUpgradeBattlePet;
}
if (spellEffectInfo.Effect == SpellEffectName.GrantBattlepetLevel || spellEffectInfo.Effect == SpellEffectName.GrantBattlepetExperience)
@@ -6634,21 +6633,21 @@ namespace Game.Spells
{
Item item = m_targets.GetItemTarget();
if (!item)
return SpellCastResult.CantBeDisenchanted;
return SpellCastResult.CantBeSalvaged;
// prevent disenchanting in trade slot
if (item.GetOwnerGUID() != player.GetGUID())
return SpellCastResult.CantBeDisenchanted;
return SpellCastResult.CantBeSalvaged;
ItemTemplate itemProto = item.GetTemplate();
if (itemProto == null)
return SpellCastResult.CantBeDisenchanted;
return SpellCastResult.CantBeSalvaged;
ItemDisenchantLootRecord itemDisenchantLoot = item.GetDisenchantLoot(m_caster.ToPlayer());
if (itemDisenchantLoot == null)
return SpellCastResult.CantBeDisenchanted;
return SpellCastResult.CantBeSalvaged;
if (itemDisenchantLoot.SkillRequired > player.GetSkillValue(SkillType.Enchanting))
return SpellCastResult.LowCastlevel;
return SpellCastResult.CantBeSalvagedSkill;
break;
}
case SpellEffectName.Prospecting:
+79 -37
View File
@@ -2127,30 +2127,7 @@ namespace Game.Spells
}
// select enchantment duration
uint duration;
// rogue family enchantments exception by duration
if (m_spellInfo.Id == 38615)
duration = 1800; // 30 mins
// other rogue family enchantments always 1 hour (some have spell damage=0, but some have wrong data in EffBasePoints)
else if (m_spellInfo.SpellFamilyName == SpellFamilyNames.Rogue)
duration = 3600; // 1 hour
// shaman family enchantments
else if (m_spellInfo.SpellFamilyName == SpellFamilyNames.Shaman)
duration = 3600; // 30 mins
// other cases with this SpellVisual already selected
else if (m_spellInfo.GetSpellVisual() == 215)
duration = 1800; // 30 mins
// some fishing pole bonuses except Glow Worm which lasts full hour
else if (m_spellInfo.GetSpellVisual() == 563 && m_spellInfo.Id != 64401)
duration = 600; // 10 mins
else if (m_spellInfo.Id == 29702)
duration = 300; // 5 mins
else if (m_spellInfo.Id == 37360)
duration = 300; // 5 mins
// default case
else
duration = 3600; // 1 hour
uint duration = (uint)pEnchant.Duration;
// item can be in trade slot and have owner diff. from caster
Player item_owner = itemTarget.GetOwner();
@@ -5208,19 +5185,11 @@ namespace Game.Spells
if (unitTarget == null || !unitTarget.IsCreature())
return;
var quality = BattlePetBreedQuality.Poor;
switch (damage)
{
case 85:
quality = BattlePetBreedQuality.Rare;
break;
case 75:
quality = BattlePetBreedQuality.Uncommon;
break;
default:
// Ignore Epic Battle-Stones
break;
}
var qualityRecord = CliDB.BattlePetBreedQualityStorage.Values.FirstOrDefault(a1 => a1.MaxQualityRoll < damage);
BattlePetBreedQuality quality = BattlePetBreedQuality.Poor;
if (qualityRecord != null)
quality = (BattlePetBreedQuality)qualityRecord.QualityEnum;
playerCaster.GetSession().GetBattlePetMgr().ChangeBattlePetQuality(unitTarget.GetBattlePetCompanionGUID(), quality);
}
@@ -5634,6 +5603,79 @@ namespace Game.Spells
player.GetSession().GetCollectionMgr().AddTransmogIllusion(illusionId);
}
[SpellEffectHandler(SpellEffectName.ModifyAuraStacks)]
void EffectModifyAuraStacks()
{
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
return;
Aura targetAura = unitTarget.GetAura(effectInfo.TriggerSpell);
if (targetAura == null)
return;
switch (effectInfo.MiscValue)
{
case 0:
targetAura.ModStackAmount(damage);
break;
case 1:
targetAura.SetStackAmount((byte)damage);
break;
default:
break;
}
}
[SpellEffectHandler(SpellEffectName.ModifyCooldown)]
void EffectModifyCooldown()
{
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
return;
unitTarget.GetSpellHistory().ModifyCooldown(effectInfo.TriggerSpell, TimeSpan.FromMilliseconds(damage));
}
[SpellEffectHandler(SpellEffectName.ModifyCooldowns)]
void EffectModifyCooldowns()
{
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
return;
unitTarget.GetSpellHistory().ModifyCoooldowns(itr =>
{
SpellInfo spellOnCooldown = Global.SpellMgr.GetSpellInfo(itr.SpellId, Difficulty.None);
if ((int)spellOnCooldown.SpellFamilyName != effectInfo.MiscValue)
return false;
int bitIndex = effectInfo.MiscValueB - 1;
if (bitIndex < 0 || bitIndex >= sizeof(uint) * 8)
return false;
FlagArray128 reqFlag = new();
reqFlag[bitIndex / 32] = 1u << (bitIndex % 32);
return (spellOnCooldown.SpellFamilyFlags & reqFlag);
}, TimeSpan.FromMilliseconds(damage));
}
[SpellEffectHandler(SpellEffectName.ModifyCooldownsByCategory)]
void EffectModifyCooldownsByCategory()
{
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
return;
unitTarget.GetSpellHistory().ModifyCoooldowns(itr => Global.SpellMgr.GetSpellInfo(itr.SpellId, Difficulty.None).CategoryId == effectInfo.MiscValue, TimeSpan.FromMilliseconds(damage));
}
[SpellEffectHandler(SpellEffectName.ModifyCharges)]
void EffectModifySpellCharges()
{
if (effectHandleMode != SpellEffectHandleMode.HitTarget)
return;
for (int i = 0; i < damage; ++i)
unitTarget.GetSpellHistory().RestoreCharge((uint)effectInfo.MiscValue);
}
}
public class DispelableAura
+26 -9
View File
@@ -514,20 +514,25 @@ namespace Game.Spells
}
}
public void ModifySpellCooldown(uint spellId, TimeSpan offset, bool withoutCategoryCooldown = false)
public void ModifySpellCooldown(uint spellId, TimeSpan cooldownMod, bool withoutCategoryCooldown)
{
var cooldownEntry = _spellCooldowns.LookupByKey(spellId);
if (offset.TotalMilliseconds == 0 || cooldownEntry == null)
if (cooldownMod.TotalMilliseconds == 0 || cooldownEntry == null)
return;
ModifySpellCooldown(cooldownEntry, cooldownMod, withoutCategoryCooldown);
}
void ModifySpellCooldown(CooldownEntry cooldownEntry, TimeSpan cooldownMod, bool withoutCategoryCooldown)
{
DateTime now = GameTime.GetSystemTime();
cooldownEntry.CooldownEnd += offset;
cooldownEntry.CooldownEnd += cooldownMod;
if (cooldownEntry.CategoryId != 0)
{
if (!withoutCategoryCooldown)
cooldownEntry.CategoryEnd += offset;
cooldownEntry.CategoryEnd += cooldownMod;
// Because category cooldown existence is tied to regular cooldown, we cannot allow a situation where regular cooldown is shorter than category
if (cooldownEntry.CooldownEnd < cooldownEntry.CategoryEnd)
@@ -535,9 +540,9 @@ namespace Game.Spells
}
if (cooldownEntry.CooldownEnd <= now)
{
{
_categoryCooldowns.Remove(cooldownEntry.CategoryId);
_spellCooldowns.Remove(spellId);
_spellCooldowns.Remove(cooldownEntry.SpellId);
}
Player playerOwner = GetPlayerOwner();
@@ -545,8 +550,8 @@ namespace Game.Spells
{
ModifyCooldown modifyCooldown = new();
modifyCooldown.IsPet = _owner != playerOwner;
modifyCooldown.SpellID = spellId;
modifyCooldown.DeltaTime = (int)offset.TotalMilliseconds;
modifyCooldown.SpellID = cooldownEntry.SpellId;
modifyCooldown.DeltaTime = (int)cooldownMod.TotalMilliseconds;
modifyCooldown.WithoutCategoryCooldown = withoutCategoryCooldown;
playerOwner.SendPacket(modifyCooldown);
}
@@ -569,7 +574,16 @@ namespace Game.Spells
else
ModifySpellCooldown(spellInfo.Id, cooldownMod, withoutCategoryCooldown);
}
public void ModifyCoooldowns(Func<CooldownEntry, bool> predicate, TimeSpan cooldownMod, bool withoutCategoryCooldown = false)
{
foreach (var cooldownEntry in _spellCooldowns.Values.ToList())
{
if (predicate(cooldownEntry))
ModifySpellCooldown(cooldownEntry, cooldownMod, withoutCategoryCooldown);
}
}
public void ResetCooldown(uint spellId, bool update = false)
{
var entry = _spellCooldowns.LookupByKey(spellId);
@@ -635,6 +649,9 @@ namespace Game.Spells
if (_spellCooldowns.ContainsKey(spellInfo.Id))
return true;
if (spellInfo.CooldownAuraSpellId != 0 && _owner.HasAura(spellInfo.CooldownAuraSpellId))
return true;
uint category = 0;
GetCooldownDurations(spellInfo, itemId, ref category);
+58 -3
View File
@@ -120,6 +120,10 @@ namespace Game.Spells
TargetAuraSpell = _aura.TargetAuraSpell;
ExcludeCasterAuraSpell = _aura.ExcludeCasterAuraSpell;
ExcludeTargetAuraSpell = _aura.ExcludeTargetAuraSpell;
CasterAuraType = (AuraType)_aura.CasterAuraType;
TargetAuraType = (AuraType)_aura.TargetAuraType;
ExcludeCasterAuraType = (AuraType)_aura.ExcludeCasterAuraType;
ExcludeTargetAuraType = (AuraType)_aura.ExcludeTargetAuraType;
}
RequiredAreasID = -1;
@@ -161,6 +165,7 @@ namespace Game.Spells
RecoveryTime = _cooldowns.RecoveryTime;
CategoryRecoveryTime = _cooldowns.CategoryRecoveryTime;
StartRecoveryTime = _cooldowns.StartRecoveryTime;
CooldownAuraSpellId = _cooldowns.AuraSpellID;
}
EquippedItemClass = ItemClass.None;
@@ -2855,7 +2860,7 @@ namespace Game.Spells
}
Log.outError(LogFilter.Spells, $"SpellInfo.CalcPowerCost: Unknown power type '{power.PowerType}' in spell {Id}");
return default;
return null;
}
}
}
@@ -2863,6 +2868,36 @@ namespace Game.Spells
else
{
powerCost = (int)power.OptionalCost;
if (power.OptionalCostPct != 0)
{
switch (power.PowerType)
{
// health as power used
case PowerType.Health:
powerCost += (int)MathFunctions.CalculatePct(unitCaster.GetMaxHealth(), power.OptionalCostPct);
break;
case PowerType.Mana:
powerCost += (int)MathFunctions.CalculatePct(unitCaster.GetCreateMana(), power.OptionalCostPct);
break;
case PowerType.AlternatePower:
Log.outError(LogFilter.Spells, $"SpellInfo::CalcPowerCost: Unsupported power type POWER_ALTERNATE_POWER in spell {Id} for optional cost percent");
return null;
default:
{
var powerTypeEntry = Global.DB2Mgr.GetPowerTypeEntry(power.PowerType);
if (powerTypeEntry != null)
{
powerCost += (int)MathFunctions.CalculatePct(powerTypeEntry.MaxBasePower, power.OptionalCostPct);
break;
}
Log.outError(LogFilter.Spells, $"SpellInfo::CalcPowerCost: Unknown power type '{power.PowerType}' in spell {Id} for optional cost percent");
return null;
}
}
}
powerCost += unitCaster.GetTotalAuraModifier(AuraType.ModAdditionalPowerCost, aurEff =>
{
return aurEff.GetMiscValue() == (int)power.PowerType && aurEff.IsAffectingSpell(this);
@@ -3964,11 +3999,16 @@ namespace Game.Spells
public uint TargetAuraSpell { get; set; }
public uint ExcludeCasterAuraSpell { get; set; }
public uint ExcludeTargetAuraSpell { get; set; }
public AuraType CasterAuraType { get; set; }
public AuraType TargetAuraType { get; set; }
public AuraType ExcludeCasterAuraType { get; set; }
public AuraType ExcludeTargetAuraType { get; set; }
public SpellCastTimesRecord CastTimeEntry { get; set; }
public uint RecoveryTime { get; set; }
public uint CategoryRecoveryTime { get; set; }
public uint StartRecoveryCategory { get; set; }
public uint StartRecoveryTime { get; set; }
public uint CooldownAuraSpellId { get; set; }
public SpellInterruptFlags InterruptFlags { get; set; }
public SpellAuraInterruptFlags AuraInterruptFlags { get; set; }
public SpellAuraInterruptFlags2 AuraInterruptFlags2 { get; set; }
@@ -4777,8 +4817,23 @@ namespace Game.Spells
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 285 SPELL_EFFECT_MODIFY_KEYSTONE_2
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 286 SPELL_EFFECT_GRANT_BATTLEPET_EXPERIENCE
new StaticData(SpellEffectImplicitTargetTypes.None, SpellTargetObjectTypes.None), // 287 SPELL_EFFECT_SET_GARRISON_FOLLOWER_LEVEL
new StaticData(SpellEffectImplicitTargetTypes.None, SpellTargetObjectTypes.None), // 288 SPELL_EFFECT_288
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 289 SPELL_EFFECT_289
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 288 SPELL_EFFECT_CRAFT_ITEM
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 289 SPELL_EFFECT_MODIFY_AURA_STACKS
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 290 SPELL_EFFECT_MODIFY_COOLDOWN
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 291 SPELL_EFFECT_MODIFY_COOLDOWNS
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 292 SPELL_EFFECT_MODIFY_COOLDOWNS_BY_CATEGORY
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 293 SPELL_EFFECT_MODIFY_CHARGES
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 294 SPELL_EFFECT_CRAFT_LOOT
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Item), // 295 SPELL_EFFECT_SALVAGE_ITEM
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Item), // 296 SPELL_EFFECT_CRAFT_SALVAGE_ITEM
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Item), // 297 SPELL_EFFECT_RECRAFT_ITEM
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 298 SPELL_EFFECT_CANCEL_ALL_PRIVATE_CONVERSATIONS
new StaticData(SpellEffectImplicitTargetTypes.None, SpellTargetObjectTypes.None), // 299 SPELL_EFFECT_299
new StaticData(SpellEffectImplicitTargetTypes.None, SpellTargetObjectTypes.None), // 300 SPELL_EFFECT_300
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Item), // 301 SPELL_EFFECT_CRAFT_ENCHANT
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.None), // 302 SPELL_EFFECT_GATHERING
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 303 SPELL_EFFECT_CREATE_TRAIT_TREE_CONFIG
new StaticData(SpellEffectImplicitTargetTypes.Explicit, SpellTargetObjectTypes.Unit), // 304 SPELL_EFFECT_CHANGE_ACTIVE_COMBAT_TRAIT_CONFIG
};
#region Fields
+52 -46
View File
@@ -2471,17 +2471,19 @@ namespace Game.Entities
"AttributesEx4, AttributesEx5, AttributesEx6, AttributesEx7, AttributesEx8, AttributesEx9, AttributesEx10, AttributesEx11, AttributesEx12, AttributesEx13, " +
//19 20 21 22 23 24 25 26 27
"AttributesEx14, Stances, StancesNot, Targets, TargetCreatureType, RequiresSpellFocus, FacingCasterFlags, CasterAuraState, TargetAuraState, " +
//28 29 30 31 32 33 34
"ExcludeCasterAuraState, ExcludeTargetAuraState, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell, CastingTimeIndex, " +
//35 36 37 38 39 40 41
//28 29 30 31 32 33
"ExcludeCasterAuraState, ExcludeTargetAuraState, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell, " +
//34 35 36 37 38
"CasterAuraType, TargetAuraType, ExcludeCasterAuraType, ExcludeTargetAuraType, CastingTimeIndex, " +
//39 40 41 42 43 44 45
"RecoveryTime, CategoryRecoveryTime, StartRecoveryCategory, StartRecoveryTime, InterruptFlags, AuraInterruptFlags1, AuraInterruptFlags2, " +
//42 43 44 45 46 47 48 49 50 51 52
//46 47 48 49 50 51 52 53 54 55 56
"ChannelInterruptFlags1, ChannelInterruptFlags2, ProcFlags, ProcFlags2, ProcChance, ProcCharges, ProcCooldown, ProcBasePPM, MaxLevel, BaseLevel, SpellLevel, " +
//53 54 55 56 57 58 59 60 61
//57 58 59 60 61 62 63 64 65
"DurationIndex, RangeIndex, Speed, LaunchDelay, StackAmount, EquippedItemClass, EquippedItemSubClassMask, EquippedItemInventoryTypeMask, ContentTuningId, " +
//62 63 64 65 66 67 68 69 70 71
//66 67 68 69 70 71 72 73 74 75
"SpellName, ConeAngle, ConeWidth, MaxTargetLevel, MaxAffectedTargets, SpellFamilyName, SpellFamilyFlags1, SpellFamilyFlags2, SpellFamilyFlags3, SpellFamilyFlags4, " +
//72 73 74 75 76
//76 77 78 79 80
"DmgClass, PreventionType, AreaGroupId, SchoolMask, ChargeCategoryId FROM serverside_spell");
if (!spellsResult.IsEmpty())
@@ -2496,7 +2498,7 @@ namespace Game.Entities
continue;
}
mServersideSpellNames.Add(new(spellId, spellsResult.Read<string>(62)));
mServersideSpellNames.Add(new(spellId, spellsResult.Read<string>(66)));
SpellInfo spellInfo = new(mServersideSpellNames.Last().Name, difficulty, spellEffects[(spellId, difficulty)]);
spellInfo.CategoryId = spellsResult.Read<uint>(2);
@@ -2531,44 +2533,48 @@ namespace Game.Entities
spellInfo.TargetAuraSpell = spellsResult.Read<uint>(31);
spellInfo.ExcludeCasterAuraSpell = spellsResult.Read<uint>(32);
spellInfo.ExcludeTargetAuraSpell = spellsResult.Read<uint>(33);
spellInfo.CastTimeEntry = CliDB.SpellCastTimesStorage.LookupByKey(spellsResult.Read<uint>(34));
spellInfo.RecoveryTime = spellsResult.Read<uint>(35);
spellInfo.CategoryRecoveryTime = spellsResult.Read<uint>(36);
spellInfo.StartRecoveryCategory = spellsResult.Read<uint>(37);
spellInfo.StartRecoveryTime = spellsResult.Read<uint>(38);
spellInfo.InterruptFlags = (SpellInterruptFlags)spellsResult.Read<uint>(39);
spellInfo.AuraInterruptFlags = (SpellAuraInterruptFlags)spellsResult.Read<uint>(40);
spellInfo.AuraInterruptFlags2 = (SpellAuraInterruptFlags2)spellsResult.Read<uint>(41);
spellInfo.ChannelInterruptFlags = (SpellAuraInterruptFlags)spellsResult.Read<uint>(42);
spellInfo.ChannelInterruptFlags2 = (SpellAuraInterruptFlags2)spellsResult.Read<uint>(43);
spellInfo.ProcFlags = new ProcFlagsInit(spellsResult.Read<int>(44), spellsResult.Read<int>(45));
spellInfo.ProcChance = spellsResult.Read<uint>(46);
spellInfo.ProcCharges = spellsResult.Read<uint>(47);
spellInfo.ProcCooldown = spellsResult.Read<uint>(48);
spellInfo.ProcBasePPM = spellsResult.Read<float>(49);
spellInfo.MaxLevel = spellsResult.Read<uint>(50);
spellInfo.BaseLevel = spellsResult.Read<uint>(51);
spellInfo.SpellLevel = spellsResult.Read<uint>(52);
spellInfo.DurationEntry = CliDB.SpellDurationStorage.LookupByKey(spellsResult.Read<uint>(53));
spellInfo.RangeEntry = CliDB.SpellRangeStorage.LookupByKey(spellsResult.Read<uint>(54));
spellInfo.Speed = spellsResult.Read<float>(55);
spellInfo.LaunchDelay = spellsResult.Read<float>(56);
spellInfo.StackAmount = spellsResult.Read<uint>(57);
spellInfo.EquippedItemClass = (ItemClass)spellsResult.Read<int>(58);
spellInfo.EquippedItemSubClassMask = spellsResult.Read<int>(59);
spellInfo.EquippedItemInventoryTypeMask = spellsResult.Read<int>(60);
spellInfo.ContentTuningId = spellsResult.Read<uint>(61);
spellInfo.ConeAngle = spellsResult.Read<float>(63);
spellInfo.Width = spellsResult.Read<float>(64);
spellInfo.MaxTargetLevel = spellsResult.Read<uint>(65);
spellInfo.MaxAffectedTargets = spellsResult.Read<uint>(66);
spellInfo.SpellFamilyName = (SpellFamilyNames)spellsResult.Read<uint>(67);
spellInfo.SpellFamilyFlags = new FlagArray128(spellsResult.Read<uint>(68), spellsResult.Read<uint>(69), spellsResult.Read<uint>(70), spellsResult.Read<uint>(71));
spellInfo.DmgClass = (SpellDmgClass)spellsResult.Read<uint>(72);
spellInfo.PreventionType = (SpellPreventionType)spellsResult.Read<uint>(73);
spellInfo.RequiredAreasID = spellsResult.Read<int>(74);
spellInfo.SchoolMask = (SpellSchoolMask)spellsResult.Read<uint>(75);
spellInfo.ChargeCategoryId = spellsResult.Read<uint>(76);
spellInfo.CasterAuraType = (AuraType)spellsResult.Read<int>(34);
spellInfo.TargetAuraType = (AuraType)spellsResult.Read<int>(35);
spellInfo.ExcludeCasterAuraType = (AuraType)spellsResult.Read<int>(36);
spellInfo.ExcludeTargetAuraType = (AuraType)spellsResult.Read<int>(37);
spellInfo.CastTimeEntry = CliDB.SpellCastTimesStorage.LookupByKey(spellsResult.Read<uint>(38));
spellInfo.RecoveryTime = spellsResult.Read<uint>(39);
spellInfo.CategoryRecoveryTime = spellsResult.Read<uint>(40);
spellInfo.StartRecoveryCategory = spellsResult.Read<uint>(41);
spellInfo.StartRecoveryTime = spellsResult.Read<uint>(42);
spellInfo.InterruptFlags = (SpellInterruptFlags)spellsResult.Read<uint>(43);
spellInfo.AuraInterruptFlags = (SpellAuraInterruptFlags)spellsResult.Read<uint>(44);
spellInfo.AuraInterruptFlags2 = (SpellAuraInterruptFlags2)spellsResult.Read<uint>(45);
spellInfo.ChannelInterruptFlags = (SpellAuraInterruptFlags)spellsResult.Read<uint>(46);
spellInfo.ChannelInterruptFlags2 = (SpellAuraInterruptFlags2)spellsResult.Read<uint>(47);
spellInfo.ProcFlags = new ProcFlagsInit(spellsResult.Read<int>(48), spellsResult.Read<int>(49));
spellInfo.ProcChance = spellsResult.Read<uint>(50);
spellInfo.ProcCharges = spellsResult.Read<uint>(51);
spellInfo.ProcCooldown = spellsResult.Read<uint>(52);
spellInfo.ProcBasePPM = spellsResult.Read<float>(53);
spellInfo.MaxLevel = spellsResult.Read<uint>(54);
spellInfo.BaseLevel = spellsResult.Read<uint>(55);
spellInfo.SpellLevel = spellsResult.Read<uint>(56);
spellInfo.DurationEntry = CliDB.SpellDurationStorage.LookupByKey(spellsResult.Read<uint>(57));
spellInfo.RangeEntry = CliDB.SpellRangeStorage.LookupByKey(spellsResult.Read<uint>(58));
spellInfo.Speed = spellsResult.Read<float>(59);
spellInfo.LaunchDelay = spellsResult.Read<float>(60);
spellInfo.StackAmount = spellsResult.Read<uint>(61);
spellInfo.EquippedItemClass = (ItemClass)spellsResult.Read<int>(62);
spellInfo.EquippedItemSubClassMask = spellsResult.Read<int>(63);
spellInfo.EquippedItemInventoryTypeMask = spellsResult.Read<int>(64);
spellInfo.ContentTuningId = spellsResult.Read<uint>(65);
spellInfo.ConeAngle = spellsResult.Read<float>(67);
spellInfo.Width = spellsResult.Read<float>(68);
spellInfo.MaxTargetLevel = spellsResult.Read<uint>(69);
spellInfo.MaxAffectedTargets = spellsResult.Read<uint>(70);
spellInfo.SpellFamilyName = (SpellFamilyNames)spellsResult.Read<uint>(71);
spellInfo.SpellFamilyFlags = new FlagArray128(spellsResult.Read<uint>(72), spellsResult.Read<uint>(73), spellsResult.Read<uint>(74), spellsResult.Read<uint>(75));
spellInfo.DmgClass = (SpellDmgClass)spellsResult.Read<uint>(76);
spellInfo.PreventionType = (SpellPreventionType)spellsResult.Read<uint>(77);
spellInfo.RequiredAreasID = spellsResult.Read<int>(78);
spellInfo.SchoolMask = (SpellSchoolMask)spellsResult.Read<uint>(79);
spellInfo.ChargeCategoryId = spellsResult.Read<uint>(80);
mSpellInfoMap.Add(spellId, spellInfo);