From adc10d23bb0a47dab3ee1cd5b8083dd68dbf74f1 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 6 May 2016 15:44:01 +0200 Subject: [PATCH] Cleanup on PLAYER_ENTER_WORLD done. --- Vect.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Vect.lua b/Vect.lua index a3c0909..3ac2de0 100644 --- a/Vect.lua +++ b/Vect.lua @@ -1,7 +1,8 @@ --TODOS: ---Player Entering World -> cleanup the db --DR timers +--Way to show pet cds on the master +--Mark movable frames to know which is which --"Globals" local aceDB = LibStub("AceDB-3.0") @@ -144,7 +145,16 @@ function Vect:PLAYER_FOCUS_CHANGED() end function Vect:PLAYER_ENTERING_WORLD() - --TODO clean up the db + --DB cleanup + local t = GetTime(); + for k, v in pairs(Vect.cds) do + for i, j in pairs(v) do + if j[2] < t then + --self:Print(Vect.cds[k][i][4]); + Vect.cds[k][i] = nil; + end + end + end end function Vect:ZONE_CHANGED_NEW_AREA()