feat(Core/SAI): Implement SMART_TARGET_INSTANCE_STORAGE (#14981)

This commit is contained in:
Skjalf
2023-02-12 20:53:20 -03:00
committed by GitHub
parent 2eb1c21216
commit 8a39bd050a
3 changed files with 44 additions and 0 deletions

View File

@@ -422,6 +422,16 @@ bool SmartAIMgr::IsTargetValid(SmartScriptHolder const& e)
}
break;
}
case SMART_TARGET_INSTANCE_STORAGE:
{
if (e.target.instanceStorage.type != 1 && e.target.instanceStorage.type != 2)
{
LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} has invalid instance storage type as target ({}).",
e.entryOrGuid, e.GetScriptType(), e.GetEventType(), e.GetActionType(), e.target.instanceStorage.type);
return false;
}
break;
}
case SMART_TARGET_HOSTILE_SECOND_AGGRO:
case SMART_TARGET_HOSTILE_LAST_AGGRO:
case SMART_TARGET_HOSTILE_RANDOM: