mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-09 23:20:00 +00:00
begin utilizing ClassicAPI
This commit is contained in:
@@ -69,12 +69,14 @@ function GameTooltip.SetBagItem(self, container, slot)
|
||||
end
|
||||
|
||||
libtooltip.itemLink = GetContainerItemLink(container, slot)
|
||||
libtooltip.itemID = C_Container.GetContainerItemID(container, slot)
|
||||
_, libtooltip.itemCount = GetContainerItemInfo(container, slot)
|
||||
return pfHookSetBagItem(self, container, slot)
|
||||
end
|
||||
|
||||
local pfHookSetQuestLogItem = GameTooltip.SetQuestLogItem
|
||||
function GameTooltip.SetQuestLogItem(self, itemType, index)
|
||||
libtooltip.itemID = GetQuestLogItemID(itemType, index)
|
||||
libtooltip.itemLink = GetQuestLogItemLink(itemType, index)
|
||||
if not libtooltip.itemLink then return end
|
||||
return pfHookSetQuestLogItem(self, itemType, index)
|
||||
@@ -82,12 +84,14 @@ end
|
||||
|
||||
local pfHookSetQuestItem = GameTooltip.SetQuestItem
|
||||
function GameTooltip.SetQuestItem(self, itemType, index)
|
||||
libtooltip.itemID = GetQuestItemID(itemType, index)
|
||||
libtooltip.itemLink = GetQuestItemLink(itemType, index)
|
||||
return pfHookSetQuestItem(self, itemType, index)
|
||||
end
|
||||
|
||||
local pfHookSetLootItem = GameTooltip.SetLootItem
|
||||
function GameTooltip.SetLootItem(self, slot)
|
||||
libtooltip.itemID = GetLootSlotItemID(slot)
|
||||
libtooltip.itemLink = GetLootSlotLink(slot)
|
||||
pfHookSetLootItem(self, slot)
|
||||
end
|
||||
@@ -95,36 +99,42 @@ end
|
||||
local pfHookSetInboxItem = GameTooltip.SetInboxItem
|
||||
function GameTooltip.SetInboxItem(self, mailID, attachmentIndex)
|
||||
local itemName, itemTexture, inboxItemCount, inboxItemQuality = GetInboxItem(mailID)
|
||||
libtooltip.itemID = GetInboxItemID(mailID)
|
||||
libtooltip.itemLink = GetItemLinkByName(itemName)
|
||||
return pfHookSetInboxItem(self, mailID, attachmentIndex)
|
||||
end
|
||||
|
||||
local pfHookSetInventoryItem = GameTooltip.SetInventoryItem
|
||||
function GameTooltip.SetInventoryItem(self, unit, slot)
|
||||
libtooltip.itemID = GetInventoryItemID(unit, slot)
|
||||
libtooltip.itemLink = GetInventoryItemLink(unit, slot)
|
||||
return pfHookSetInventoryItem(self, unit, slot)
|
||||
end
|
||||
|
||||
local pfHookSetLootRollItem = GameTooltip.SetLootRollItem
|
||||
function GameTooltip.SetLootRollItem(self, id)
|
||||
libtooltip.itemID = GetLootRollItemID(id)
|
||||
libtooltip.itemLink = GetLootRollItemLink(id)
|
||||
return pfHookSetLootRollItem(self, id)
|
||||
end
|
||||
|
||||
local pfHookSetMerchantItem = GameTooltip.SetMerchantItem
|
||||
function GameTooltip.SetMerchantItem(self, merchantIndex)
|
||||
libtooltip.itemID = GetMerchantItemID(merchantIndex)
|
||||
libtooltip.itemLink = GetMerchantItemLink(merchantIndex)
|
||||
return pfHookSetMerchantItem(self, merchantIndex)
|
||||
end
|
||||
|
||||
local pfHookSetCraftItem = GameTooltip.SetCraftItem
|
||||
function GameTooltip.SetCraftItem(self, skill, slot)
|
||||
libtooltip.itemID = GetCraftReagentItemID(skill, slot)
|
||||
libtooltip.itemLink = GetCraftReagentItemLink(skill, slot)
|
||||
return pfHookSetCraftItem(self, skill, slot)
|
||||
end
|
||||
|
||||
local pfHookSetCraftSpell = GameTooltip.SetCraftSpell
|
||||
function GameTooltip.SetCraftSpell(self, slot)
|
||||
libtooltip.itemID = GetCraftSpellID(slot)
|
||||
libtooltip.itemLink = GetCraftItemLink(slot)
|
||||
return pfHookSetCraftSpell(self, slot)
|
||||
end
|
||||
@@ -132,8 +142,10 @@ end
|
||||
local pfHookSetTradeSkillItem = GameTooltip.SetTradeSkillItem
|
||||
function GameTooltip.SetTradeSkillItem(self, skillIndex, reagentIndex)
|
||||
if reagentIndex then
|
||||
libtooltip.itemID = GetTradeSkillReagentItemID(skillIndex, reagentIndex)
|
||||
libtooltip.itemLink = GetTradeSkillReagentItemLink(skillIndex, reagentIndex)
|
||||
else
|
||||
libtooltip.itemID = GetTradeSkillItemID(skillIndex)
|
||||
libtooltip.itemLink = GetTradeSkillItemLink(skillIndex)
|
||||
end
|
||||
return pfHookSetTradeSkillItem(self, skillIndex, reagentIndex)
|
||||
@@ -142,6 +154,7 @@ end
|
||||
local pfHookSetAuctionItem = GameTooltip.SetAuctionItem
|
||||
function GameTooltip.SetAuctionItem(self, atype, index)
|
||||
_, _, libtooltip.itemCount = GetAuctionItemInfo(atype, index)
|
||||
libtooltip.itemID = GetAuctionItemID(atype, index)
|
||||
libtooltip.itemLink = GetAuctionItemLink(atype, index)
|
||||
return pfHookSetAuctionItem(self, atype, index)
|
||||
end
|
||||
@@ -149,6 +162,7 @@ end
|
||||
local pfHookSetAuctionSellItem = GameTooltip.SetAuctionSellItem
|
||||
function GameTooltip.SetAuctionSellItem(self)
|
||||
local itemName, _, itemCount = GetAuctionSellItemInfo()
|
||||
libtooltip.itemID = GetAuctionSellItemID()
|
||||
libtooltip.itemCount = itemCount
|
||||
libtooltip.itemLink = GetItemLinkByName(itemName)
|
||||
return pfHookSetAuctionSellItem(self)
|
||||
@@ -156,12 +170,14 @@ end
|
||||
|
||||
local pfHookSetTradePlayerItem = GameTooltip.SetTradePlayerItem
|
||||
function GameTooltip.SetTradePlayerItem(self, index)
|
||||
libtooltip.itemID = GetTradePlayerItemID(index)
|
||||
libtooltip.itemLink = GetTradePlayerItemLink(index)
|
||||
return pfHookSetTradePlayerItem(self, index)
|
||||
end
|
||||
|
||||
local pfHookSetTradeTargetItem = GameTooltip.SetTradeTargetItem
|
||||
function GameTooltip.SetTradeTargetItem(self, index)
|
||||
libtooltip.itemID = GetTradeTargetItemID(index)
|
||||
libtooltip.itemLink = GetTradeTargetItemLink(index)
|
||||
return pfHookSetTradeTargetItem(self, index)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user