mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-19 08:30:34 +01:00
Entities/GO: FindNearestGameObject no longer incorrectly returns despawned gameobjects. Closes #23262.
(cherry picked from commit 4423ca99e7)
This commit is contained in:
@@ -797,7 +797,7 @@ namespace Trinity
|
||||
|
||||
bool operator()(GameObject* go)
|
||||
{
|
||||
if (go->GetEntry() == i_entry && go->GetGUID() != i_obj.GetGUID() && i_obj.IsWithinDistInMap(go, i_range))
|
||||
if (go->isSpawned() && go->GetEntry() == i_entry && go->GetGUID() != i_obj.GetGUID() && 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;
|
||||
|
||||
Reference in New Issue
Block a user