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

* Thanks to joshwhedon
* Updates: https://github.com/TrinityCore/TrinityCore/issues/24439
This commit is contained in:
Rushor
2020-04-26 21:30:03 +02:00
committed by GitHub
parent 7e9bc9599b
commit a41bb4f77b

View File

@@ -2646,7 +2646,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) && baseObject->IsInRange(unit, float(e.target.goRange.minDist), float(e.target.goRange.maxDist)))
if ((!e.target.goRange.entry || unit->ToGameObject()->GetEntry() == e.target.goRange.entry) && baseObject->IsInRange(unit, float(e.target.goRange.minDist), float(e.target.goRange.maxDist)))
targets.push_back(unit);
}