mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 20:52:22 -04:00
Core/SmartAI: remade 'Say' handler, more simple, more usable, you can now script multiple npc conversations from one script
-also added 'entry' to text_over event --HG-- branch : trunk
This commit is contained in:
@@ -426,7 +426,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder e)
|
||||
break;
|
||||
}
|
||||
case SMART_EVENT_TEXT_OVER:
|
||||
if (e.event.textOver.textGroupID && !IsTextValid(e, e.event.textOver.textGroupID)) return false;
|
||||
//if (e.event.textOver.textGroupID && !IsTextValid(e, e.event.textOver.textGroupID)) return false;// 0 is a valid text group!
|
||||
break;
|
||||
case SMART_EVENT_LINK:
|
||||
{
|
||||
@@ -476,13 +476,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder e)
|
||||
switch (e.GetActionType())
|
||||
{
|
||||
case SMART_ACTION_TALK:
|
||||
if (!IsTextValid(e, e.action.talk.textGroupID1)) return false;
|
||||
if (e.action.talk.textGroupID2 && !IsTextValid(e, e.action.talk.textGroupID2)) return false;
|
||||
if (e.action.talk.textGroupID3 && !IsTextValid(e, e.action.talk.textGroupID3)) return false;
|
||||
if (e.action.talk.textGroupID4 && !IsTextValid(e, e.action.talk.textGroupID4)) return false;
|
||||
if (e.action.talk.textGroupID5 && !IsTextValid(e, e.action.talk.textGroupID5)) return false;
|
||||
if (e.action.talk.textGroupID6 && !IsTextValid(e, e.action.talk.textGroupID6)) return false;
|
||||
|
||||
//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))
|
||||
|
||||
Reference in New Issue
Block a user