mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 13:37:08 +00:00
[6977] Fixed a crash caused by incorrect use of GetMap for corpses in other maps, and another one caused by SelectHostilTarget failing to notice the target is not in world, due to a fauly InSameMap check.
This commit is contained in:
parent
75b1db8cd0
commit
07394d45da
3 changed files with 3 additions and 3 deletions
|
|
@ -416,7 +416,7 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
float GetDistance2d(const WorldObject* obj) const;
|
||||
float GetDistance2d(const float x, const float y) const;
|
||||
float GetDistanceZ(const WorldObject* obj) const;
|
||||
bool IsInMap(const WorldObject* obj) const { return GetMapId()==obj->GetMapId() && GetInstanceId()==obj->GetInstanceId(); }
|
||||
bool IsInMap(const WorldObject* obj) const { return IsInWorld() && obj->IsInWorld() && GetMapId()==obj->GetMapId() && GetInstanceId()==obj->GetInstanceId(); }
|
||||
bool IsWithinDistInMap(const WorldObject* obj, const float dist2compare, const bool is3D = true) const;
|
||||
bool IsWithinLOS(const float x, const float y, const float z ) const;
|
||||
bool IsWithinLOSInMap(const WorldObject* obj) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue