From 465e74e0c7079dff6efe288630c1e0a01bc83f55 Mon Sep 17 00:00:00 2001 From: AreiaAard Date: Sun, 18 Apr 2021 14:28:35 -0400 Subject: [PATCH] Add Consider.clear function to clear stored mob data --- areia_consider.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/areia_consider.xml b/areia_consider.xml index a56fdb0..5bcfe55 100644 --- a/areia_consider.xml +++ b/areia_consider.xml @@ -400,6 +400,11 @@ function Consider.initialize() Consider.keywordCache = {} -- session name-to-keywords record (see Consider.get_mob_keywords) end +function Consider.clear() + Consider.mobs = {} + Consider.keywordCount = {} +end + function Consider.start() local state = tonumber(gmcp("char.status.state")) 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.") return end - Consider.mobs = {} - Consider.keywordCount = {} + Consider.clear() EnableTriggerGroup("trigger_group_consider_mobs", true) end