*Add some distance check functions. By VladimirMangos.

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-05-14 16:50:47 -05:00
1 parent 811eee356d
commit 047cc95388
17 files changed
+364 -61

No files matched your search

+1 -1
View File
@@ -1673,7 +1673,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
if (!(options & TELE_TO_NOT_UNSUMMON_PET))
{
//same map, only remove pet if out of range for new position
if(pet && pet->GetDistance(x,y,z) >= OWNER_MAX_DISTANCE)
if(pet && !pet->IsWithinDist3d(x,y,z, OWNER_MAX_DISTANCE))
UnsummonPetTemporaryIfAny();
}