small refactorings, small bugfix and shift click linking item names now always inserts a name without suffix (would otherwise not work anyway)

This commit is contained in:
Manuel Simon Hirsig
2015-09-27 02:20:37 +02:00
parent 60a4f1bf61
commit 3ab03468b2
4 changed files with 31 additions and 20 deletions
+7 -8
View File
@@ -414,9 +414,9 @@ function Aux_BrowseButton_OnMouseDown()
SetSelectedAuctionItem("list", index)
local _, _, _, _, _, _, _, _, buyoutPrice = GetAuctionItemInfo("list", index)
if buyoutPrice > 0 then
PlaceAuctionBid("list", index, buyoutPrice)
local auction_item = Aux.info.auction_item(index)
if auction_item.buyout_price > 0 then
PlaceAuctionBid("list", index, auction_item.buyout_price)
end
AuctionFrameBrowse_Update()
@@ -449,13 +449,12 @@ function Aux_ContainerFrameItemButton_OnClick(button)
and AuctionFrame:IsVisible()
and (PanelTemplates_GetSelectedTab(AuctionFrame) == 1 or PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index)
then
local itemLink = GetContainerItemLink(this:GetParent():GetID(), this:GetID())
if itemLink then
local itemName = string.gsub(itemLink, "^.-%[(.*)%].*", "%1")
local container_item = Aux.info.container_item(this:GetParent():GetID(), this:GetID())
if container_item then
if PanelTemplates_GetSelectedTab(AuctionFrame) == 1 then
BrowseName:SetText(itemName)
BrowseName:SetText(container_item.name)
elseif PanelTemplates_GetSelectedTab(AuctionFrame) == Aux.tabs.buy.index then
AuxBuySearchBox:SetText(itemName)
AuxBuySearchBox:SetText(container_item.name)
end
end
else