[lua] Refresh drink buff effects on re-use instead of No effect#10911
Open
PocketDev89 wants to merge 1 commit into
Open
[lua] Refresh drink buff effects on re-use instead of No effect#10911PocketDev89 wants to merge 1 commit into
PocketDev89 wants to merge 1 commit into
Conversation
Xaver-DaRed
reviewed
Jul 26, 2026
| target:addStatusEffect(xi.effect.REGEN, { power = 1, duration = 120, origin = user, tick = 3 }) | ||
| end | ||
| else | ||
| local duration = target:getEquipID(xi.slot.BODY) == 14520 and 150 or 120 -- Dream Robe +1 |
Contributor
There was a problem hiding this comment.
local duration = target:getEquipID(xi.slot.BODY) == xi.item.DREAM_ROBE_P1 and 150 or 120
Contributor
There was a problem hiding this comment.
amend + force push. Dont create a new commit.
Consumable drinks, juices, milks and au laits guarded on hasStatusEffect and printed "No effect" when the buff was already active, so re-using one before it expired never refreshed the timer. On retail, re-drinking refreshes the effect. Use the addStatusEffect return instead: an equal or higher power effect overwrites and refreshes the duration, and "No effect" only shows when a genuinely stronger effect (e.g. a Regen spell) is already active. Covers 19 standard REGEN/REFRESH drinks; quest and event drinks are left untouched. The Dream Robe/Trousers gear bonuses are preserved.
PocketDev89
force-pushed
the
fix-drink-reuse-refresh
branch
from
July 27, 2026 01:12
3a13b0d to
58e78e3
Compare
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?
Fixes the "No effect on " issue when a player uses the same drink or one of equal or higher potency before the effect wears off.
retail screenshot here

quick note that i only changed the ones i tested on retail that you could craft or buy from a vendor. any drink from/for a quest or from a special event i did not test so, i did not change those.
Steps to test these changes
drink a yagudo drink for example and then drink another one right after or before the original drink effect wears off.