Core/SmartAI: added SMART_ACTION_SIMPLE_TALK, param1: textID, uses the 'Targets' to say the text,

NOTE: textID is relative to the current target's entry OR if target is a player, text is used with source creature's entry

--HG--
branch : trunk
This commit is contained in:
Rat
2010-11-05 19:38:43 +01:00
parent 7956bc8c44
commit be25e38144
5 changed files with 29 additions and 11 deletions

View File

@@ -488,9 +488,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
switch (e.GetActionType())
{
case SMART_ACTION_TALK:
//if (!IsTextValid(e, e.action.talk.textGroupID)) return false;//can use other creatures texts too!
break;
case SMART_ACTION_SET_FACTION:
if (e.action.faction.factionID && !sFactionStore.LookupEntry(e.action.faction.factionID))
{
@@ -752,6 +749,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder &e)
case SMART_ACTION_SET_NPC_FLAG:
case SMART_ACTION_ADD_NPC_FLAG:
case SMART_ACTION_REMOVE_NPC_FLAG:
case SMART_ACTION_TALK:
case SMART_ACTION_SIMPLE_TALK:
break;
default:
sLog.outErrorDb("SmartAIMgr: Not handled action_type(%u), Entry %d SourceType %u Event %u, skipped.", e.GetActionType(), e.GetEventType(), e.entryOrGuid, e.GetScriptType(), e.event_id);