Skip to content

Commit

Permalink
Fix some errors from the Alterac Valley module on classic, closes #135
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Sep 1, 2023
1 parent e2a20c0 commit d33b15e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exclude_files = {
}
ignore = {
"111/SLASH_Capping1", -- slash handlers
"113/BasicMessageDialog", -- Alterac Valley popup
"212/self", -- (W212) unused argument self
}
globals = {
Expand Down
5 changes: 5 additions & 0 deletions Modules/AlteracValley_Vanilla.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
5 changes: 5 additions & 0 deletions Modules/AlteracValley_Wrath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d33b15e

Please sign in to comment.