Mercurial > wow > hotcorners
changeset 13:fc72b86a3b66 v13-release
- added hearthstones to item list.
- if the item count <= 1, hide the amount text.
author | Tercio |
---|---|
date | Tue, 07 Mar 2017 14:06:24 -0300 |
parents | 6c1cc07c389d |
children | c046d1bdac10 |
files | HotCorners.lua |
diffstat | 1 files changed, 38 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/HotCorners.lua Thu Dec 29 14:14:57 2016 -0200 +++ b/HotCorners.lua Tue Mar 07 14:06:24 2017 -0300 @@ -336,6 +336,14 @@ LibHotCorners.BackPackItemList = { + --> hearthstones + [140192] = true, -- Dalaran Hearthstone + --[110560] = true, -- Garrison Hearthstone + [6948] = true, -- Innkeeper Hearthstone + + --> good items + + --> alchemy --MOP @@ -485,8 +493,7 @@ [101618] = true, -- Pandaren Treasure Noodle Soup [101617] = true, -- Deluxe Noodle Soup [101616] = true, -- Noodle Soup - - + --LEGION [188028] = true, --Potion of the Old War [188027] = true, --Potion of Deadly Grace @@ -494,9 +501,7 @@ [188017] = true, --Ancient Mana Potion [188030] = true, --Leytorrent Potion [229206] = true, --Potion of Prolongued Power - - - + } function HotCornersOnEnter (self) @@ -526,7 +531,7 @@ tinsert (sort, {clicks [button_table.name] or 0, button_table}) end table.sort (sort, more_clicked) - + local last_button local disabled = LibHotCorners.db.profile.disabled @@ -624,6 +629,8 @@ end if (not UnitAffectingCombat ("player") and not InCombatLockdown()) then + + --update the icon for itemId, itemTable in pairs (LibHotCorners.ItemOnInventory) do itemTable [1] = 0 end @@ -649,25 +656,46 @@ local item_button = LibHotCorners:GetItemButton (index, self) if (item_button) then + item_button:SetNormalTexture (texture) item_button:SetHighlightTexture (texture) item_button:SetPushedTexture (texture) - item_button.item_count:SetText (itemCount or 0) - item_button:SetAttribute ("macrotext", "/use " .. GetItemInfo (itemId) .. ";\n/script HotCornersItemUsed=GetTime(); HotCorners:RefereshItems()") + itemCount = itemCount or 0 + if (itemCount > 1) then + item_button.item_count:SetText (itemCount or 0) + item_button.bg_item_count:Show() + else + item_button.item_count:SetText ("") + item_button.bg_item_count:Hide() + end + + if (not UnitAffectingCombat ("player") and not InCombatLockdown()) then + item_button:SetAttribute ("macrotext", "/use " .. GetItemInfo (itemId) .. ";\n/script HotCornersItemUsed=GetTime(); HotCorners:RefereshItems()") + item_button:GetNormalTexture():SetDesaturated (false) + --item_button:Enable() + else + item_button:GetNormalTexture():SetDesaturated (true) + --item_button:Disable() + end item_button.itemtable = itemTable if (not item_button:IsShown() or item_button:GetAlpha() < 1) then --- HotCornersStartAnimOnShow (item_button, "item_topleft") + -- HotCornersStartAnimOnShow (item_button, "item_topleft") + end + + if (not UnitAffectingCombat ("player") and not InCombatLockdown()) then + item_button:Show() end end index = index + 1 end - + LibHotCorners:RefereshProfessions (self, index) end + --/run local itemid=GetContainerItemID (0, 1);print (itemid) --UseContainerItem(bagID, slot[, onSelf]) end