mirror of
https://github.com/mangosfour/server.git
synced 2025-12-22 13:37:08 +00:00
[7828] Add 2d/3d versions for WorldObject::IsInRange(x,y,... and WorldObject::IsWithinDist(x,y,...
This commit is contained in:
parent
592db69c0c
commit
42d74d811f
3 changed files with 44 additions and 12 deletions
|
|
@ -433,7 +433,8 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
return IsInWorld() && obj->IsInWorld() && GetMapId()==obj->GetMapId() &&
|
||||
GetInstanceId()==obj->GetInstanceId() && InSamePhase(obj);
|
||||
}
|
||||
bool IsWithinDist(float x, float y, float z, float dist2compare, bool is3D = true) const;
|
||||
bool IsWithinDist(float x, float y, float z, float dist2compare) const;
|
||||
bool IsWithinDist2d(float x, float y, float dist2compare) const;
|
||||
bool _IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D) const;
|
||||
bool IsWithinDist(WorldObject const* obj, float dist2compare, bool is3D = true) const
|
||||
// use only if you will sure about placing both object at same map
|
||||
|
|
@ -447,8 +448,9 @@ class MANGOS_DLL_SPEC WorldObject : public Object
|
|||
bool IsWithinLOS(float x, float y, float z) const;
|
||||
bool IsWithinLOSInMap(const WorldObject* obj) const;
|
||||
bool GetDistanceOrder(WorldObject const* obj1, WorldObject const* obj2, bool is3D = true) const;
|
||||
bool IsInRange(WorldObject const* obj, float minRange, float maxRange) const;
|
||||
bool IsInRange(WorldObject const* obj, float minRange, float maxRange, bool is3D = true) const;
|
||||
bool IsInRange2d(float x, float y, float minRange, float maxRange) const;
|
||||
bool IsInRange(float x, float y, float z, float minRange, float maxRange) const;
|
||||
|
||||
float GetAngle( const WorldObject* obj ) const;
|
||||
float GetAngle( const float x, const float y ) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue