mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-03 11:03:47 +00:00
fix(Core/Spells): add several missing null checks for the DamageInfo struct to fix a crash - Part II. (#8376)
This commit is contained in:
@@ -1059,15 +1059,16 @@ public:
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && procSpell && procSpell->SpellIconID != 2731; // Xinef: Mark of the Fallen Champion
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
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)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
Unit* victim = eventInfo.GetActionTarget();
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
SpellInfo const* procSpell = eventInfo.GetSpellInfo();
|
||||
|
||||
//uint32 markCount = 0;
|
||||
//if (Creature* saurfang = eventInfo.GetActor()->ToCreature())
|
||||
@@ -1091,7 +1092,6 @@ public:
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_deathbringer_blood_link_AuraScript::CheckProc);
|
||||
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);
|
||||
}
|
||||
};
|
||||
@@ -1113,8 +1113,9 @@ public:
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
return eventInfo.GetActor() && eventInfo.GetActionTarget() && (eventInfo.GetDamageInfo()->GetDamage() || eventInfo.GetHitMask() & PROC_EX_ABSORB) && (!procSpell || procSpell->SpellIconID != 2731); // Xinef: Mark of the Fallen Champion
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
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)
|
||||
|
||||
@@ -947,7 +947,7 @@ public:
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
const SpellInfo* spellInfo = eventInfo.GetDamageInfo()->GetSpellInfo();
|
||||
const SpellInfo* spellInfo = eventInfo.GetSpellInfo();
|
||||
if (!spellInfo)
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user