WoWInterface SVN PVPTimer

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

trunk/PVPTimer/PVPTimer.lua
1,5 → 1,5
--[[
PVP Timer 0.01b by EVmaker
PVP Timer 0.02b by EVmaker
 
A simple mod to display the remaining time left on the players flagged PVP timer either in its own window,
or in a LDB Displayer (Titan, Fubar, etc..)
10,7 → 10,7
local debugMode = false;
local PVPT_updateInterval = 1.0;
local PVPT_defaultSettings = {
["Version"] = "0.01b",
["Version"] = "0.02b",
["OnOff"] = true,
["ShowWindow"] = true
}
32,7 → 32,7
-- Declare the global variables
PVPT_whatTimer = "wait";
PVPT_Settings = {
["Version"] = "0.01b";
["Version"] = "0.02b";
["OnOff"] = true,
["ShowWindow"] = true
}
trunk/PVPTimer/PVPTimer.toc
1,4 → 1,4
## Interface: 30100
## Interface: 30200
## Title: PVP Timer
## Notes: Displays the pvp flag time remaining in its own window, or via LDB.
## Dependencies: EMLib
trunk/PVPTimer/readme.txt
1,7 → 1,7
Readme for PVP Timer, a World of Warcraft Mod.
----
 
Version 0.1b
Version 0.02b
PVP Timer by EVmaker
 
A simple mod to display the remaining time left on the players flagged PVP timer either in its own window,
34,6 → 34,10
* Eliminate any bugs (if any)
----------------------------------------------------------------------
Changelog:
0.02b:
3.2 Compatibility and TOC Update. Essentially just an update for the TOC, so that 'load out of date addons' does not need to be
checked, since PVPTimer was 3.2 Compatible already.
 
0.01b:
Initial release, has the PVP Timer window which displays the time remaining on your pvp counter, colored by faction (red and yellow
for horde, blue and yellow for alliance). Slash options for whether to show the window constantly (/pvpt toggle window) and to turn
trunk/EMLib/EMLib.toc
1,4 → 1,4
## Interface: 30100
## Interface: 30200
## Title: EMLib
## Notes: EV's Mod Library, contains commonly used functions across his mods.
## Author: EVmaker
trunk/EMLib/EMLib.lua
1,5 → 1,5
--[[
EV's Mod Library by EVmaker, v0.08:
EV's Mod Library by EVmaker, v0.09:
 
After getting tired of copying often used functions (such as printing to chat) over and over after each mod I work on,
I decided to move all the most commonly used functions into a general library which I can have as a dependency for
7,7 → 7,7
]]--
 
-- Declares the locals
local EML_Version = "0.08";
local EML_Version = "0.09";
local debugMode = false;
local EML_supportedMods = {
["Looter"] = true,
150,12 → 150,41
return itemPrice;
end
 
-- Gets item tooltip information
function EML_toolInfo(arg,from)
local itemLink;
local itemArray;
if (GameTooltip:IsShown()) then
local name;
name, itemLink = GameTooltip:GetItem();
elseif (ItemRefTooltip:IsShown()) then
local name;
name, itemLink = ItemRefTooltip:GetItem();
end
if (itemLink) then
itemArray = EML_getInfo(itemLink);
end
if (itemLink) then
if (arg == "info") then
EMLChat(tostring(itemLink)..", ID: "..itemArray["ID"]..", Stack Size: "..itemArray["StackCount"],"chat",from)
else
return itemArray;
end
else
EMLChat("ID Failed.","chat",from)
return nil;
end
end
 
-- Returns GetItemInfo in a easily accessible table
function EML_getInfo(arg)
local itemArray;
local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemPrice = GetItemInfo(arg)
if (itemName) then
local _,itemID = EML_Parser(itemLink);
itemArray = {
["Name"] = itemName,
["ID"] = itemID,
["Link"] = itemLink,
["Rarity"] = itemRarity,
["ILevel"] = itemLevel,
177,14 → 206,20
if (what == "new") then
table.insert(where,"StartDontRemove")
else
for index,value in pairs(where) do
if (type(index) == "number") then
table.insert(where,what)
return nil;
elseif (type(index) == "string") then
where[theValue] = true
return nil;
if (type(where) == "table") then
for index,value in pairs(where) do
if (type(index) == "number") then
table.insert(where,what)
return true;
elseif (type(index) == "string") then
where[theValue] = true;
return true;
end
end
table.insert(where,what)
return true;
else
if (debugMode) then EMLChat("Not given a table.","chat","EML","red") end
end
end
end
197,10 → 232,8
end
end
for index,value in pairs(where) do
if (value == true) then
if (index == what) then
where[index]=nil;
end
if (index == what) then
where[index]=nil;
end
end
end
212,9 → 245,12
 
-- Copies a table for safe resetting or other uses
function EML_copyTable(arg)
local newTable = {};
for index,value in pairs(arg) do
newTable[index] = value;
local newTable;
if (type(arg) == "table") then
newTable = {};
for index,value in pairs(arg) do
newTable[index] = value;
end
end
return newTable;
end
230,6 → 266,8
isFound=true;
end
end
else
if (debugMode) then EMLChat("No table for FindTable","chat","EML") end
end
return isFound;
end
249,6 → 287,21
end
end
 
-- Sets a table value
function EML_setTable(what,where,to)
if (type(to) == "table") then
for index,value in pairs(to) do
if (where == index) then
to[where] = what;
elseif (where == value) then
to[index] = what
end
end
else
if (debugMode) then EMLChat("No table for SetTable","chat","EML") end
end
end
 
-- Makes sure settings are in one array from another array
function EML_mergeTable(arrayTo,arrayFrom)
local newArray;
430,6 → 483,7
return version, build, tocversion;
end
 
-- Prints or returns the current WoW zone information
function EML_zoneInfo(what,where)
local zoneName = tostring(GetZoneText());
local subZoneName = tostring(GetSubZoneText());
456,7 → 510,7
end
if (debugMode) then
for i=0, #(bagsName) do
EMLChat("Bag Name: "..tostring(bagsName[i])..", Bag Type: "..(bagsType[i])..", Bag Slots: "..tostring(bagsSlots[i])..", Free Slots: "..tostring(bagsFree[i]),"chat",where)
EMLChat("Bag Name: "..tostring(bagsName[i])..", Bag Type: "..tostring(bagsType[i])..", Bag Slots: "..tostring(bagsSlots[i])..", Free Slots: "..tostring(bagsFree[i]),"chat",where)
end
end
return bagsName,bagsType,bagsSlots,bagsFree;