fix(Core/Spells): add several missing null checks for the DamageInfo struct to fix a crash - Part II. (#8376)

This commit is contained in:
UltraNix
2021-10-10 15:56:42 +02:00
committed by GitHub
parent 760e043116
commit 66809383d1
13 changed files with 48 additions and 41 deletions
@@ -1059,15 +1059,16 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo(); DamageInfo* damageInfo = eventInfo.GetDamageInfo();
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && procSpell && procSpell->SpellIconID != 2731; // Xinef: Mark of the Fallen Champion SpellInfo const* procSpell = eventInfo.GetSpellInfo();
return eventInfo.GetActor() && eventInfo.GetActionTarget() && ((damageInfo && damageInfo->GetDamage()) || eventInfo.GetHitMask() & PROC_EX_ABSORB) && procSpell && procSpell->SpellIconID != 2731; // Xinef: Mark of the Fallen Champion
} }
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{ {
PreventDefaultAction(); PreventDefaultAction();
Unit* victim = eventInfo.GetActionTarget(); Unit* victim = eventInfo.GetActionTarget();
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo(); SpellInfo const* procSpell = eventInfo.GetSpellInfo();
//uint32 markCount = 0; //uint32 markCount = 0;
//if (Creature* saurfang = eventInfo.GetActor()->ToCreature()) //if (Creature* saurfang = eventInfo.GetActor()->ToCreature())
@@ -1091,7 +1092,6 @@ public:
{ {
DoCheckProc += AuraCheckProcFn(spell_deathbringer_blood_link_AuraScript::CheckProc); DoCheckProc += AuraCheckProcFn(spell_deathbringer_blood_link_AuraScript::CheckProc);
OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_link_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); OnEffectProc += AuraEffectProcFn(spell_deathbringer_blood_link_AuraScript::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathbringer_blood_link_AuraScript::HandlePeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY); OnEffectPeriodic += AuraEffectPeriodicFn(spell_deathbringer_blood_link_AuraScript::HandlePeriodicTick, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
} }
}; };
@@ -1113,8 +1113,9 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo(); DamageInfo* damageInfo = eventInfo.GetDamageInfo();
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && (!procSpell || procSpell->SpellIconID != 2731); // Xinef: Mark of the Fallen Champion SpellInfo const* procSpell = eventInfo.GetSpellInfo();
return eventInfo.GetActor() && eventInfo.GetActionTarget() && ((damageInfo && damageInfo->GetDamage()) || eventInfo.GetHitMask() & PROC_EX_ABSORB) && (!procSpell || procSpell->SpellIconID != 2731); // Xinef: Mark of the Fallen Champion
} }
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
@@ -947,7 +947,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo) if (!spellInfo)
return false; return false;
@@ -161,7 +161,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
if (SpellInfo const* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo()) if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
{ {
if ((spellInfo->GetSchoolMask() & _lastSchool) && _swapTime > time(nullptr)) if ((spellInfo->GetSchoolMask() & _lastSchool) && _swapTime > time(nullptr))
return false; return false;
+7 -7
View File
@@ -585,8 +585,8 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo || !eventInfo.GetActionTarget()) if (!spellInfo || !eventInfo.GetActionTarget() || !eventInfo.GetDamageInfo())
return false; return false;
if (!roll_chance_f(eventInfo.GetActor()->GetUnitCriticalChance(BASE_ATTACK, eventInfo.GetActionTarget()))) if (!roll_chance_f(eventInfo.GetActor()->GetUnitCriticalChance(BASE_ATTACK, eventInfo.GetActionTarget())))
@@ -660,7 +660,7 @@ public:
void HandleProc(ProcEventInfo& eventInfo) void HandleProc(ProcEventInfo& eventInfo)
{ {
PreventDefaultAction(); PreventDefaultAction();
if (!eventInfo.GetDamageInfo()->GetSpellInfo() || !eventInfo.GetDamageInfo()->GetSpellInfo()->IsTargetingArea()) if (!eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->IsTargetingArea())
DropCharge(); DropCharge();
} }
@@ -689,7 +689,7 @@ public:
void HandleProc(ProcEventInfo& eventInfo) void HandleProc(ProcEventInfo& eventInfo)
{ {
PreventDefaultAction(); PreventDefaultAction();
if (eventInfo.GetDamageInfo()->GetDamage() > 0 && (!eventInfo.GetDamageInfo()->GetSpellInfo() || eventInfo.GetDamageInfo()->GetSpellInfo()->Dispel != DISPEL_DISEASE)) if (eventInfo.GetDamageInfo() && eventInfo.GetDamageInfo()->GetDamage() > 0 && (!eventInfo.GetSpellInfo() || eventInfo.GetSpellInfo()->Dispel != DISPEL_DISEASE))
SetDuration(0); SetDuration(0);
} }
@@ -770,7 +770,7 @@ public:
if (!eventInfo.GetActor() || !eventInfo.GetActionTarget() || !eventInfo.GetActionTarget()->IsAlive() || eventInfo.GetActor()->GetTypeId() != TYPEID_PLAYER) if (!eventInfo.GetActor() || !eventInfo.GetActionTarget() || !eventInfo.GetActionTarget()->IsAlive() || eventInfo.GetActor()->GetTypeId() != TYPEID_PLAYER)
return false; return false;
const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo) if (!spellInfo)
return true; return true;
@@ -815,7 +815,7 @@ public:
return; return;
dancingRuneWeapon->SetOrientation(dancingRuneWeapon->GetAngle(target)); dancingRuneWeapon->SetOrientation(dancingRuneWeapon->GetAngle(target));
if (const SpellInfo* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo()) if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
{ {
// xinef: ugly hack // xinef: ugly hack
if (!procSpell->IsAffectingArea()) if (!procSpell->IsAffectingArea())
@@ -823,7 +823,7 @@ public:
dancingRuneWeapon->CastSpell(target, procSpell->Id, true, nullptr, aurEff, dancingRuneWeapon->GetGUID()); dancingRuneWeapon->CastSpell(target, procSpell->Id, true, nullptr, aurEff, dancingRuneWeapon->GetGUID());
GetUnitOwner()->SetFloatValue(UNIT_FIELD_COMBATREACH, 0.01f); GetUnitOwner()->SetFloatValue(UNIT_FIELD_COMBATREACH, 0.01f);
} }
else else if (eventInfo.GetDamageInfo())
{ {
target = player->GetMeleeHitRedirectTarget(target); target = player->GetMeleeHitRedirectTarget(target);
CalcDamageInfo damageInfo; CalcDamageInfo damageInfo;
+1 -1
View File
@@ -182,7 +182,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo) if (!spellInfo)
return true; return true;
+4 -4
View File
@@ -773,7 +773,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
SpellInfo const* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo) if (!spellInfo)
return false; return false;
@@ -927,7 +927,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
return !eventInfo.GetDamageInfo()->GetSpellInfo() || !eventInfo.GetDamageInfo()->GetSpellInfo()->IsTargetingArea(); return !eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->IsTargetingArea();
} }
void Register() override void Register() override
@@ -1694,7 +1694,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
if (eventInfo.GetDamageInfo()->GetSpellInfo()) // eventInfo.GetSpellInfo() if (eventInfo.GetSpellInfo())
return false; return false;
// find Mage Armor // find Mage Armor
@@ -2145,7 +2145,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
if (eventInfo.GetDamageInfo()->GetSpellInfo()) // eventInfo.GetSpellInfo() if (eventInfo.GetSpellInfo())
return false; return false;
if (GetFirstSchoolInMask(eventInfo.GetSchoolMask()) == SPELL_SCHOOL_NORMAL) if (GetFirstSchoolInMask(eventInfo.GetSchoolMask()) == SPELL_SCHOOL_NORMAL)
+1 -1
View File
@@ -444,7 +444,7 @@ public:
bool CheckProc(ProcEventInfo& procInfo) bool CheckProc(ProcEventInfo& procInfo)
{ {
SpellInfo const* spellInfo = procInfo.GetDamageInfo()->GetSpellInfo(); SpellInfo const* spellInfo = procInfo.GetSpellInfo();
// Xinef: cannot proc from volley damage // Xinef: cannot proc from volley damage
if (spellInfo && (spellInfo->SpellFamilyFlags[0] & 0x2000) && spellInfo->Effects[EFFECT_0].Effect == SPELL_EFFECT_SCHOOL_DAMAGE) if (spellInfo && (spellInfo->SpellFamilyFlags[0] & 0x2000) && spellInfo->Effects[EFFECT_0].Effect == SPELL_EFFECT_SCHOOL_DAMAGE)
return false; return false;
+2 -2
View File
@@ -668,7 +668,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
SpellInfo const* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo || !spellInfo->HasEffect(SPELL_EFFECT_HEAL)) if (!spellInfo || !spellInfo->HasEffect(SPELL_EFFECT_HEAL))
return false; return false;
@@ -2868,7 +2868,7 @@ public:
/*if (!GetTarget()->FindMap() || GetTarget()->FindMap()->IsBattlegroundOrArena()) /*if (!GetTarget()->FindMap() || GetTarget()->FindMap()->IsBattlegroundOrArena())
return false;*/ return false;*/
if (const SpellInfo* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo()) if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
if (!eventInfo.GetDamageInfo()->GetDamage()) if (!eventInfo.GetDamageInfo()->GetDamage())
{ {
if (procSpell->SpellFamilyName == SPELLFAMILY_WARRIOR) if (procSpell->SpellFamilyName == SPELLFAMILY_WARRIOR)
+9 -9
View File
@@ -138,11 +138,11 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
if (!eventInfo.GetDamageInfo()->GetSpellInfo() || !eventInfo.GetActionTarget()) if (!eventInfo.GetSpellInfo() || !eventInfo.GetActionTarget())
return false; return false;
// Need Interrupt or Silenced mechanic // Need Interrupt or Silenced mechanic
if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->GetAllEffectsMechanicMask() & ((1 << MECHANIC_INTERRUPT) | (1 << MECHANIC_SILENCE)))) if (!(eventInfo.GetSpellInfo()->GetAllEffectsMechanicMask() & ((1 << MECHANIC_INTERRUPT) | (1 << MECHANIC_SILENCE))))
return false; return false;
// Xinef: immuned effect should just eat charge // Xinef: immuned effect should just eat charge
@@ -191,7 +191,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo || (eventInfo.GetTypeMask() & PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK)) if (!spellInfo || (eventInfo.GetTypeMask() & PROC_FLAG_TAKEN_MELEE_AUTO_ATTACK))
return true; return true;
@@ -262,14 +262,14 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
return eventInfo.GetDamageInfo()->GetSpellInfo(); // eventInfo.GetSpellInfo() return eventInfo.GetSpellInfo();
} }
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{ {
PreventDefaultAction(); PreventDefaultAction();
int32 mana = int32(eventInfo.GetDamageInfo()->GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetDamageInfo()->GetSchoolMask())); int32 mana = int32(eventInfo.GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetSchoolMask()));
mana = CalculatePct(mana, aurEff->GetAmount()); mana = CalculatePct(mana, aurEff->GetAmount());
GetTarget()->CastCustomSpell(SPELL_MAGE_BURNOUT_TRIGGER, SPELLVALUE_BASE_POINT0, mana, GetTarget(), true, nullptr, aurEff); GetTarget()->CastCustomSpell(SPELL_MAGE_BURNOUT_TRIGGER, SPELLVALUE_BASE_POINT0, mana, GetTarget(), true, nullptr, aurEff);
@@ -453,7 +453,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
if (!spellInfo) if (!spellInfo)
return false; return false;
@@ -865,7 +865,7 @@ public:
return false; return false;
// Molten Armor // Molten Armor
if (SpellInfo const* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo()) if (SpellInfo const* spellInfo = eventInfo.GetSpellInfo())
if (spellInfo->SpellFamilyFlags[1] & 0x8) if (spellInfo->SpellFamilyFlags[1] & 0x8)
return false; return false;
@@ -993,7 +993,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
_spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo(); _spellInfo = eventInfo.GetSpellInfo();
if (!_spellInfo) if (!_spellInfo)
{ {
return false; return false;
@@ -1029,7 +1029,7 @@ public:
{ {
PreventDefaultAction(); PreventDefaultAction();
int32 mana = int32(_spellInfo->CalcPowerCost(GetTarget(), eventInfo.GetDamageInfo()->GetSchoolMask()) / ticksModifier); int32 mana = int32(_spellInfo->CalcPowerCost(GetTarget(), eventInfo.GetSchoolMask()) / ticksModifier);
mana = CalculatePct(mana, aurEff->GetAmount()); mana = CalculatePct(mana, aurEff->GetAmount());
if (mana > 0) if (mana > 0)
+5 -5
View File
@@ -100,7 +100,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
if (const SpellInfo* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo()) if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
if (procSpell->SpellIconID == 3025) // Righteous Vengeance, should not proc SoC if (procSpell->SpellIconID == 3025) // Righteous Vengeance, should not proc SoC
return false; return false;
return true; return true;
@@ -110,7 +110,7 @@ public:
{ {
PreventDefaultAction(); PreventDefaultAction();
int32 targets = 3; int32 targets = 3;
if (const SpellInfo* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo()) if (const SpellInfo* procSpell = eventInfo.GetSpellInfo())
if (procSpell->IsAffectingArea()) if (procSpell->IsAffectingArea())
targets = 1; targets = 1;
@@ -201,7 +201,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
// xinef: skip divine storm self hit (dummy) and righteous vengeance (0x20000000= // xinef: skip divine storm self hit (dummy) and righteous vengeance (0x20000000=
return eventInfo.GetActor() != eventInfo.GetProcTarget() && (!eventInfo.GetDamageInfo()->GetSpellInfo() || !eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags.HasFlag(0x20000000)); return eventInfo.GetActor() != eventInfo.GetProcTarget() && (!eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->SpellFamilyFlags.HasFlag(0x20000000));
} }
void Register() override void Register() override
@@ -251,7 +251,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
return !(eventInfo.GetHitMask() & PROC_EX_INTERNAL_HOT) && eventInfo.GetDamageInfo()->GetDamage() > 0; return !(eventInfo.GetHitMask() & PROC_EX_INTERNAL_HOT) && eventInfo.GetDamageInfo() && eventInfo.GetDamageInfo()->GetDamage() > 0;
} }
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
@@ -261,7 +261,7 @@ public:
if (eventInfo.GetTypeMask() & PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS) if (eventInfo.GetTypeMask() & PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS)
{ {
Unit* caster = eventInfo.GetActor(); Unit* caster = eventInfo.GetActor();
const SpellInfo* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo(); const SpellInfo* procSpell = eventInfo.GetSpellInfo();
if (caster && procSpell->SpellFamilyName == SPELLFAMILY_PALADIN && if (caster && procSpell->SpellFamilyName == SPELLFAMILY_PALADIN &&
procSpell->SpellFamilyFlags.HasFlag(0x40000000) && caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_PALADIN, 3021, 0)) // need infusion of light procSpell->SpellFamilyFlags.HasFlag(0x40000000) && caster->GetAuraEffect(SPELL_AURA_PROC_TRIGGER_SPELL, SPELLFAMILY_PALADIN, 3021, 0)) // need infusion of light
{ {
+7 -1
View File
@@ -288,8 +288,14 @@ public:
{ {
PreventDefaultAction(); PreventDefaultAction();
HealInfo* healInfo = eventInfo.GetHealInfo();
if (!healInfo || healInfo->GetHeal())
{
return;
}
SpellInfo const* triggeredSpellInfo = sSpellMgr->AssertSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL); SpellInfo const* triggeredSpellInfo = sSpellMgr->AssertSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL);
int32 heal = int32(CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()) / triggeredSpellInfo->GetMaxTicks()); int32 heal = int32(CalculatePct(int32(healInfo->GetHeal()), aurEff->GetAmount()) / triggeredSpellInfo->GetMaxTicks());
GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, nullptr, aurEff); GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, nullptr, aurEff);
} }
+2 -2
View File
@@ -1120,13 +1120,13 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
return eventInfo.GetDamageInfo()->GetSpellInfo(); return eventInfo.GetSpellInfo();
} }
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{ {
PreventDefaultAction(); PreventDefaultAction();
int32 mana = eventInfo.GetDamageInfo()->GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetSchoolMask()); int32 mana = eventInfo.GetSpellInfo()->CalcPowerCost(GetTarget(), eventInfo.GetSchoolMask());
int32 damage = CalculatePct(mana, 35); int32 damage = CalculatePct(mana, 35);
GetTarget()->CastCustomSpell(SPELL_SHAMAN_ITEM_MANA_SURGE, SPELLVALUE_BASE_POINT0, damage, GetTarget(), true, nullptr, aurEff); GetTarget()->CastCustomSpell(SPELL_SHAMAN_ITEM_MANA_SURGE, SPELLVALUE_BASE_POINT0, damage, GetTarget(), true, nullptr, aurEff);
+1 -1
View File
@@ -182,7 +182,7 @@ public:
bool CheckProc(ProcEventInfo& eventInfo) bool CheckProc(ProcEventInfo& eventInfo)
{ {
return eventInfo.GetDamageInfo()->GetSpellInfo() && eventInfo.GetDamageInfo()->GetSpellInfo()->Id == SPELL_WARRIOR_SPELL_REFLECTION; return eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->Id == SPELL_WARRIOR_SPELL_REFLECTION;
} }
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)