aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorspp <none@none>2009-12-14 01:51:12 +0100
committerspp <none@none>2009-12-14 01:51:12 +0100
commit5d988a617f1530f5dda02632bf9de19d12fe17c3 (patch)
tree0519297c19f204dff8bab7d12d3f5353788b321c /src/game/Unit.cpp
parentfa1467e9fe34e78751f984a10ffafc056863ec65 (diff)
Fix Dancing Rune Weapon. By liberate, closes #365
--HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 7cdc513535f..4b9d8f47dc7 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -6852,9 +6852,22 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger
// 1 dummy aura for dismiss rune blade
if (effIndex != 2)
return false;
- // TODO: write script for this "fights on its own, doing the same attacks"
- // NOTE: Trigger here on every attack and spell cast
- return false;
+ uint64 PetGUID = NULL;
+ for (ControlList::const_iterator itr = m_Controlled.begin(); itr != m_Controlled.end(); ++itr) //Find Rune Weapon
+ if ((*itr)->GetEntry() == 27893)
+ {
+ PetGUID = (*itr)->GetGUID();
+ break;
+ }
+
+ if (PetGUID && pVictim && damage && procSpell)
+ {
+ int32 procDmg = damage / 2;
+ CastCustomSpell(pVictim, procSpell->Id, &procDmg, NULL, NULL, true, NULL, NULL, PetGUID);
+ break;
+ }
+ else
+ return false;
}
// Mark of Blood
if (dummySpell->Id == 49005)