mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Spells): add several missing null checks for the DamageInfo struct to fix a crash (#8322)
This commit is contained in:
@@ -144,9 +144,10 @@ public:
|
||||
// Xinef: no _procTarget but checkproc passed??
|
||||
// Unit::CalculateAOEDamageReduction (this=0x0, damage=4118, schoolMask=1, caster=0x7ffdad089000)
|
||||
Unit* procTarget = ObjectAccessor::GetUnit(*GetTarget(), _procTargetGUID);
|
||||
if (procTarget && eventInfo.GetDamageInfo())
|
||||
DamageInfo* damageInfo = eventInfo.GetDamageInfo();
|
||||
if (procTarget && damageInfo)
|
||||
{
|
||||
int32 damage = eventInfo.GetDamageInfo()->GetUnmitigatedDamage();
|
||||
int32 damage = damageInfo->GetUnmitigatedDamage();
|
||||
|
||||
CustomSpellValues values;
|
||||
values.AddSpellMod(SPELLVALUE_BASE_POINT0, damage);
|
||||
|
||||
Reference in New Issue
Block a user