From b46ee65dc02eed481bac08220414bdcde77d1537 Mon Sep 17 00:00:00 2001 From: QAston Date: Mon, 6 Jul 2009 13:36:28 +0200 Subject: *PRevent crash with proc of melee based destination targetted spells. --HG-- branch : trunk --- src/game/Unit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 10867f501c1..33a6c55433f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -12519,8 +12519,8 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag // Player is loaded now - do not allow passive spell casts to proc if (GetTypeId() == TYPEID_PLAYER && ((Player*)this)->GetSession()->PlayerLoading()) return; - // For melee/ranged based attack need update skills and set some Aura states - if (procFlag & MELEE_BASED_TRIGGER_MASK) + // For melee/ranged based attack need update skills and set some Aura states if victim present + if (procFlag & MELEE_BASED_TRIGGER_MASK && pTarget) { // Update skills here for players if (GetTypeId() == TYPEID_PLAYER) -- cgit v1.2.3