Skip to content

Commit

Permalink
Unit: Add nullptr check for caster
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Mar 15, 2024
1 parent faa3d96 commit d093f4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/Entities/Unit.cpp
Expand Up @@ -8076,7 +8076,7 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellSchoolMask schoolMask, Spe
AuraList const& mOwnerTaken = GetAurasByType(SPELL_AURA_MOD_DAMAGE_FROM_CASTER);
for (auto i : mOwnerTaken)
{
if (i->GetCasterGuid() == caster->GetObjectGuid() && i->isAffectedOnSpell(spellInfo))
if (caster && i->GetCasterGuid() == caster->GetObjectGuid() && i->isAffectedOnSpell(spellInfo))
TakenTotalMod *= (i->GetModifier()->m_amount + 100.0f) / 100.0f;
}

Expand Down

0 comments on commit d093f4e

Please sign in to comment.