Core/SAI: Implemented new action SMART_ACTION_CREDIT_QUEST_OBJECTIVE_TALK_TO
Port From (https://github.com/TrinityCore/TrinityCore/commit/9261140c9ddc5b15bc2e0abe9d8755552ae74d82)
This commit is contained in:
@@ -816,6 +816,7 @@ namespace Game.AI
|
||||
SmartActions.TriggerGameEvent => Marshal.SizeOf(typeof(SmartAction.TriggerGameEvent)),
|
||||
SmartActions.DoAction => Marshal.SizeOf(typeof(SmartAction.DoAction)),
|
||||
SmartActions.CompleteQuest => Marshal.SizeOf(typeof(SmartAction.Quest)),
|
||||
SmartActions.CreditQuestObjectiveTalkTo => 0,
|
||||
_ => Marshal.SizeOf(typeof(SmartAction.Raw)),
|
||||
};
|
||||
|
||||
@@ -2189,6 +2190,7 @@ namespace Game.AI
|
||||
break;
|
||||
}
|
||||
case SmartActions.CompleteQuest:
|
||||
{
|
||||
Quest quest = Global.ObjectMgr.GetQuestTemplate(e.Action.quest.questId);
|
||||
if (quest != null)
|
||||
{
|
||||
@@ -2204,6 +2206,16 @@ namespace Game.AI
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SmartActions.CreditQuestObjectiveTalkTo:
|
||||
{
|
||||
if (e.GetScriptType() != SmartScriptType.Creature)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} uses non-valid SourceType (only valid for SourceType {SmartScriptType.Creature}), skipped.");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// No longer supported
|
||||
case SmartActions.CallAreaexploredoreventhappens:
|
||||
case SmartActions.CallGroupeventhappens:
|
||||
|
||||
Reference in New Issue
Block a user