*Remove puppet when it is killed.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-26 15:29:59 -05:00
parent 4840603510
commit 375be3648e
+3 -3
View File
@@ -320,14 +320,12 @@ Puppet::Puppet(SummonPropertiesEntry const *properties, Unit *owner) : Minion(pr
assert(owner->GetTypeId() == TYPEID_PLAYER);
m_owner = (Player*)owner;
m_summonMask |= SUMMON_MASK_PUPPET;
InitCharmInfo();
}
void Puppet::InitStats(uint32 duration)
{
Minion::InitStats(duration);
m_charmInfo->InitPossessCreateSpells();
SetLevel(m_owner->getLevel());
SetReactState(REACT_PASSIVE);
}
@@ -343,6 +341,8 @@ void Puppet::Update(uint32 time)
//check if caster is channelling?
if(IsInWorld())
{
if(!isAlive())
UnSummon();
}
}