Fixed "should spawn" timers

fixed the timer count in !timers
reimplemented !wb <search>
This commit is contained in:
2022-06-25 13:02:26 +02:00
parent 84a5933490
commit b6b59ef740
4 changed files with 57 additions and 88 deletions
+2 -9
View File
@@ -70,13 +70,6 @@ class TimerController:
t = int(time.time())
count = 0
def getmsg(message):
message = "<tab>" + message + "\n" if message != "No timers cached; please try again later." else ""
nn = 0
if message != "":
nn = 1
return message, nn
data = self.db.query("SELECT t.*, p.name AS char_name FROM timer t "
"LEFT JOIN player p ON t.char_id = p.char_id "
"ORDER BY t.finished_at")
@@ -85,8 +78,8 @@ class TimerController:
blob += "<header>Automatic Timers</header>\n"
blob += self.worldboss.getWBTimer()
x: TimerObj = None
count += len([x for x in self.worldboss.timer_data if (x.time+x.get_respawn_timer()) < x.getTime()])
blob += "\n\n<header>Manual Timers</header>\n"
count += len([x for x in self.worldboss.timer_data if (x.time+x.get_respawn_timer()) > x.getTime()])
blob += "\n<header>Manual Timers</header>\n"
for timer in data:
repeats = ""
if timer.repeating_every > 0: