Core/Sai: Added new error log for action SMART_ACTION_TALK
This commit is contained in:
1 parent
cb2862671b
commit
2838a62264
1 file changed
+15
-1
@@ -700,6 +700,21 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
|
||||
switch (e.GetActionType())
|
||||
{
|
||||
case SMART_ACTION_TALK:
|
||||
{
|
||||
if (e.GetScriptType() == SMART_SCRIPT_TYPE_CREATURE && e.entryOrGuid >= 0)
|
||||
{
|
||||
CreatureTextMap::const_iterator sList = sCreatureTextMgr->GetTextMap().find(e.entryOrGuid);
|
||||
if (sList == sCreatureTextMgr->GetTextMap().end())
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u could not find Text for Creature", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
|
||||
|
||||
CreatureTextHolder const& textHolder = sList->second;
|
||||
CreatureTextHolder::const_iterator itr = textHolder.find(e.action.talk.textGroupID);
|
||||
if (itr == textHolder.end())
|
||||
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u could not find TextGroup %u for Creature", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.talk.textGroupID);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_FACTION:
|
||||
if (e.action.faction.factionID && !sFactionTemplateStore.LookupEntry(e.action.faction.factionID))
|
||||
{
|
||||
@@ -1109,7 +1124,6 @@ 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:
|
||||
case SMART_ACTION_CROSS_CAST:
|
||||
case SMART_ACTION_CALL_RANDOM_TIMED_ACTIONLIST:
|
||||
|
||||
Reference in new issue
Block a user