mirror of
https://github.com/Relintai/Relintais-Enemy-Kooldown-Tracker-WotLK.git
synced 2024-11-08 10:12:11 +01:00
Probably fixed dr comparer errors, also possibly fixed other errors.
This commit is contained in:
parent
ca3296c6f6
commit
eafba1fd91
3
Vect.lua
3
Vect.lua
@ -1,8 +1,5 @@
|
|||||||
|
|
||||||
--TODOS:
|
--TODOS:
|
||||||
--Bug: have to check if dr is completed on adding it, also do the same with drs (reassign should update them too, because probably thats the cause for
|
|
||||||
--the comparer error, onupdate is called null out drs while its comparing)
|
|
||||||
|
|
||||||
--Option to show pet cds on possible master (eg spell lock on all locks)
|
--Option to show pet cds on possible master (eg spell lock on all locks)
|
||||||
|
|
||||||
--document the db these will be needed:
|
--document the db these will be needed:
|
||||||
|
51
data/drs.lua
51
data/drs.lua
@ -35,6 +35,7 @@ function Vect:DRDebuffGained(spellID, dstGUID, isPlayer)
|
|||||||
drCat
|
drCat
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Vect:UpdateDRs(dstGUID);
|
||||||
local cd = 18;
|
local cd = 18;
|
||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
local endTime = currentTime + cd;
|
local endTime = currentTime + cd;
|
||||||
@ -90,6 +91,7 @@ function Vect:DRDebuffFaded(spellID, dstGUID, isPlayer)
|
|||||||
drCat
|
drCat
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Vect:UpdateDRs(dstGUID);
|
||||||
local cd = 18;
|
local cd = 18;
|
||||||
local currentTime = GetTime();
|
local currentTime = GetTime();
|
||||||
local endTime = currentTime + cd;
|
local endTime = currentTime + cd;
|
||||||
@ -135,6 +137,8 @@ function Vect:ReassignDRs(which)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not self.drs[self.targets[whichs]] then return end;
|
if not self.drs[self.targets[whichs]] then return end;
|
||||||
|
--update then
|
||||||
|
Vect:UpdateDRs(self.targets[whichs]);
|
||||||
--sort them
|
--sort them
|
||||||
local tmp = Vect:SortDRs(whichs);
|
local tmp = Vect:SortDRs(whichs);
|
||||||
--let's fill them up
|
--let's fill them up
|
||||||
@ -303,35 +307,28 @@ function Vect:MoveDRTimersStop(which)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Vect:VOnDRTimerUpdate(which)
|
function Vect:VOnDRTimerUpdate(which)
|
||||||
--check if we have dr for that unit
|
if Vect:UpdateDRs(self.targets[which]) then
|
||||||
if not self.drs[self.targets[which]] then return end
|
--we have to update every three, because if somebody is targeted and focused since sorting is
|
||||||
local t = GetTime();
|
--implemented it triggers only one update, probably it had bugs before too, but got unnoticed
|
||||||
--let's check if one of the cooldowns finished
|
self:ReassignDRs("targetdr");
|
||||||
for k, v in pairs(self.drs[self.targets[which]]) do
|
self:ReassignDRs("focusdr");
|
||||||
if v[7] == true and v[2] <= t then
|
self:ReassignDRs("selfdr");
|
||||||
self.drs[self.targets[which]][v[8]] = nil;
|
|
||||||
--we have to update every three, because if somebody is targeted and focused since sorting is
|
|
||||||
--implemented it triggers only one update, probably it had bugs before too, but got unnoticed
|
|
||||||
self:ReassignDRs("targetdr");
|
|
||||||
self:ReassignDRs("focusdr");
|
|
||||||
self:ReassignDRs("selfdr");
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Vect:getDRNumXOffset(size, drNumSize, drNumPos)
|
function Vect:UpdateDRs(unitGUID)
|
||||||
local db = Vect.db.profile;
|
if not unitGUID then return end;
|
||||||
|
--check if we have dr for that unit
|
||||||
|
if not self.drs[unitGUID] then return end
|
||||||
return 0;
|
local t = GetTime();
|
||||||
end
|
local found = false;
|
||||||
|
--let's check if one of the cooldowns finished
|
||||||
function Vect:getDRNumYOffset(size, drNumSize, drNumPos)
|
for k, v in pairs(self.drs[unitGUID]) do
|
||||||
local db = Vect.db.profile;
|
if v[7] == true and v[2] <= t then
|
||||||
|
self.drs[unitGUID][v[8]] = nil;
|
||||||
|
fount = true;
|
||||||
return 0;
|
end
|
||||||
|
end
|
||||||
|
return found;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user