diff options
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r-- | src/game/Pet.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index e6dcf0ed19c..1578bd5badd 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -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() |