*PRevent crash with proc of melee based destination targetted spells.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-06 13:36:28 +02:00
parent 6ee9ed4478
commit b46ee65dc0
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (48384, 48395, 48396);
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
(48384, 50170, 2, 'Improved Moonkin Form'),
(48395, 50171, 2, 'Improved Moonkin Form'),
(48396, 50172, 2, 'Improved Moonkin Form');

View File

@@ -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)