Skip to content

Commit

Permalink
database: disable server query if not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
shagu committed Feb 27, 2024
1 parent edfeba3 commit 92527f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions database.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1731,6 +1731,12 @@ function pfDatabase:ScanServer()
end

function pfDatabase:QueryServer()
-- break here on incompatible versions
if not QueryQuestsCompleted then
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffccpf|cffffffffQuest: Option is not available on your server.")
return
end

QueryQuestsCompleted() -- Send the request to the server

local frame = CreateFrame("Frame") -- Create a new frame
Expand Down
2 changes: 1 addition & 1 deletion slashcmd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ SlashCmdList["PFDB"] = function(input, editbox)
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/db|cffffffff herbs [min, [max]] |cffcccccc - " .. pfQuest_Loc["Show herbs with skill range of [min] to [max]"])
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/db|cffffffff herbs auto |cffcccccc - " .. pfQuest_Loc["Show herbs with an appropriate skill level for your character"])
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/db|cffffffff scan |cffcccccc - " .. pfQuest_Loc["Scan the server for custom items"])
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/db|cffffffff query |cffcccccc - " .. pfQuest_Loc["Query the server for completed quests - WIP"])
DEFAULT_CHAT_FRAME:AddMessage("|cff33ffcc/db|cffffffff query |cffcccccc - " .. pfQuest_Loc["Query the server for completed quests"])
return
end

Expand Down

0 comments on commit 92527f4

Please sign in to comment.