mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
*Fix a bug in NearestGameObjectCheck.
--HG-- branch : trunk
This commit is contained in:
@@ -655,8 +655,12 @@ namespace Trinity
|
||||
NearestGameObjectCheck(WorldObject const& obj) : i_obj(obj), i_range(999) {}
|
||||
bool operator()(GameObject* go)
|
||||
{
|
||||
i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
|
||||
return true;
|
||||
if(i_obj.IsWithinDistInMap(go, i_range))
|
||||
{
|
||||
i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
float GetLastRange() const { return i_range; }
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user