WoWInterface SVN MyThreat

Compare Revisions

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

Rev 30 → Rev 31

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