Compare commits
No commits in common. "master" and "0.1" have entirely different histories.
|
@ -0,0 +1,3 @@
|
||||||
|
manual-changelog:
|
||||||
|
filename: changelog.txt
|
||||||
|
markup-type: markdown
|
|
@ -1,8 +1,8 @@
|
||||||
## Interface: 11302
|
## Interface: 70000
|
||||||
|
|
||||||
## Title: GnomishVendorShrinker Classic
|
## Title: GnomishVendorShrinker
|
||||||
## Notes: Compact scrolling vendor frame
|
## Notes: Compact scrolling vendor frame
|
||||||
## Author: Gio-Flamelash
|
## Author: Tekkub Stoutwrithe
|
||||||
## X-Category: Misc
|
## X-Category: Misc
|
||||||
## X-Icon: Interface\Icons\INV_Misc_Toy_07
|
## X-Icon: Interface\Icons\INV_Misc_Toy_07
|
||||||
|
|
||||||
|
|
25
Init.lua
25
Init.lua
|
@ -15,17 +15,6 @@ local function Hide(frame)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function ToggleButtons()
|
|
||||||
for i=1,MERCHANT_ITEMS_PER_PAGE do
|
|
||||||
if (MerchantFrame.selectedTab == 1) then
|
|
||||||
_G["MerchantItem"..i]:Hide()
|
|
||||||
elseif (MerchantFrame.selectedTab == 2) then
|
|
||||||
_G["MerchantItem"..i]:Show()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
function ns.OnLoad()
|
function ns.OnLoad()
|
||||||
local GVS = ns.NewMainFrame()
|
local GVS = ns.NewMainFrame()
|
||||||
GVS:SetWidth(315)
|
GVS:SetWidth(315)
|
||||||
|
@ -37,13 +26,7 @@ function ns.OnLoad()
|
||||||
MerchantBuyBackItem:SetPoint("BOTTOMRIGHT", -7, 33)
|
MerchantBuyBackItem:SetPoint("BOTTOMRIGHT", -7, 33)
|
||||||
|
|
||||||
-- The little class select dropdown show trigget a refresh
|
-- The little class select dropdown show trigget a refresh
|
||||||
--[[hooksecurefunc("SetMerchantFilter", function()
|
hooksecurefunc("SetMerchantFilter", function() GVS:GetScript("OnShow")(GVS) end)
|
||||||
if GVS.Merchant ~= UnitGUID("npc") then
|
|
||||||
GVS:GetScript("OnShow")(GVS)
|
|
||||||
else
|
|
||||||
GVS:GetScript("OnEvent")(GVS)
|
|
||||||
end
|
|
||||||
end)]]
|
|
||||||
|
|
||||||
-- Force show when we're loaded on demand and the tab is already selected
|
-- Force show when we're loaded on demand and the tab is already selected
|
||||||
if MerchantFrame:IsVisible() and MerchantFrame.selectedTab == 1 then
|
if MerchantFrame:IsVisible() and MerchantFrame.selectedTab == 1 then
|
||||||
|
@ -51,7 +34,7 @@ function ns.OnLoad()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Reparent the first 10 MerchantItem frames, so they only appear for buyback
|
-- Reparent the first 10 MerchantItem frames, so they only appear for buyback
|
||||||
for i=1,10 do _G["MerchantItem"..i]:Hide() end
|
for i=1,10 do _G["MerchantItem"..i]:SetParent(MerchantItem11) end
|
||||||
|
|
||||||
-- Hide frames we don't need now
|
-- Hide frames we don't need now
|
||||||
Hide(MerchantNextPageButton)
|
Hide(MerchantNextPageButton)
|
||||||
|
@ -60,8 +43,4 @@ function ns.OnLoad()
|
||||||
|
|
||||||
-- Clean up our frame factories
|
-- Clean up our frame factories
|
||||||
for i,v in pairs(ns) do if i:match("^New") then ns[i] = nil end end
|
for i,v in pairs(ns) do if i:match("^New") then ns[i] = nil end end
|
||||||
|
|
||||||
MerchantFrameTab1:HookScript("OnClick", ToggleButtons)
|
|
||||||
MerchantFrameTab2:HookScript("OnClick", ToggleButtons)
|
|
||||||
GVS:HookScript("OnShow", ToggleButtons)
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,11 @@
|
||||||
local myname, ns = ...
|
local myname, ns = ...
|
||||||
|
|
||||||
|
|
||||||
|
local function HasHeirloom(id)
|
||||||
|
return C_Heirloom.IsItemHeirloom(id) and C_Heirloom.PlayerHasHeirloom(id)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function IsKnown(link)
|
local function IsKnown(link)
|
||||||
ns.scantip:SetHyperlink(link)
|
ns.scantip:SetHyperlink(link)
|
||||||
for i=1,ns.scantip:NumLines() do
|
for i=1,ns.scantip:NumLines() do
|
||||||
|
@ -15,7 +20,7 @@ ns.knowns = setmetatable({}, {
|
||||||
local id = ns.ids[i]
|
local id = ns.ids[i]
|
||||||
if not id then return end
|
if not id then return end
|
||||||
|
|
||||||
if IsKnown(i) then
|
if HasHeirloom(id) or IsKnown(i) then
|
||||||
t[i] = true
|
t[i] = true
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
28
README.md
28
README.md
|
@ -1,19 +1,19 @@
|
||||||
GnomishVendorShrinker (for Classic) creates a simple, compact vendor frame.
|
GnomishVendorShrinker creates a simple, compact vendor frame, made to compliment
|
||||||
|
GnomishAuctionShrinker. GVS brings an interface similar to Auctioneer's
|
||||||
Credits to [tekkub](https://github.com/TekNoLogic/GnomishVendorShrinker) and [Tonyleila + Vlad](https://www.wowinterface.com/downloads/info21484-GnomishVendorShrinkerFanUpdateforBFAGVS.html).
|
"CompactUI" to the vendor frame.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Simple one-line-per-item interface.
|
* Simple one-line-per-item interface
|
||||||
* Scrolling list, none of that "paging" crap that makes navigation slow.
|
* Scrolling list, none of that "paging" crap that makes navigation slow
|
||||||
* Clicking an item simply buys it, instead of picking up the item.
|
* Clicking an item simply buys it, instead of picking up the item
|
||||||
* Alt-click buys a full stack (or as close to a full stack as is possible for limited-stock items).
|
* Alt-click buys a full stack (or as close to a full stack as is possible for
|
||||||
* Ctrl- and shift-click behave as default (dress-up and paste link, respectively).
|
limited-stock items)
|
||||||
* Recipes you do not yet know are highlighted in blue.
|
* Ctrl- and shift-click behave as default (dress-up and paste link, respectively)
|
||||||
* Items you cannot use are highlighted in red.
|
* Recipes you do not yet know are highlighted in blue
|
||||||
* Search box to help you find that item you're after on a vendor with hundreds of items.
|
* Items you cannot use are highlighted in red
|
||||||
|
* Search box to help you find that item you're after on a vendor with hundreds of items
|
||||||
|
|
||||||

|
## Un-features
|
||||||
|
|
||||||
* [WoWInterface: GnomishVendorShrinker (Classic)](https://www.wowinterface.com/downloads/info25279-GnomishVendorShrinkerClassic.html)
|
* No support for split-stack purchases, I'm not convinced it's needed.
|
||||||
* [Code development](https://sergio.am/code/GnomishVendorShrinker)
|
|
||||||
|
|
|
@ -0,0 +1,113 @@
|
||||||
|
### 7.0.0.23-Beta
|
||||||
|
|
||||||
|
* Fix issues with sightless eye vendor
|
||||||
|
Why the fuck anyone would want to come down here is beyond me.
|
||||||
|
|
||||||
|
|
||||||
|
### 7.0.0.22-Beta
|
||||||
|
|
||||||
|
* Fix buying items from vendors using [Tricky Treat]
|
||||||
|
... and also using any other common non-currency item (i.e. holiday
|
||||||
|
"currency" that stay in your bag and usually expire)
|
||||||
|
|
||||||
|
|
||||||
|
### 7.0.0.21-Beta
|
||||||
|
|
||||||
|
* Fix blank list when not loaded on demand
|
||||||
|
|
||||||
|
|
||||||
|
### 7.0.0.20-Beta
|
||||||
|
|
||||||
|
* Red-out lines for recipes that require a rank we don't have yet
|
||||||
|
* Add toys to known scanner
|
||||||
|
* Heavy refactoring under the hood
|
||||||
|
|
||||||
|
|
||||||
|
### 7.0.0.19-Beta
|
||||||
|
|
||||||
|
* Bump to fix botched releases on WoWI and Wowace
|
||||||
|
|
||||||
|
### 7.0.0.18-Beta
|
||||||
|
|
||||||
|
* Fix for Legion API changes (thanks Talyrius)
|
||||||
|
* Refresh the list more often to catch spent currency
|
||||||
|
* Check bank items now
|
||||||
|
* Grey out known heirlooms on 6.1
|
||||||
|
|
||||||
|
### 6.0.0.17-Beta
|
||||||
|
|
||||||
|
* Make grey out work for garrison blueprints
|
||||||
|
|
||||||
|
### 6.0.0.16-Beta
|
||||||
|
|
||||||
|
* Make known recipes grey
|
||||||
|
|
||||||
|
### 5.0.1.15-Release
|
||||||
|
|
||||||
|
* Tagging stable version
|
||||||
|
|
||||||
|
### 5.0.1.14-Beta
|
||||||
|
|
||||||
|
* Fix frame positions for PANDAS!
|
||||||
|
|
||||||
|
### 4.3.0.13-Beta
|
||||||
|
|
||||||
|
* New search (Thanks Urth)
|
||||||
|
* Move the search box, it overlaps the default UI in some cases
|
||||||
|
* Add a tooltip so people know how to use the search
|
||||||
|
* redo it the right way
|
||||||
|
|
||||||
|
### 4.2.0.12-Beta
|
||||||
|
|
||||||
|
* Fix *~crazy~* hex color stings
|
||||||
|
|
||||||
|
### 4.1.0.11-Release
|
||||||
|
|
||||||
|
* Tagging stable version
|
||||||
|
|
||||||
|
### 4.0.0.10-Beta
|
||||||
|
|
||||||
|
* Some people don't even know what honor points are
|
||||||
|
|
||||||
|
### 4.0.0.9-Beta
|
||||||
|
|
||||||
|
* Make price text red if we can't afford an item
|
||||||
|
|
||||||
|
### 4.0.0.8-Beta
|
||||||
|
|
||||||
|
* Fix known recipe highlight
|
||||||
|
|
||||||
|
### 4.0.0.7-Beta
|
||||||
|
|
||||||
|
* Helps to register for drag.
|
||||||
|
* Stack-sold items changed with 4.0
|
||||||
|
|
||||||
|
### 3.3.0.6-Beta
|
||||||
|
|
||||||
|
* Better recipe highlighting
|
||||||
|
|
||||||
|
### 3.3.0.5-Beta
|
||||||
|
|
||||||
|
* Fix refresh "issue"?
|
||||||
|
* Oops, I always forget to register all clicks... stupid bad blizzy defaults
|
||||||
|
|
||||||
|
### 3.2.0.4-Beta
|
||||||
|
|
||||||
|
* Increase number of lines in tip scanner
|
||||||
|
|
||||||
|
### 3.2.0.3-Beta
|
||||||
|
|
||||||
|
* Switch to actual honor/arena point itemIDs so we get better tooltips
|
||||||
|
* Stupid nils
|
||||||
|
* Hide splitstack onhide
|
||||||
|
* Fix gold and token items anchoring
|
||||||
|
|
||||||
|
### 3.2.0.2-Beta
|
||||||
|
|
||||||
|
* Add splitstack frame, without the retarded max purchase limits the default vendor frame uses
|
||||||
|
* Ensure we always have a default item quality color
|
||||||
|
* Fix copper color
|
||||||
|
|
||||||
|
### 3.2.0.1-Beta
|
||||||
|
|
||||||
|
* And so it begins...
|
|
@ -0,0 +1,7 @@
|
||||||
|
events.lua
|
||||||
|
gsc.lua
|
||||||
|
itemid.lua
|
||||||
|
size_to_fit.lua
|
||||||
|
tooltip_scanner.lua
|
||||||
|
ui-scrollbar.lua
|
||||||
|
ui-textinput.lua
|
|
@ -29,7 +29,5 @@ function ns.SizeToFit(self)
|
||||||
|
|
||||||
-- Now resize ourself
|
-- Now resize ourself
|
||||||
local _, _, width, height = self:GetBoundsRect()
|
local _, _, width, height = self:GetBoundsRect()
|
||||||
if(width ~= nil and height ~= nil) then
|
self:SetSize(width, height)
|
||||||
self:SetSize(width, height)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,7 +32,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
local function Sound()
|
local function Sound()
|
||||||
PlaySound(1115)
|
PlaySound("UChatScrollButton")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -53,18 +53,6 @@ function ns.NewMainFrame()
|
||||||
|
|
||||||
search:SetScript("OnTextChanged", Refresh)
|
search:SetScript("OnTextChanged", Refresh)
|
||||||
|
|
||||||
local function Open(self)
|
|
||||||
self.Merchant = UnitGUID("npc")
|
|
||||||
local max = math.max(0, GetMerchantNumItems() - NUMROWS)
|
|
||||||
scrollbar:SetMinMaxValues(0, max)
|
|
||||||
scrollbar:SetValue(0)
|
|
||||||
Refresh()
|
|
||||||
|
|
||||||
GVS:RegisterEvent("BAG_UPDATE")
|
|
||||||
GVS:RegisterEvent("MERCHANT_UPDATE")
|
|
||||||
GVS:RegisterEvent("MERCHANT_SHOW")
|
|
||||||
end
|
|
||||||
|
|
||||||
GVS:EnableMouseWheel(true)
|
GVS:EnableMouseWheel(true)
|
||||||
GVS:SetScript("OnMouseWheel", function(self, value)
|
GVS:SetScript("OnMouseWheel", function(self, value)
|
||||||
if value > 0 then
|
if value > 0 then
|
||||||
|
@ -74,7 +62,16 @@ function ns.NewMainFrame()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
GVS:SetScript("OnEvent", Refresh)
|
GVS:SetScript("OnEvent", Refresh)
|
||||||
GVS:SetScript("OnShow", Open)
|
GVS:SetScript("OnShow", function(self)
|
||||||
|
local max = math.max(0, GetMerchantNumItems() - NUMROWS)
|
||||||
|
scrollbar:SetMinMaxValues(0, max)
|
||||||
|
scrollbar:SetValue(0)
|
||||||
|
Refresh()
|
||||||
|
|
||||||
|
GVS:RegisterEvent("BAG_UPDATE")
|
||||||
|
GVS:RegisterEvent("MERCHANT_UPDATE")
|
||||||
|
GVS:RegisterEvent("CURRENCY_DISPLAY_UPDATE")
|
||||||
|
end)
|
||||||
GVS:SetScript("OnHide", GVS.UnregisterAllEvents)
|
GVS:SetScript("OnHide", GVS.UnregisterAllEvents)
|
||||||
|
|
||||||
return GVS
|
return GVS
|
||||||
|
|
|
@ -27,15 +27,21 @@ local function HasAllCommonBarterItems(index)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function IsHeirloom(index)
|
||||||
|
local id = GetMerchantItemID(index)
|
||||||
|
return id and C_Heirloom.IsItemHeirloom(id)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function RequiresConfirmation(index)
|
local function RequiresConfirmation(index)
|
||||||
|
if IsHeirloom(index) then return true end
|
||||||
if not HasAllCommonBarterItems(index) then return true end
|
if not HasAllCommonBarterItems(index) then return true end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local function OnClick(self, button)
|
local function OnClick(self, button)
|
||||||
local id = self:GetID()
|
local id = self:GetID()
|
||||||
local currencyname = select(4,GetMerchantItemCostItem(id, 1))
|
local hasaltcurrency = (GetMerchantItemCostInfo(id) > 0)
|
||||||
local hasaltcurrency = ((GetMerchantItemCostInfo(id) > 0) and (select(4,GetMerchantItemCostItem(id, 1)) ~= "Garrison Resources"))
|
|
||||||
|
|
||||||
if IsAltKeyDown() and not hasaltcurrency then
|
if IsAltKeyDown() and not hasaltcurrency then
|
||||||
self:BuyItem(true)
|
self:BuyItem(true)
|
||||||
|
@ -130,11 +136,6 @@ local function SetValue(self, i)
|
||||||
self.ItemName:SetText(text)
|
self.ItemName:SetText(text)
|
||||||
|
|
||||||
self.AltCurrency:SetValue(i)
|
self.AltCurrency:SetValue(i)
|
||||||
if self.AltCurrency:IsShown() then
|
|
||||||
self.ItemName:SetPoint("RIGHT", self.AltCurrency, "LEFT", -GAP, 0)
|
|
||||||
else
|
|
||||||
self.ItemName:SetPoint("RIGHT", self.ItemPrice, "LEFT", -GAP, 0)
|
|
||||||
end
|
|
||||||
|
|
||||||
if extendedCost then
|
if extendedCost then
|
||||||
self.link, self.texture, self.extendedCost = link, itemTexture, true
|
self.link, self.texture, self.extendedCost = link, itemTexture, true
|
||||||
|
|
|
@ -11,8 +11,10 @@ local GARRISON_ICONS = {[1001489] = true, [1001490] = true, [1001491] = true}
|
||||||
local function Knowable(link)
|
local function Knowable(link)
|
||||||
local id = ns.ids[link]
|
local id = ns.ids[link]
|
||||||
if not id then return false end
|
if not id then return false end
|
||||||
|
if C_Heirloom.IsItemHeirloom(id) then return true end
|
||||||
|
|
||||||
local _, _, _, _, _, class, _, _, _, texture = GetItemInfo(link)
|
local _, _, _, _, _, class, _, _, _, texture = GetItemInfo(link)
|
||||||
|
if class == MISC and select(2, C_ToyBox.GetToyInfo(id)) then return true end
|
||||||
if class == RECIPE or GARRISON_ICONS[texture] then return true end
|
if class == RECIPE or GARRISON_ICONS[texture] then return true end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -31,6 +33,7 @@ local GRADS = {
|
||||||
[2] = DEFAULT_GRAD, -- green
|
[2] = DEFAULT_GRAD, -- green
|
||||||
[3] = {0.5,0.5,1,1, 0,0,1,0}, -- blue
|
[3] = {0.5,0.5,1,1, 0,0,1,0}, -- blue
|
||||||
[4] = {1,0,1,0.75, 1,0,1,0}, -- purple
|
[4] = {1,0,1,0.75, 1,0,1,0}, -- purple
|
||||||
|
[7] = {1,.75,.5,0.75, 1,.75,.5,0}, -- heirloom
|
||||||
}
|
}
|
||||||
GRADS = setmetatable(GRADS, {
|
GRADS = setmetatable(GRADS, {
|
||||||
__index = function(t,i)
|
__index = function(t,i)
|
||||||
|
|
|
@ -4,10 +4,8 @@ local myname, ns = ...
|
||||||
|
|
||||||
function ns.NewSearchField(parent)
|
function ns.NewSearchField(parent)
|
||||||
local editbox = ns.NewTextInput(parent)
|
local editbox = ns.NewTextInput(parent)
|
||||||
editbox:SetPoint("TOPLEFT", parent, "TOPLEFT", 98, 42) -- fixed for LeilaUI
|
editbox:SetPoint("BOTTOMLEFT", parent, "TOPLEFT", 55, 9)
|
||||||
editbox:SetPoint("TOPLEFT", parent, "TOPLEFT", 98, 42) -- fixed for LeilaUI
|
|
||||||
editbox:SetWidth(56) -- added for LeilaUI
|
|
||||||
editbox:SetHeight(32) -- added for LeilaUI
|
|
||||||
editbox.placeholder:SetText("Search...")
|
editbox.placeholder:SetText("Search...")
|
||||||
|
|
||||||
editbox:SetScript("OnEnter", function(self)
|
editbox:SetScript("OnEnter", function(self)
|
||||||
|
|
Loading…
Reference in New Issue