*Change totem cast handling, use owner guid as m_originalCaster by default.

*Check range for formal caster instead of original one

--HG--
branch : trunk
This commit is contained in:
QAston
2009-04-20 14:23:00 +02:00
parent 9ddd7cf660
commit 4ac0914d81
2 changed files with 9 additions and 8 deletions
+5
View File
@@ -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))