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:
1 parent
f04bddcbd0
commit
090951ba71
2 files changed
+28
No files matched your search
@@ -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());
|
||||
|
||||
|
||||
Reference in new issue
Block a user