Core/SAI: Add SAI action to create a conversation

Port From (https://github.com/TrinityCore/TrinityCore/commit/0996d60944dba87f89f393541c009dedeccb45a4)
This commit is contained in:
hondacrx
2021-03-04 13:38:23 -05:00
parent 7b11540032
commit b2041b1a58
3 changed files with 44 additions and 6 deletions
@@ -1328,6 +1328,16 @@ namespace Game.AI
return false;
}
break;
}
case SmartActions.CreateConversation:
{
if (Global.ConversationDataStorage.GetConversationTemplate(e.Action.conversation.id) == null)
{
Log.outError(LogFilter.Sql, $"SmartAIMgr: SMART_ACTION_CREATE_CONVERSATION Entry {e.entryOrGuid} SourceType {e.GetScriptType()} Event {e.event_id} Action {e.GetActionType()} uses invalid entry {e.Action.conversation.id}, skipped.");
return false;
}
break;
}
case SmartActions.StartClosestWaypoint:
@@ -2417,6 +2427,9 @@ namespace Game.AI
[FieldOffset(4)]
public SpellVisualKit spellVisualKit;
[FieldOffset(4)]
public Conversation conversation;
[FieldOffset(4)]
public Raw raw;
@@ -2929,6 +2942,10 @@ namespace Game.AI
public uint kitType;
public uint duration;
}
public struct Conversation
{
public uint id;
}
public struct Raw
{
public uint param1;