WoWInterface SVN Ranch

Compare Revisions

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

Rev 4 → Rev 5

ranch.lua
1,3 → 1,6
assert(LibStub, "Ranch requires LibStub")
assert(LibStub:GetLibrary("LibDataBroker-1.1", true), "Ranch requires LibDataBroker-1.1")
 
local ldb = LibStub:GetLibrary("LibDataBroker-1.1")
local dataobj = ldb:NewDataObject("Ranch", {type = "data source", text = "Ranch"})
CreateFrame( "GameTooltip", "RanchGameTip" );
7,6 → 10,18
RanchGameTip:CreateFontString( "$parentTextRight1", nil, "GameTooltipText" )
);
 
 
function Ranch_Command(slashargs)
local startPos, endPos, firstWord, restOfString = string.find(slashargs, "(%w+)[%s%p]*(.*)");
if firstWord == "track" then
ranchtrack = restOfString
end
end
 
 
SLASH_RANCH1 = "/ranch"
SlashCmdList["RANCH"] = Ranch_Command;
 
function dataobj:OnTooltipShow()
local i, j
local ranch_items = {}
83,6 → 98,9
end
self:AddDoubleLine("Junk:", textcash)
end
if ranchtrack ~= nil then
dataobj.text = ranchtrack.." - "..GetItemCount(ranchtrack)
end
end
 
function Ranch_FormatCash(cash)