From d33b15ef689c6b176bc3e5efb7ee6d57ca82ac67 Mon Sep 17 00:00:00 2001 From: funkydude Date: Fri, 1 Sep 2023 15:29:11 +0100 Subject: [PATCH] Fix some errors from the Alterac Valley module on classic, closes #135 --- .luacheckrc | 1 + Modules/AlteracValley_Vanilla.lua | 5 +++++ Modules/AlteracValley_Wrath.lua | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/.luacheckrc b/.luacheckrc index 4b67ec7..069c1de 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -6,6 +6,7 @@ exclude_files = { } ignore = { "111/SLASH_Capping1", -- slash handlers + "113/BasicMessageDialog", -- Alterac Valley popup "212/self", -- (W212) unused argument self } globals = { diff --git a/Modules/AlteracValley_Vanilla.lua b/Modules/AlteracValley_Vanilla.lua index 843461f..4914871 100644 --- a/Modules/AlteracValley_Vanilla.lua +++ b/Modules/AlteracValley_Vanilla.lua @@ -15,6 +15,7 @@ do [35739] = true, -- horde [35740] = true, -- horde [35741] = true, -- horde + [97507] = true, -- horde (classic era) } function mod:GOSSIP_SHOW() if not cap.db.profile.autoTurnIn then return end @@ -37,6 +38,8 @@ do self:SelectGossipID(35737) -- Upgrade to veteran units! elseif self:GetGossipID(35738) then -- Horde self:SelectGossipID(35738) -- Upgrade to champion units! + elseif self:GetGossipID(90270) then -- Alliance (WotLK classic) + self:SelectGossipID(90270) -- Upgrade to seasoned units! else local gossipOptions = GetGossipOptions() if gossipOptions[1] then @@ -45,6 +48,8 @@ do if not blockedIds[gossipTable.gossipOptionID] then print("|cFF33FF99Capping|r: NEW ID FOUND, TELL THE DEVS!", gossipTable.gossipOptionID, mobId, gossipTable.name) geterrorhandler()("|cFF33FF99Capping|r: NEW ID FOUND, TELL THE DEVS! ".. tostring(gossipTable.gossipOptionID) ..", ".. mobId ..", ".. tostring(gossipTable.name)) + BasicMessageDialog.Text:SetText("Capping error, see chat for details") + BasicMessageDialog:Show() return end end diff --git a/Modules/AlteracValley_Wrath.lua b/Modules/AlteracValley_Wrath.lua index 421a2ea..e383a57 100644 --- a/Modules/AlteracValley_Wrath.lua +++ b/Modules/AlteracValley_Wrath.lua @@ -15,6 +15,7 @@ do [35739] = true, -- horde [35740] = true, -- horde [35741] = true, -- horde + [97507] = true, -- horde (classic era) } function mod:GOSSIP_SHOW() if not cap.db.profile.autoTurnIn then return end @@ -37,6 +38,8 @@ do self:SelectGossipID(35737) -- Upgrade to veteran units! elseif self:GetGossipID(35738) then -- Horde self:SelectGossipID(35738) -- Upgrade to champion units! + elseif self:GetGossipID(90270) then -- Alliance (WotLK classic) + self:SelectGossipID(90270) -- Upgrade to seasoned units! else local gossipOptions = GetGossipOptions() if gossipOptions[1] then @@ -45,6 +48,8 @@ do if not blockedIds[gossipTable.gossipOptionID] then print("|cFF33FF99Capping|r: NEW ID FOUND, TELL THE DEVS!", gossipTable.gossipOptionID, mobId, gossipTable.name) geterrorhandler()("|cFF33FF99Capping|r: NEW ID FOUND, TELL THE DEVS! ".. tostring(gossipTable.gossipOptionID) ..", ".. mobId ..", ".. tostring(gossipTable.name)) + BasicMessageDialog.Text:SetText("Capping error, see chat for details") + BasicMessageDialog:Show() return end end