aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-04-20 14:23:00 +0200
committerQAston <none@none>2009-04-20 14:23:00 +0200
commit4ac0914d81ebad67b63e3b093117cc67cb717d81 (patch)
treeec723d8a1a3151f7cb51bb060025c143556f0ab7 /src/game/Unit.cpp
parent9ddd7cf660fc73f2a3963a0f88c16f7d1d823a41 (diff)
*Change totem cast handling, use owner guid as m_originalCaster by default.
*Check range for formal caster instead of original one --HG-- branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index efdff7d7540..d61d5731835 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -979,6 +979,11 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
return;
}
+ if (!originalCaster && GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem())
+ if (Unit * owner = GetOwner())
+ if (owner->GetTypeId()==TYPEID_PLAYER)
+ originalCaster=owner->GetGUID();
+
SpellCastTargets targets;
uint32 targetMask = spellInfo->Targets;
//if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2))