aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <none@none>2009-07-06 13:36:28 +0200
committerQAston <none@none>2009-07-06 13:36:28 +0200
commitb46ee65dc02eed481bac08220414bdcde77d1537 (patch)
tree7101bca917e633bc28b509333d4c2066a0a19cf0
parent6ee9ed44783436cddc2875096848ec90441e53e0 (diff)
*PRevent crash with proc of melee based destination targetted spells.
--HG-- branch : trunk
-rw-r--r--sql/updates/4371_world_spell_linked_spell.sql5
-rw-r--r--src/game/Unit.cpp4
2 files changed, 7 insertions, 2 deletions
diff --git a/sql/updates/4371_world_spell_linked_spell.sql b/sql/updates/4371_world_spell_linked_spell.sql
new file mode 100644
index 00000000000..ea6fc9a8f45
--- /dev/null
+++ b/sql/updates/4371_world_spell_linked_spell.sql
@@ -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'); \ No newline at end of file
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)