[lua] Fix inventory-full check blocking gil and spell rewards in avatar trials - #11088
Open
Davraena wants to merge 2 commits into
Open
[lua] Fix inventory-full check blocking gil and spell rewards in avatar trials#11088Davraena wants to merge 2 commits into
Davraena wants to merge 2 commits into
Conversation
The four un-migrated Trial NPCs guard their reward handling with:
if player:getFreeSlotsCount() == 0 and (option ~= 5 or option ~= 6) then
No value can differ from both 5 and 6, so the parenthesised clause is
always true and cannot affect the result. Options 5 and 6 are the 10,000
gil reward and the avatar spell, neither of which needs inventory space,
but with a full inventory both are refused and the player receives
nothing. The quest is not completed and the Whisper key item is not
consumed, so the reward is unreachable until inventory is freed. The
error message also renders with a blank item name, since `item` is still
0 on those branches.
Use `and` so the inventory check applies only to the item rewards, which
matches the already-migrated Trial_by_Fire and Trial_by_Earth: both gate
completion on whether the reward was actually granted, and neither
applies an inventory check to the gil or spell options.
Affects Trial by Ice (Gulmama), Wind (Agado-Pugado), Lightning (Ripapa)
and Water (Edal-Tahdal). Fire and Earth are already migrated to the
Interaction Framework and are unaffected.
Xaver-DaRed
reviewed
Aug 15, 2026
| end | ||
|
|
||
| if player:getFreeSlotsCount() == 0 and (option ~= 5 or option ~= 6) then | ||
| if player:getFreeSlotsCount() == 0 and (option ~= 5 and option ~= 6) then |
Contributor
There was a problem hiding this comment.
all of this changes should be
if
player:getFreeSlotsCount() == 0 and
(option < 5 or option > 6)
thenI think its more clear this way, imo
Contributor
Author
There was a problem hiding this comment.
Ok retested after change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I affirm:
What does this pull request do?
The four un-migrated Trial NPCs guard their reward handling with:
The parenthesised check is always true, so the guard applies to every option. With a full inventory, both gil and pact rewards are refused and the player receives nothing. The quest is not completed and the Whisper key item is not consumed. The error message renders with a blank item name.
Use
andso the inventory check applies only to the item rewards, which matches the already-migrated Trial_by_Fire and Trial_by_Earth.Affects Trial by Ice (Gulmama), Wind (Agado-Pugado), Lightning (Ripapa) and Water (Edal-Tahdal).
Steps to test these changes
Talk to Agado-Pugado and select a reward.
Before: options 5 (10,000 gil) and 6 (Garuda) are both refused with You cannot obtain the . — blank item name — no reward given, quest not completed, Whisper of Gales not consumed.
After: both are granted and the quest completes normally on a full inventory.
Verified in-client on Trial by Wind; the other three NPCs are character-identical.