fix(rewardwall): send the daily reward source byte Canary expects (#1748)

Bug Fixes:
- Improved daily reward collection behavior so shrine rewards are handled correctly.
- Shrine-based rewards now collect immediately for free and return users to the reward wall UI.
- Non-shrine reward confirmations now send the proper reward flag, preventing incorrect reward requests.
This commit is contained in:
mimus-assa 2026-07-18 13:25:54 -06:00 committed by GitHub
parent a4cbf1a575
commit 76a3260fba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -83,7 +83,9 @@ local BOX_CONFIGS = {
title = "Confirmation of using Instant Reward Access",
content = "Remember! You can always collect your daily reward for free by visiting a reward shrine!\n\nYou Currently own 3x Instant Reward Access. Do you really want to use one to claim your daily reward now?",
okCallback = function()
g_game.requestGetRewardDaily(bonusShrine, actualUsed)
-- Canary expects 0 = shrine / 1 = panel (inverse of the OpenRewardWall byte
-- stored in bonusShrine, where 1 = shrine / 0 = panel)
g_game.requestGetRewardDaily(bonusShrine == OPEN_WINDOWS.SHRINE and 0 or 1, actualUsed)
if windowsPickWindow then
windowsPickWindow:destroy()
windowsPickWindow = nil
@ -679,6 +681,17 @@ function onClickBtnOk()
if table.empty(actualUsed) then
return
end
if bonusShrine == OPEN_WINDOWS.SHRINE then
-- Collecting at a reward shrine is free: no Instant Reward Access confirmation.
-- Canary expects 0 = shrine on the collect packet.
g_game.requestGetRewardDaily(0, actualUsed)
if windowsPickWindow then
windowsPickWindow:destroy()
windowsPickWindow = nil
end
show()
return
end
managerMessageBoxWindow(CONST_WINDOWS_BOX.CONFIRMATION_IRA)
end