Fix NPC swarm pets despawning on owner death

Fix NPC swarm pets IsAttackAllowed logic
This commit is contained in:
Michael Cook (mackal)
2014-03-05 23:02:57 -05:00
parent 3d5f99e14a
commit 822a1b1003
2 changed files with 11 additions and 12 deletions
+3 -12
View File
@@ -123,21 +123,12 @@ void NPC::SpellProcess()
{
Mob::SpellProcess();
if(GetSwarmInfo()){
Mob *swp_o = GetSwarmInfo()->GetOwner();
if(!swp_o)
{
if (GetSwarmInfo()) {
if (GetSwarmInfo()->duration->Check(false))
Depop();
}
if(GetSwarmInfo()->duration->Check(false))
{
Depop();
}
Mob *targMob = entity_list.GetMob(GetSwarmInfo()->target);
if(GetSwarmInfo()->target != 0)
{
if (GetSwarmInfo()->target != 0) {
if(!targMob || (targMob && targMob->IsCorpse()))
Depop();
}