WoWInterface SVN ZoneTimer

Compare Revisions

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

Rev 6 → Rev 5

trunk/ZoneTimer/ZoneTimer.lua
20,7 → 20,6
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
39,39 → 38,35
 
]]--
 
ZoneTimer = {
local ZT = {
Version = GetAddOnMetadata("ZoneTimer", "Version");
Revision = tonumber(strsub("$Rev$", 7, strlen("$Rev$") - 2));
Time = 0.01;
}
 
Setting = {
Version = GetAddOnMetadata("ZoneTimer", "Version");
Revision = tonumber(strsub("$Rev$", 7, strlen("$Rev$") - 2));
Time = 0.01;
},
function ZoneTimer_OnEvent()
if ( event == "PLAYER_ENTERING_WORLD" ) then
local t = GetTime() - ZT.Time
local c = "00cc00"
 
OnEvent = function ()
if ( event == "PLAYER_ENTERING_WORLD" ) then
local t = GetTime() - ZoneTimer.Setting.Time
local c = "00cc00"
if ( t > 10 ) then
c = "ff0000"
elseif ( t > 5 ) then
c = "ffff00"
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
ZT.Time = GetTime()
this:RegisterEvent("PLAYER_ENTERING_WORLD")
end
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
local frame = CreateFrame("Frame", "ZoneTimerFrame")
frame:Hide()
frame:SetScript("OnEvent", ZoneTimer.OnEvent)
frame:RegisterEvent("PLAYER_LEAVING_WORLD")
end
\ No newline at end of file + CreateFrame("Frame", "ZoneTimerFrame") +end +ZoneTimerFrame:Hide() +ZoneTimerFrame:SetScript("OnEvent", ZoneTimer_OnEvent) +ZoneTimerFrame:RegisterEvent("PLAYER_LEAVING_WORLD") \ No newline at end of file
trunk/ZoneTimer/ZoneTimer.toc
1,9 → 1,14
## Interface: 30000
## Version: 1.3.0
## Version: 1.23
## 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