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:
Hondacrx
2024-11-11 11:02:05 -05:00
parent c3d7e5adb3
commit 83eace222c
3 changed files with 28 additions and 0 deletions
@@ -2559,6 +2559,21 @@ namespace Game.AI
break;
}
case SmartActions.CreditQuestObjectiveTalkTo:
{
if (_me == null)
break;
foreach (WorldObject target in targets)
{
Player player = target?.ToPlayer();
if (player == null)
continue;
player.TalkedToCreature(_me.GetEntry(), _me.GetGUID());
}
break;
}
default:
Log.outError(LogFilter.Sql, "SmartScript.ProcessAction: Entry {0} SourceType {1}, Event {2}, Unhandled Action type {3}", e.EntryOrGuid, e.GetScriptType(), e.EventId, e.GetActionType());
break;