Quantcast
WoWInterface: SVN - ZoneTimer - Path Comparison - / Rev 5 and / Rev 6

WoWInterface SVN ZoneTimer

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 5 to Rev 6
    Reverse comparison

Rev 5 → Rev 6

trunk/ZoneTimer/ZoneTimer.lua
20,6 → 20,7
None
 
-- Changes
1.3.0 - Updated for 3.0
1.23 - Updated TOC for 2.4
1.22 - Updated TOC for 2.1
1.21 - Updated TOC for 2.0
38,35 → 39,39
 
]]--
 
local ZT = {
Version = GetAddOnMetadata("ZoneTimer", "Version");
Revision = tonumber(strsub("$Rev$", 7, strlen("$Rev$") - 2));
Time = 0.01;
}
ZoneTimer = {
 
function ZoneTimer_OnEvent()
if ( event == "PLAYER_ENTERING_WORLD" ) then
local t = GetTime() - ZT.Time
local c = "00cc00"
Setting = {
Version = GetAddOnMetadata("ZoneTimer", "Version");
Revision = tonumber(strsub("$Rev$", 7, strlen("$Rev$") - 2));
Time = 0.01;
},
 
if ( t > 10 ) then
c = "ff0000"
elseif ( t > 5 ) then
c = "ffff00"
end
OnEvent = function ()
if ( event == "PLAYER_ENTERING_WORLD" ) then
local t = GetTime() - ZoneTimer.Setting.Time
local c = "00cc00"
 
if ( t > .01 ) then
DEFAULT_CHAT_FRAME:AddMessage(string.format("|cffffd100ZoneTimer:|r |cff"..c.."%.3f Seconds|r", t))
end
elseif ( event == "PLAYER_LEAVING_WORLD" ) then
ZT.Time = GetTime()
this:RegisterEvent("PLAYER_ENTERING_WORLD")
end
end
if ( t > 10 ) then
c = "ff0000"
elseif ( t > 5 ) then
c = "ffff00"
end
 
if ( t > .01 ) then
DEFAULT_CHAT_FRAME:AddMessage(string.format("|cffffd100ZoneTimer:|r |cff"..c.."%.3f Seconds|r", t))
end
elseif ( event == "PLAYER_LEAVING_WORLD" ) then
ZoneTimer.Setting.Time = GetTime()
this:RegisterEvent("PLAYER_ENTERING_WORLD")
end
end,
 
}
 
if (not ZoneTimerFrame) then
CreateFrame("Frame", "ZoneTimerFrame")
end
ZoneTimerFrame:Hide()
ZoneTimerFrame:SetScript("OnEvent", ZoneTimer_OnEvent)
ZoneTimerFrame:RegisterEvent("PLAYER_LEAVING_WORLD")
\ No newline at end of file + local frame = CreateFrame("Frame", "ZoneTimerFrame") + frame:Hide() + frame:SetScript("OnEvent", ZoneTimer.OnEvent) + frame:RegisterEvent("PLAYER_LEAVING_WORLD") +end \ No newline at end of file
trunk/ZoneTimer/ZoneTimer.toc
1,14 → 1,9
## Interface: 30000
## Version: 1.23
## Version: 1.3.0
## Title: ZoneTimer
## Notes: Displays how long it takes to zone in seconds.
## Notes-zhCN:
## Notes-deDE:
## Notes-esES:
## Notes-frFR:
## Notes-enGB:
## Notes-koKR:
## Notes-ruRU:
## Notes-zhTW:
## Author: Ryan "Gryphon" Snook
## X-Category: Miscellaneous
## X-Email: rsnook@gmail.com
## X-Website: http://ryan.snook.cc, http://www.wowinterface.com/downloads/info5028-LevelSnap.html
ZoneTimer.lua
\ No newline at end of file