WoWInterface SVN MyThreat

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 31 to Rev 29
    Reverse comparison

Rev 31 → Rev 29

MyThreat/MyThreat.lua
309,6 → 309,8
MyThreat.threatSourceHandler = nil;
MyThreat.lastUpdate = 0;
 
MyThreat.targetGuid = nil;
 
MyThreat.test = false;
 
MyThreat.focusMode = false;
374,7 → 376,7
-- Called when the addon is enabled
MyThreat:RegisterEvent("PLAYER_TARGET_CHANGED");
MyThreat:RegisterEvent("PARTY_MEMBERS_CHANGED");
MyThreat:RegisterEvent("UNIT_THREAT_LIST_UPDATE");
MyThreat:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
 
MyThreat:UpdateFontSize();
 
390,7 → 392,7
 
MyThreat:UnregisterEvent("PLAYER_TARGET_CHANGED");
MyThreat:UnregisterEvent("PARTY_MEMBERS_CHANGED");
MyThreat:UnregisterEvent("UNIT_THREAT_LIST_UPDATE");
MyThreat:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
 
end
 
861,7 → 863,7
 
if (currentTankName ~= nil) then
 
playerThreat, _, adjusted = MyThreat:GetThreat("player", "target");
local playerThreat, _, adjusted = MyThreat:GetThreat("player", "target");
 
if (playerThreat ~= nil) then
 
909,7 → 911,7
 
if (currentTrailing ~= nil) then
 
playerThreat, _, adjusted = MyThreat:GetThreat("player", "target");
local playerThreat, _, adjusted = MyThreat:GetThreat("player", "target");
 
if (playerThreat ~= nil) then
 
954,7 → 956,7
 
if (currentLowestFocus ~= nil) then
 
playerThreat, _, adjusted = MyThreat:GetThreat("player", "target");
local playerThreat, _, adjusted = MyThreat:GetThreat("player", "target");
 
if (playerThreat ~= nil) then
 
987,19 → 989,20
 
function MyThreat:PLAYER_TARGET_CHANGED()
 
MyThreat.targetGuid = UnitGUID("target");
MyThreat:Process();
 
end
 
--------------------------------------------------------------------------
 
function MyThreat:UNIT_THREAT_LIST_UPDATE(_, unitId)
function MyThreat:COMBAT_LOG_EVENT_UNFILTERED(_, _, _, srcGuid, _, _, destGuid)
 
local cTime = GetTime();
 
if ((cTime - MyThreat.lastUpdate) > 0.125) then
if ((cTime - MyThreat.lastUpdate) > 0.250) then
 
if (unitId == "target") then
if (MyThreat.targetGuid ~= nil and (destGuid == MyThreat.targetGuid or srcGuid == MyThreat.targetGuid)) then
 
MyThreat:Process();
MyThreat.lastUpdate = cTime;