Game/AI: Enable check for SMART_TARGET_GAMEOBJECT_RANGE (#24493)

* Thanks to joshwhedon
* Updates: https://github.com/TrinityCore/TrinityCore/issues/24439

(cherry picked from commit a41bb4f77b)
This commit is contained in:
Rushor
2020-04-26 21:30:03 +02:00
committed by Shauren
parent 88b898b92c
commit ecd6bce5d2

View File

@@ -2854,7 +2854,7 @@ void SmartScript::GetTargets(ObjectVector& targets, SmartScriptHolder const& e,
if (go && go->GetGUID() == unit->GetGUID())
continue;
if ((!e.target.goRange.entry && unit->ToGameObject()->GetEntry() == e.target.goRange.entry) && ref->IsInRange(unit, float(e.target.goRange.minDist), float(e.target.goRange.maxDist)))
if ((!e.target.goRange.entry || unit->ToGameObject()->GetEntry() == e.target.goRange.entry) && ref->IsInRange(unit, float(e.target.goRange.minDist), float(e.target.goRange.maxDist)))
targets.push_back(unit);
}