aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-11 16:06:48 -0500
committermegamage <none@none>2009-04-11 16:06:48 -0500
commit78d665927025529155a1269c257f2619082d70ab (patch)
treee18bbc6a9e0bc15f09e43ce3de22a284a1daa05c /src/game/SpellEffects.cpp
parent06a8f2a7d18cbe840096e05f8fe29e5e582bf31e (diff)
*Fix the bug that noncombat pet does not follow owner.
--HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d9ca84c18ae..7d5fe3d8116 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5720,6 +5720,8 @@ void Spell::EffectSummonCritter(uint32 i)
critter->SetReactState(REACT_PASSIVE);
critter->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
+ critter->GetMotionMaster()->MoveTargetedHome();
+
std::string name = player->GetName();
name.append(petTypeSuffix[3]);
critter->SetName( name );