*Remove puppet when it is killed.
--HG-- branch : trunk
This commit is contained in:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user