mirror of
https://github.com/mehah/otclient
synced 2026-08-15 16:29:06 -04:00
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:
parent
a4cbf1a575
commit
76a3260fba
1 changed files with 14 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue