mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-05 16:39:08 +01:00
*MrSmite's PetAI patch, plus Hawthorne's Instant Flight Paths (now with actual code! >_<)
--HG-- branch : trunk
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user