*Add some distance check functions. By VladimirMangos.

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

View File

@@ -775,9 +775,7 @@ void WorldSession::HandleCorpseReclaimOpcode(WorldPacket &recv_data)
if(corpse->GetGhostTime() + GetPlayer()->GetCorpseReclaimDelay(corpse->GetType()==CORPSE_RESURRECTABLE_PVP) > time(NULL))
return;
float dist = corpse->GetDistance2d(GetPlayer());
sLog.outDebug("Corpse 2D Distance: \t%f",dist);
if (dist > CORPSE_RECLAIM_RADIUS)
if (!corpse->IsWithinDist(GetPlayer(),CORPSE_RECLAIM_RADIUS,false))
return;
uint64 guid;