* fixed endless loop in ProcessChatAI script when no chat message handlers were added and a message came in. thx bLuma!

This commit is contained in:
false_genesis 2008-02-23 23:11:42 +00:00
parent a9893d2957
commit 1d26aa8eb8

View File

@ -42,6 +42,11 @@ return ${amount}
// returns: false if the incoming chatmessage was invalid, else true // returns: false if the incoming chatmessage was invalid, else true
// TODO: get object name (player or creature) and pass it to the called scripts // TODO: get object name (player or creature) and pass it to the called scripts
// if the list doesnt exist, it will return "", but this counts as false also
if ?{not ?{llen pattern_list}}
return
endif
// filter out chat messages that came from us // filter out chat messages that came from us
if ?{equal,${@myguid} ${@2}} if ?{equal,${@myguid} ${@2}}
return false return false
@ -72,7 +77,7 @@ set,i 0
set,len ?{llen pattern_list} set,len ?{llen pattern_list}
loop loop
if ?{equal,${i} ${len}} if ?{bigger_eq,${i} ${len}}
exitloop exitloop
endif endif