*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); assert(owner->GetTypeId() == TYPEID_PLAYER);
m_owner = (Player*)owner; m_owner = (Player*)owner;
m_summonMask |= SUMMON_MASK_PUPPET; m_summonMask |= SUMMON_MASK_PUPPET;
InitCharmInfo();
} }
void Puppet::InitStats(uint32 duration) void Puppet::InitStats(uint32 duration)
{ {
Minion::InitStats(duration); Minion::InitStats(duration);
SetLevel(m_owner->getLevel());
m_charmInfo->InitPossessCreateSpells();
SetReactState(REACT_PASSIVE); SetReactState(REACT_PASSIVE);
} }
@@ -343,6 +341,8 @@ void Puppet::Update(uint32 time)
//check if caster is channelling? //check if caster is channelling?
if(IsInWorld()) if(IsInWorld())
{ {
if(!isAlive())
UnSummon();
} }
} }