mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-05 13:10:00 +00:00
core: remove leftover semicolons
This commit is contained in:
+2
-2
@@ -249,14 +249,14 @@ function pfUI.api.GetItemCount(itemName)
|
||||
local count = 0
|
||||
for bag = 4, 0, -1 do
|
||||
for slot = 1, GetContainerNumSlots(bag) do
|
||||
local _, itemCount = GetContainerItemInfo(bag, slot);
|
||||
local _, itemCount = GetContainerItemInfo(bag, slot)
|
||||
if itemCount then
|
||||
local itemLink = GetContainerItemLink(bag,slot)
|
||||
local _, _, itemParse = strfind(itemLink, "(%d+):")
|
||||
local queryName = GetItemInfo(itemParse)
|
||||
if queryName and queryName ~= "" then
|
||||
if queryName == itemName then
|
||||
count = count + itemCount;
|
||||
count = count + itemCount
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
+5
-5
@@ -709,13 +709,13 @@ function pfUI.api.SkinRotateButton(button)
|
||||
button:SetWidth(button:GetWidth() - 18)
|
||||
button:SetHeight(button:GetHeight() - 18)
|
||||
|
||||
button:GetNormalTexture():SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65);
|
||||
button:GetPushedTexture():SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65);
|
||||
button:GetNormalTexture():SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65)
|
||||
button:GetPushedTexture():SetTexCoord(0.3, 0.29, 0.3, 0.65, 0.69, 0.29, 0.69, 0.65)
|
||||
|
||||
button:GetHighlightTexture():SetTexture(cr, cg, cb, .25);
|
||||
button:GetHighlightTexture():SetTexture(cr, cg, cb, .25)
|
||||
|
||||
button:GetPushedTexture():SetAllPoints(button:GetNormalTexture());
|
||||
button:GetHighlightTexture():SetAllPoints(button:GetNormalTexture());
|
||||
button:GetPushedTexture():SetAllPoints(button:GetNormalTexture())
|
||||
button:GetHighlightTexture():SetAllPoints(button:GetNormalTexture())
|
||||
end
|
||||
|
||||
-- [ Skin Close Button ]
|
||||
|
||||
@@ -124,13 +124,13 @@ pfUI:RegisterModule("autovendor", "vanilla:tbc", function ()
|
||||
autovendor.button.icon = autovendor.button:CreateTexture("ARTWORK")
|
||||
autovendor.button.icon:SetTexture("Interface\\Icons\\Spell_Shadow_SacrificialShield")
|
||||
autovendor.button:SetScript("OnEnter", function()
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
|
||||
GameTooltip:SetText(T["Sell Grey Items"]);
|
||||
GameTooltip:Show();
|
||||
GameTooltip:SetOwner(this, "ANCHOR_RIGHT")
|
||||
GameTooltip:SetText(T["Sell Grey Items"])
|
||||
GameTooltip:Show()
|
||||
end)
|
||||
|
||||
autovendor.button:SetScript("OnLeave", function()
|
||||
GameTooltip:Hide();
|
||||
GameTooltip:Hide()
|
||||
end)
|
||||
SkinButton(autovendor.button, nil, nil, nil, autovendor.button.icon)
|
||||
|
||||
|
||||
+2
-2
@@ -707,8 +707,8 @@ pfUI:RegisterModule("chat", "vanilla:tbc", function ()
|
||||
local name = strsub(link, 8)
|
||||
if ( name and (strlen(name) > 0) ) then
|
||||
local name, _ = strsplit(":", name)
|
||||
name = gsub(name, "([^%s]*)%s+([^%s]*)%s+([^%s]*)", "%3");
|
||||
name = gsub(name, "([^%s]*)%s+([^%s]*)", "%2");
|
||||
name = gsub(name, "([^%s]*)%s+([^%s]*)%s+([^%s]*)", "%3")
|
||||
name = gsub(name, "([^%s]*)%s+([^%s]*)", "%2")
|
||||
if IsShiftKeyDown() and ChatFrameEditBox:IsVisible() then
|
||||
ChatFrameEditBox:Insert("|cffffffff|Hplayer:"..name.."|h["..name.."]|h|r")
|
||||
return
|
||||
|
||||
@@ -80,7 +80,7 @@ pfUI:RegisterModule("cooldown", "vanilla:tbc", function ()
|
||||
this.cd.duration = duration
|
||||
this.cd:Show()
|
||||
elseif(this.cd) then
|
||||
this.cd:Hide();
|
||||
this.cd:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+13
-13
@@ -1,9 +1,9 @@
|
||||
pfUI:RegisterModule("eqcompare", "vanilla", function ()
|
||||
local loc = pfUI.cache["locale"]
|
||||
for key, value in pairs(L["itemtypes"]) do setglobal(key, value) end
|
||||
INVTYPE_WEAPON_OTHER = INVTYPE_WEAPON.."_other";
|
||||
INVTYPE_FINGER_OTHER = INVTYPE_FINGER.."_other";
|
||||
INVTYPE_TRINKET_OTHER = INVTYPE_TRINKET.."_other";
|
||||
INVTYPE_WEAPON_OTHER = INVTYPE_WEAPON.."_other"
|
||||
INVTYPE_FINGER_OTHER = INVTYPE_FINGER.."_other"
|
||||
INVTYPE_TRINKET_OTHER = INVTYPE_TRINKET.."_other"
|
||||
|
||||
local slotTable = {
|
||||
[INVTYPE_2HWEAPON] = "MainHandSlot",
|
||||
@@ -142,33 +142,33 @@ pfUI:RegisterModule("eqcompare", "vanilla", function ()
|
||||
if x > ltrigger then ltrigger = nil end
|
||||
|
||||
-- first tooltip
|
||||
ShoppingTooltip1:SetOwner(this, "ANCHOR_NONE");
|
||||
ShoppingTooltip1:ClearAllPoints();
|
||||
ShoppingTooltip1:SetOwner(this, "ANCHOR_NONE")
|
||||
ShoppingTooltip1:ClearAllPoints()
|
||||
|
||||
if ltrigger then
|
||||
ShoppingTooltip1:SetPoint("BOTTOMLEFT", this, "BOTTOMRIGHT", 0, 0);
|
||||
ShoppingTooltip1:SetPoint("BOTTOMLEFT", this, "BOTTOMRIGHT", 0, 0)
|
||||
else
|
||||
ShoppingTooltip1:SetPoint("BOTTOMRIGHT", this, "BOTTOMLEFT", -border*2-1, 0);
|
||||
ShoppingTooltip1:SetPoint("BOTTOMRIGHT", this, "BOTTOMLEFT", -border*2-1, 0)
|
||||
end
|
||||
|
||||
ShoppingTooltip1:SetInventoryItem("player", slotID)
|
||||
ShoppingTooltip1:Show();
|
||||
ShoppingTooltip1:Show()
|
||||
|
||||
-- second tooltip
|
||||
if slotTable[slotType .. "_other"] then
|
||||
local slotID_other = GetInventorySlotInfo(slotTable[slotType .. "_other"])
|
||||
|
||||
ShoppingTooltip2:SetOwner(this, "ANCHOR_NONE");
|
||||
ShoppingTooltip2:ClearAllPoints();
|
||||
ShoppingTooltip2:SetOwner(this, "ANCHOR_NONE")
|
||||
ShoppingTooltip2:ClearAllPoints()
|
||||
|
||||
if ltrigger then
|
||||
ShoppingTooltip2:SetPoint("BOTTOMLEFT", ShoppingTooltip1, "BOTTOMRIGHT", 0, 0);
|
||||
ShoppingTooltip2:SetPoint("BOTTOMLEFT", ShoppingTooltip1, "BOTTOMRIGHT", 0, 0)
|
||||
else
|
||||
ShoppingTooltip2:SetPoint("BOTTOMRIGHT", ShoppingTooltip1, "BOTTOMLEFT", -border*2-1, 0);
|
||||
ShoppingTooltip2:SetPoint("BOTTOMRIGHT", ShoppingTooltip1, "BOTTOMLEFT", -border*2-1, 0)
|
||||
end
|
||||
|
||||
ShoppingTooltip2:SetInventoryItem("player", slotID_other)
|
||||
ShoppingTooltip2:Show();
|
||||
ShoppingTooltip2:Show()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ pfUI:RegisterModule("player", "vanilla:tbc", function ()
|
||||
UpdateMovable(pfUI.uf.player)
|
||||
|
||||
-- Replace default's RESET_INSTANCES button with an always working one
|
||||
UnitPopupButtons["RESET_INSTANCES_FIX"] = { text = RESET_INSTANCES, dist = 0 };
|
||||
UnitPopupButtons["RESET_INSTANCES_FIX"] = { text = RESET_INSTANCES, dist = 0 }
|
||||
for id, text in pairs(UnitPopupMenus["SELF"]) do
|
||||
if text == "RESET_INSTANCES" then
|
||||
UnitPopupMenus["SELF"][id] = "RESET_INSTANCES_FIX"
|
||||
|
||||
@@ -415,7 +415,7 @@ pfUI:RegisterModule("prediction", "vanilla:tbc", function ()
|
||||
|
||||
pfUI.prediction.sender:SetScript("OnEvent", function()
|
||||
if event == "CHAT_MSG_SPELL_SELF_BUFF" then -- vanilla
|
||||
local spell, _, heal = cmatch(arg1, HEALEDSELFOTHER) -- "Your %s heals %s for %d.";
|
||||
local spell, _, heal = cmatch(arg1, HEALEDSELFOTHER) -- "Your %s heals %s for %d."
|
||||
if spell and heal then
|
||||
if spell == spell_queue[1] then UpdateCache(spell_queue[2], heal) end
|
||||
return
|
||||
|
||||
+7
-7
@@ -8,7 +8,7 @@ pfUI:RegisterModule("roll", "vanilla:tbc", function ()
|
||||
local LOOT_ROLL_PASSED = string.gsub(LOOT_ROLL_PASSED, "%%s|Hitem:%%d:%%d:%%d:%%d|h%[%%s%]|h%%s", "%%s")
|
||||
|
||||
-- try to detect the everyone string
|
||||
local _, _, everyone, _ = strfind(LOOT_ROLL_ALL_PASSED, LOOT_ROLL_PASSED);
|
||||
local _, _, everyone, _ = strfind(LOOT_ROLL_ALL_PASSED, LOOT_ROLL_PASSED)
|
||||
pfUI.roll.blacklist = { YOU, everyone }
|
||||
|
||||
pfUI.roll.cache = {}
|
||||
@@ -16,19 +16,19 @@ pfUI:RegisterModule("roll", "vanilla:tbc", function ()
|
||||
pfUI.roll.scan = CreateFrame("Frame", "pfLootRollMonitor", UIParent)
|
||||
pfUI.roll.scan:RegisterEvent("CHAT_MSG_LOOT")
|
||||
pfUI.roll.scan:SetScript("OnEvent", function()
|
||||
local player, item = cmatch(arg1, LOOT_ROLL_GREED);
|
||||
local player, item = cmatch(arg1, LOOT_ROLL_GREED)
|
||||
if player and item then
|
||||
pfUI.roll:AddCache(item, player, "GREED")
|
||||
return
|
||||
end
|
||||
|
||||
local player, item = cmatch(arg1, LOOT_ROLL_NEED);
|
||||
local player, item = cmatch(arg1, LOOT_ROLL_NEED)
|
||||
if player and item then
|
||||
pfUI.roll:AddCache(item, player, "NEED")
|
||||
return
|
||||
end
|
||||
|
||||
local player, item = cmatch(arg1, LOOT_ROLL_PASSED);
|
||||
local player, item = cmatch(arg1, LOOT_ROLL_PASSED)
|
||||
if player and item then
|
||||
pfUI.roll:AddCache(item, player, "PASS")
|
||||
return
|
||||
@@ -41,7 +41,7 @@ pfUI:RegisterModule("roll", "vanilla:tbc", function ()
|
||||
if name == invalid then return end
|
||||
end
|
||||
|
||||
local _, _, itemLink = string.find(hyperlink, "(item:%d+:%d+:%d+:%d+)");
|
||||
local _, _, itemLink = string.find(hyperlink, "(item:%d+:%d+:%d+:%d+)")
|
||||
local itemName = GetItemInfo(itemLink)
|
||||
|
||||
-- delete obsolete tables
|
||||
@@ -110,7 +110,7 @@ pfUI:RegisterModule("roll", "vanilla:tbc", function ()
|
||||
DressUpItemLink(GetLootRollItemLink(this:GetParent().rollID))
|
||||
elseif IsShiftKeyDown() then
|
||||
if ChatFrameEditBox:IsVisible() then
|
||||
ChatFrameEditBox:Insert(GetLootRollItemLink(this:GetParent().rollID));
|
||||
ChatFrameEditBox:Insert(GetLootRollItemLink(this:GetParent().rollID))
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -271,7 +271,7 @@ pfUI:RegisterModule("roll", "vanilla:tbc", function ()
|
||||
end
|
||||
|
||||
function pfUI.roll:UpdateLootRoll(id)
|
||||
local texture, name, count, quality, bop = GetLootRollItemInfo(pfUI.roll.frames[id].rollID);
|
||||
local texture, name, count, quality, bop = GetLootRollItemInfo(pfUI.roll.frames[id].rollID)
|
||||
local color = ITEM_QUALITY_COLORS[quality]
|
||||
|
||||
pfUI.roll.frames[id].itemname = name
|
||||
|
||||
@@ -13,15 +13,15 @@ pfUI:RegisterModule("sellvalue", "vanilla:tbc", function ()
|
||||
frame:AddLine(" ")
|
||||
|
||||
if count > 1 then
|
||||
frame:AddDoubleLine(T["Sell"] .. ":", CreateGoldString(sell) .. "|cff555555 // " .. CreateGoldString(sell*count), 1, 1, 1);
|
||||
frame:AddDoubleLine(T["Sell"] .. ":", CreateGoldString(sell) .. "|cff555555 // " .. CreateGoldString(sell*count), 1, 1, 1)
|
||||
else
|
||||
frame:AddDoubleLine(T["Sell"] .. ":", CreateGoldString(sell * count), 1, 1, 1);
|
||||
frame:AddDoubleLine(T["Sell"] .. ":", CreateGoldString(sell * count), 1, 1, 1)
|
||||
end
|
||||
|
||||
if count > 1 then
|
||||
frame:AddDoubleLine(T["Buy"] .. ":", CreateGoldString(buy) .. "|cff555555 // " .. CreateGoldString(buy*count), 1, 1, 1);
|
||||
frame:AddDoubleLine(T["Buy"] .. ":", CreateGoldString(buy) .. "|cff555555 // " .. CreateGoldString(buy*count), 1, 1, 1)
|
||||
else
|
||||
frame:AddDoubleLine(T["Buy"] .. ":", CreateGoldString(buy), 1, 1, 1);
|
||||
frame:AddDoubleLine(T["Buy"] .. ":", CreateGoldString(buy), 1, 1, 1)
|
||||
end
|
||||
end
|
||||
frame:Show()
|
||||
|
||||
@@ -206,6 +206,6 @@ pfUI:RegisterModule("tracking", "vanilla", function ()
|
||||
end
|
||||
})
|
||||
end
|
||||
end, "MENU");
|
||||
end, "MENU")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -94,11 +94,11 @@ setmetatable(pfUI.env, {__index = getfenv(0)})
|
||||
|
||||
function pfUI:UpdateColors()
|
||||
ManaBarColor = ManaBarColor or {}
|
||||
ManaBarColor[0] = { r = 0.00, g = 0.00, b = 1.00, prefix = TEXT(MANA) };
|
||||
ManaBarColor[1] = { r = 1.00, g = 0.00, b = 0.00, prefix = TEXT(RAGE_POINTS) };
|
||||
ManaBarColor[2] = { r = 1.00, g = 0.50, b = 0.25, prefix = TEXT(FOCUS_POINTS) };
|
||||
ManaBarColor[3] = { r = 1.00, g = 1.00, b = 0.00, prefix = TEXT(ENERGY_POINTS) };
|
||||
ManaBarColor[4] = { r = 0.00, g = 1.00, b = 1.00, prefix = TEXT(HAPPINESS_POINTS) };
|
||||
ManaBarColor[0] = { r = 0.00, g = 0.00, b = 1.00, prefix = TEXT(MANA) }
|
||||
ManaBarColor[1] = { r = 1.00, g = 0.00, b = 0.00, prefix = TEXT(RAGE_POINTS) }
|
||||
ManaBarColor[2] = { r = 1.00, g = 0.50, b = 0.25, prefix = TEXT(FOCUS_POINTS) }
|
||||
ManaBarColor[3] = { r = 1.00, g = 1.00, b = 0.00, prefix = TEXT(ENERGY_POINTS) }
|
||||
ManaBarColor[4] = { r = 0.00, g = 1.00, b = 1.00, prefix = TEXT(HAPPINESS_POINTS) }
|
||||
|
||||
if pfUI.expansion == "vanilla" then
|
||||
-- update table to get unknown colors and blue shamans for vanilla
|
||||
|
||||
@@ -202,7 +202,7 @@ pfUI:RegisterSkin("Inspect", "vanilla", function ()
|
||||
local retry = false
|
||||
|
||||
if link and slot.hasItem then
|
||||
local _, _, link = string.find(link, "(item:%d+:%d+:%d+:%d+)");
|
||||
local _, _, link = string.find(link, "(item:%d+:%d+:%d+:%d+)")
|
||||
local _, _, quality = GetItemInfo(link)
|
||||
|
||||
if not quality then
|
||||
|
||||
Reference in New Issue
Block a user