Add Consider.clear function to clear stored mob data

main
AreiaAard 4 years ago
parent 1f7e81c1f3
commit 465e74e0c7

@ -400,6 +400,11 @@ function Consider.initialize()
Consider.keywordCache = {} -- session name-to-keywords record (see Consider.get_mob_keywords) Consider.keywordCache = {} -- session name-to-keywords record (see Consider.get_mob_keywords)
end end
function Consider.clear()
Consider.mobs = {}
Consider.keywordCount = {}
end
function Consider.start() function Consider.start()
local state = tonumber(gmcp("char.status.state")) local state = tonumber(gmcp("char.status.state"))
if not (state == 3 or state == 8) then -- neither active nor in combat if not (state == 3 or state == 8) then -- neither active nor in combat
@ -418,8 +423,7 @@ function Consider.start_CR()
Utility.print("@RTimeout@w. Failed to obtain consider output.") Utility.print("@RTimeout@w. Failed to obtain consider output.")
return return
end end
Consider.mobs = {} Consider.clear()
Consider.keywordCount = {}
EnableTriggerGroup("trigger_group_consider_mobs", true) EnableTriggerGroup("trigger_group_consider_mobs", true)
end end

Loading…
Cancel
Save