Core/SAI: Change SmartScript.GetTargets to return an ObjectList
Port From (https://github.com/TrinityCore/TrinityCore/commit/259bde591444980c27a17524c140f078c4159f55)
This commit is contained in:
@@ -220,7 +220,7 @@ namespace Game.AI
|
||||
else
|
||||
GetScript().SetPathId(0);
|
||||
|
||||
List<WorldObject> targets = GetScript().GetTargetList(SharedConst.SmartEscortTargets);
|
||||
List<WorldObject> targets = GetScript().GetStoredTargetList(SharedConst.SmartEscortTargets, me);
|
||||
if (targets != null && mEscortQuestID != 0)
|
||||
{
|
||||
if (targets.Count == 1 && GetScript().IsPlayer(targets.First()))
|
||||
@@ -386,7 +386,7 @@ namespace Game.AI
|
||||
|
||||
bool IsEscortInvokerInRange()
|
||||
{
|
||||
var targets = GetScript().GetTargetList(SharedConst.SmartEscortTargets);
|
||||
var targets = GetScript().GetStoredTargetList(SharedConst.SmartEscortTargets, me);
|
||||
if (targets != null)
|
||||
{
|
||||
float checkDist = me.GetInstanceScript() != null ? SMART_ESCORT_MAX_PLAYER_DIST * 2 : SMART_ESCORT_MAX_PLAYER_DIST;
|
||||
|
||||
Reference in New Issue
Block a user