WoWInterface SVN Ranch

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 18 to Rev 19
    Reverse comparison

Rev 18 → Rev 19

trunk/libs/tekkonfig/tekKonfigDropdown.lua
1,5 → 1,5
 
local lib, oldminor = LibStub:NewLibrary("tekKonfig-Dropdown", 2)
local lib, oldminor = LibStub:NewLibrary("tekKonfig-Dropdown", 3)
if not lib then return end
oldminor = oldminor or 0
 
7,11 → 7,12
local GameTooltip = GameTooltip
local function HideTooltip() GameTooltip:Hide() end
local function ShowTooltip(self)
if self.tiptext then
if self.frame.tiptext then
GameTooltip:SetOwner(self, "ANCHOR_TOPRIGHT")
GameTooltip:SetText(self.tiptext, nil, nil, nil, nil, true)
GameTooltip:SetText(self.frame.tiptext, nil, nil, nil, nil, true)
end
end
local function ShowTooltip2(self) ShowTooltip(self.container) end
 
 
local function OnClick(self)
25,8 → 26,10
-- Create a dropdown.
-- All args optional, parent recommended
function lib.new(parent, label, ...)
local container = CreateFrame("Frame", nil, parent)
local container = CreateFrame("Button", nil, parent)
container:SetWidth(149+13) container:SetHeight(32+24)
container:SetScript("OnEnter", ShowTooltip)
container:SetScript("OnLeave", HideTooltip)
if select("#", ...) > 0 then container:SetPoint(...) end
 
local name = "tekKonfigDropdown"..GetTime() -- Sadly, some of these frames must be named
35,8 → 38,7
f:SetPoint("TOPLEFT", container, -13, -24)
f:EnableMouse(true)
f:SetScript("OnHide", OnHide)
f:SetScript("OnEnter", ShowTooltip)
f:SetScript("OnLeave", HideTooltip)
container.frame = f
 
local ltex = f:CreateTexture(name.."Left", "ARTWORK")
ltex:SetWidth(25) ltex:SetHeight(64)
44,18 → 46,19
ltex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
ltex:SetTexCoord(0, 0.1953125, 0, 1)
 
local rtex = f:CreateTexture(nil, "ARTWORK")
rtex:SetWidth(25) rtex:SetHeight(64)
rtex:SetPoint("RIGHT")
rtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
rtex:SetTexCoord(0.8046875, 1, 0, 1)
 
local mtex = f:CreateTexture(nil, "ARTWORK")
mtex:SetWidth(115) mtex:SetHeight(64)
mtex:SetPoint("LEFT", ltex, "RIGHT")
mtex:SetPoint("RIGHT", rtex, "LEFT")
mtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
mtex:SetTexCoord(0.1953125, 0.8046875, 0, 1)
 
local rtex = f:CreateTexture(nil, "ARTWORK")
rtex:SetWidth(25) rtex:SetHeight(64)
rtex:SetPoint("LEFT", mtex, "RIGHT")
rtex:SetTexture("Interface\\Glues\\CharacterCreate\\CharacterCreate-LabelFrame")
rtex:SetTexCoord(0.8046875, 1, 0, 1)
 
local text = f:CreateFontString(name.."Text", "ARTWORK", "GameFontHighlightSmall")
text:SetWidth(0) text:SetHeight(10)
text:SetPoint("RIGHT", rtex, -43, 2)
65,6 → 68,8
button:SetWidth(24) button:SetHeight(24)
button:SetPoint("TOPRIGHT", rtex, -16, -18)
button:SetScript("OnClick", OnClick)
button:SetScript("OnEnter", ShowTooltip2)
button.container = container
 
button:SetNormalTexture("Interface\\ChatFrame\\UI-ChatIcon-ScrollDown-Up")
button:SetPushedTexture("Interface\\ChatFrame\\UI-ChatIcon-ScrollDown-Down")
73,9 → 78,9
button:GetHighlightTexture():SetBlendMode("ADD")
 
local labeltext = f:CreateFontString(nil, "BACKGROUND", "GameFontNormal")--GameFontHighlight
labeltext:SetPoint("BOTTOMLEFT", f, "TOPLEFT", 16, 3)
labeltext:SetPoint("BOTTOMLEFT", container, "TOPLEFT", 16-13, 3-24)
labeltext:SetText(label)
 
return f, text, container
return f, text, container, labeltext
end
 
trunk/ranch.lua
203,14 → 203,11
local ranch_cash = 0
local ranch_uncost = false
local ranch_junk = false
if GetSellValue == nil then
ranch_uncost = true
end
for i = 0, 4 do
for j = 1, GetContainerNumSlots(i) do
local ContainerItemLink = GetContainerItemLink(i,j)
if ContainerItemLink ~= nil then
local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture = GetItemInfo(ContainerItemLink)
local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemValue = GetItemInfo(ContainerItemLink)
local itemId = Ranch_ItemID(itemLink)
if itemType == "Trade Goods" then
if ranch_items[itemSubType] == nil then
219,23 → 216,28
if ranch_items[itemSubType][itemId] == nil then
ranch_items[itemSubType][itemId] = GetItemCount(itemLink)
end
elseif itemType == "Gem" then
if ranch_items["Gem"] == nil then
ranch_items["Gem"] = {}
end
if ranch_items["Gem"][itemId] == nil then
ranch_items["Gem"][itemId] = GetItemCount(itemLink)
end
elseif itemRarity == 0 then
ranch_junk = true
if GetSellValue ~= nil then
if GetSellValue(itemLink) == nil then
ranch_uncost = true
else
ranch_cash = ranch_cash + GetSellValue(itemLink)
end
if itemValue == nil then
ranch_uncost = true
else
ranch_cash = ranch_cash + (itemValue * select(2, GetContainerItemInfo(i,j)))
end
elseif itemRarity >=2 then
RanchGameTip:ClearLines();
RanchGameTip:SetBagItem(i,j);
if ((RanchGameTipTextLeft2:GetText() ~= "Soulbound") and (RanchGameTipTextLeft2:GetText() ~= "Quest Item") and RanchGameTipTextLeft2:GetText() ~= "Account Bound") then
if ranch_options["mergeitems"] then
ranch_boe[itemId] = GetSellValue(itemLink)
ranch_boe[itemId] = itemValue
else
ranch_boe[itemLink] = GetSellValue(itemLink)
ranch_boe[itemLink] = itemValue
end
end
end
trunk/ranch.toc
1,4 → 1,4
## Interface: 30100
## Interface: 30200
## Title : Ranch
## Notes: Keeps track of items you've farmed.
## Author: Sekrin@Argent Dawn-EU