mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
fix(Core/Spells): add several missing null checks for the DamageInfo struct to fix a crash (#8322)
This commit is contained in:
@@ -2971,8 +2971,15 @@ public:
|
||||
|
||||
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
int32 damage = CalculatePct(int32(eventInfo.GetDamageInfo()->GetDamage()), 60);
|
||||
GetTarget()->CastCustomSpell(SPELL_GRIM_REPRISAL_DAMAGE, SPELLVALUE_BASE_POINT0, damage, eventInfo.GetDamageInfo()->GetAttacker(), true, nullptr, aurEff);
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
|
||||
if (!damageInfo || !damageInfo->GetDamage())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int32 damage = CalculatePct(static_cast<int32>(damageInfo->GetDamage()), 60);
|
||||
GetTarget()->CastCustomSpell(SPELL_GRIM_REPRISAL_DAMAGE, SPELLVALUE_BASE_POINT0, damage, damageInfo->GetAttacker(), true, nullptr, aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
Reference in New Issue
Block a user