Skip to content

Commit

Permalink
Mark message as seen directly in message dialog function for realm bu…
Browse files Browse the repository at this point in the history
…lletins
  • Loading branch information
brightrim committed Oct 2, 2023
1 parent e18a2f5 commit d722f36
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion base/townManagement.lua
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ function townProperties(user, toolTown, SourceItem)
user:requestSelectionDialog(dialog)
end

function TownAnnouncement(user, toolTown)
local function messageSeen(user, toolTown)

local townNames = {"Cadomyr", "Runewick", "Galmair"}
local townBoardQuestIds = {Runewick = 256, Cadomyr = 257, Galmair = 258}
Expand All @@ -261,6 +261,11 @@ function TownAnnouncement(user, toolTown)
if foundLatest and tonumber(latest) ~= lastSeen then
user:setQuestProgress(townQuestId, tonumber(latest))
end
end

function TownAnnouncement(user, toolTown)

messageSeen(user, toolTown)

-- selection dialog
local callback = function(dialog)
Expand Down Expand Up @@ -292,6 +297,8 @@ end

function TownAnnouncementShow(User,toolTown)

messageSeen(User, toolTown)

-- message dialog
local callback = function() end --empty callback
local title = common.GetNLS(User, "Derzeitige Ankündigung", "Current announcement")
Expand Down

0 comments on commit d722f36

Please sign in to comment.