Core/Players: Cast Summon Pet on first login, relocate created pets

*Casts a proper Summon Pet spell on a hunter logging in for the first
time (depending on his race).
*Relocates created tamed pets before they're added to map.
This commit is contained in:
Mihapro committed 2013-05-11 22:12:11 +02:00
1 parent f04bddcbd0
commit 090951ba71
2 files changed
+28

No files matched your search

+5
View File
@@ -5460,6 +5460,11 @@ void Spell::EffectCreateTamedPet(SpellEffIndex effIndex)
if (!pet)
return;
// relocate
float px, py, pz;
unitTarget->GetClosePoint(px, py, pz, pet->GetObjectSize(), PET_FOLLOW_DIST, pet->GetFollowAngle());
pet->Relocate(px, py, pz, unitTarget->GetOrientation());
// add to world
pet->GetMap()->AddToMap(pet->ToCreature());