Skip to content

[lua] Refresh drink buff effects on re-use instead of No effect#10911

Open
PocketDev89 wants to merge 1 commit into
LandSandBoat:basefrom
PocketDev89:fix-drink-reuse-refresh
Open

[lua] Refresh drink buff effects on re-use instead of No effect#10911
PocketDev89 wants to merge 1 commit into
LandSandBoat:basefrom
PocketDev89:fix-drink-reuse-refresh

Conversation

@PocketDev89

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

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
image

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.

Comment thread scripts/items/jug_of_selbina_milk.lua Outdated
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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local duration = target:getEquipID(xi.slot.BODY) == xi.item.DREAM_ROBE_P1 and 150 or 120

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amend + force push. Dont create a new commit.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed. thanks

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
PocketDev89 force-pushed the fix-drink-reuse-refresh branch from 3a13b0d to 58e78e3 Compare July 27, 2026 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants