*MrSmite's PetAI patch, plus Hawthorne's Instant Flight Paths (now with actual code! >_<)

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-10 09:59:16 -07:00
parent 580b3f8805
commit 5633ea57d1
11 changed files with 407 additions and 27 deletions

View File

@@ -77,6 +77,18 @@ void Pet::AddToWorld()
Unit::AddToWorld();
AIM_Initialize();
}
// MrSmite 09-09-2009 PetAI_v1.1
// Prevent stuck pets when zoning. Pets default to "follow" when added to world
// so we'll reset flags and let the AI handle things
if (this->GetCharmInfo() && this->GetCharmInfo()->HasCommandState(COMMAND_FOLLOW))
{
this->GetCharmInfo()->SetIsCommandAttack(false);
this->GetCharmInfo()->SetIsAtStay(false);
this->GetCharmInfo()->SetIsFollowing(false);
this->GetCharmInfo()->SetIsReturning(false);
}
}
void Pet::RemoveFromWorld()