From 7669e6417312542937aaf1e5b3d505d07cb2b9b9 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 15 Aug 2020 19:29:24 +0200 Subject: [PATCH] core: remove leftover semicolons --- api/api.lua | 4 ++-- api/ui-widgets.lua | 10 +++++----- modules/autovendor.lua | 8 ++++---- modules/chat.lua | 4 ++-- modules/cooldown.lua | 2 +- modules/eqcompare.lua | 26 +++++++++++++------------- modules/player.lua | 2 +- modules/prediction.lua | 2 +- modules/roll.lua | 14 +++++++------- modules/sellvalue.lua | 8 ++++---- modules/tracking.lua | 2 +- pfUI.lua | 10 +++++----- skins/blizzard/inspect.lua | 2 +- 13 files changed, 47 insertions(+), 47 deletions(-) diff --git a/api/api.lua b/api/api.lua index 3da2bb3c..ff4e0495 100644 --- a/api/api.lua +++ b/api/api.lua @@ -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 diff --git a/api/ui-widgets.lua b/api/ui-widgets.lua index cb19128c..9427d305 100644 --- a/api/ui-widgets.lua +++ b/api/ui-widgets.lua @@ -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 ] diff --git a/modules/autovendor.lua b/modules/autovendor.lua index 1e20c4eb..0f1169be 100644 --- a/modules/autovendor.lua +++ b/modules/autovendor.lua @@ -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) diff --git a/modules/chat.lua b/modules/chat.lua index 63721ea5..facb76eb 100644 --- a/modules/chat.lua +++ b/modules/chat.lua @@ -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 diff --git a/modules/cooldown.lua b/modules/cooldown.lua index a06898c8..458f9dfd 100644 --- a/modules/cooldown.lua +++ b/modules/cooldown.lua @@ -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 diff --git a/modules/eqcompare.lua b/modules/eqcompare.lua index 0aa6a073..74a2d304 100644 --- a/modules/eqcompare.lua +++ b/modules/eqcompare.lua @@ -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 diff --git a/modules/player.lua b/modules/player.lua index 18b7eae7..59979fff 100644 --- a/modules/player.lua +++ b/modules/player.lua @@ -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" diff --git a/modules/prediction.lua b/modules/prediction.lua index 09f384fe..b0b7f56d 100644 --- a/modules/prediction.lua +++ b/modules/prediction.lua @@ -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 diff --git a/modules/roll.lua b/modules/roll.lua index e11bf8a1..b6a741e3 100644 --- a/modules/roll.lua +++ b/modules/roll.lua @@ -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 diff --git a/modules/sellvalue.lua b/modules/sellvalue.lua index 9bfcc429..d5ee67f9 100644 --- a/modules/sellvalue.lua +++ b/modules/sellvalue.lua @@ -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() diff --git a/modules/tracking.lua b/modules/tracking.lua index 399a9ad9..ef84fe2d 100644 --- a/modules/tracking.lua +++ b/modules/tracking.lua @@ -206,6 +206,6 @@ pfUI:RegisterModule("tracking", "vanilla", function () end }) end - end, "MENU"); + end, "MENU") end end) diff --git a/pfUI.lua b/pfUI.lua index c8dbe392..266f3cb1 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -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 diff --git a/skins/blizzard/inspect.lua b/skins/blizzard/inspect.lua index a19bfeaf..4e18e47c 100644 --- a/skins/blizzard/inspect.lua +++ b/skins/blizzard/inspect.lua @@ -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