From c8342ca8ce3f49d1c53fa3bfb69f26197e032cc0 Mon Sep 17 00:00:00 2001 From: Rat Date: Sat, 18 Jul 2009 23:22:23 +0200 Subject: *use OriginalVictim for some range based spell casts (only scripts) -fixed void reaver's arcane orb spell, now it is shown in combatlog (cheers to bossmods) --HG-- branch : trunk --- src/game/Unit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/game/Unit.cpp') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 44e27bbd76c..c6154ab0853 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1183,7 +1183,7 @@ void Unit::CastCustomSpell(uint32 spellId, CustomSpellValues const &value, Unit* } // used for scripting -void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem, AuraEffect* triggeredByAura, uint64 originalCaster) +void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, Item *castItem, AuraEffect* triggeredByAura, uint64 originalCaster, Unit* OriginalVictim) { SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId ); @@ -1203,6 +1203,8 @@ void Unit::CastSpell(float x, float y, float z, uint32 spellId, bool triggered, SpellCastTargets targets; targets.setDestination(x, y, z); + if(OriginalVictim) + targets.setUnitTarget(OriginalVictim); spell->m_CastItem = castItem; spell->prepare(&targets, triggeredByAura); } -- cgit v1.2.3