*Fix the bug that noncombat pet does not follow owner.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-04-11 16:06:48 -05:00
parent 06a8f2a7d1
commit 78d6659270

View File

@@ -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 );