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:
Rat
2010-11-01 11:00:53 +01:00
parent e68c149e69
commit d568fcf273
4 changed files with 38 additions and 40 deletions

View File

@@ -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))