mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
update ItemPrice
This commit is contained in:
@@ -29,18 +29,11 @@ local tooltips = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function IP:SetAction(tt, id)
|
function IP:SetAction(tt, id)
|
||||||
local item
|
local itemName = GameTooltipTextLeft1:GetText()
|
||||||
for i = 1, tt:NumLines() do
|
if not itemName then return end
|
||||||
if i == 1 then
|
|
||||||
local tiptext = _G["GameTooltipTextLeft"..i]
|
|
||||||
local linetext = tiptext:GetText()
|
|
||||||
|
|
||||||
item = linetext
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if not item then return end
|
|
||||||
|
|
||||||
|
local item = GetItemInfoByName(itemName)
|
||||||
|
if item then
|
||||||
local count = 1
|
local count = 1
|
||||||
if IsConsumableAction(id) then
|
if IsConsumableAction(id) then
|
||||||
local actionCount = GetActionCount(id)
|
local actionCount = GetActionCount(id)
|
||||||
@@ -50,6 +43,7 @@ function IP:SetAction(tt, id)
|
|||||||
end
|
end
|
||||||
|
|
||||||
self:SetPrice(tt, count, item)
|
self:SetPrice(tt, count, item)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function IP:SetAuctionItem(tt, type, index)
|
function IP:SetAuctionItem(tt, type, index)
|
||||||
@@ -157,15 +151,14 @@ end
|
|||||||
function IP:SetPrice(tt, count)
|
function IP:SetPrice(tt, count)
|
||||||
if MerchantFrame:IsShown() then return end
|
if MerchantFrame:IsShown() then return end
|
||||||
|
|
||||||
local bag, slot = this:GetParent():GetID(), this:GetID()
|
local itemName = GameTooltipTextLeft1:GetText()
|
||||||
local itemLink = GetContainerItemLink(bag, slot)
|
if not itemName then return end
|
||||||
local item, itemID
|
|
||||||
if itemLink then
|
|
||||||
itemID = match(itemLink, "item:(%d+)")
|
|
||||||
item = GetItemInfo(itemID)
|
|
||||||
end
|
|
||||||
|
|
||||||
if not item then return end
|
local _, itemString = GetItemInfoByName(itemName)
|
||||||
|
if not itemString then return end
|
||||||
|
|
||||||
|
local itemID = match(itemString, "item:(%d+)")
|
||||||
|
if not itemID then return end
|
||||||
|
|
||||||
local price = LIP:GetSellValue(itemID)
|
local price = LIP:GetSellValue(itemID)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user