aboutsummaryrefslogtreecommitdiff
path: root/src/game/Pet.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-09-10 09:59:16 -0700
committermaximius <none@none>2009-09-10 09:59:16 -0700
commit5633ea57d11e23d8609994bd2ee9cdf7e36ed5e7 (patch)
tree7518b778737a45d768b1f67edaef5bffcbb105c2 /src/game/Pet.cpp
parent580b3f8805bf307fe057ea852aa469fe9f5e4848 (diff)
*MrSmite's PetAI patch, plus Hawthorne's Instant Flight Paths (now with actual code! >_<)
--HG-- branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r--src/game/Pet.cpp12
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()