/
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" ); |
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 = {} |
end |
self:AddDoubleLine("Junk:", textcash) |
end |
if ranchtrack ~= nil then |
dataobj.text = ranchtrack.." - "..GetItemCount(ranchtrack) |
end |
end |
function Ranch_FormatCash(cash) |