OnPlayerConsumableUse: Difference between revisions
Jump to navigation
Jump to search
Update Lua event reference |
Correct legacy consumable callback documentation |
||
| Line 1: | Line 1: | ||
= onPlayerConsumableUse = | = onPlayerConsumableUse = | ||
<div style="background:#fff5f5; border:1px solid #d13b3b; border-left:5px solid #d13b3b; color:#111111; padding:0.85rem 1rem; margin:0.75rem 0 1rem;"> | |||
<div style="color:#111111; font-weight:bold; letter-spacing:0.04em;">LEGACY NAME — NOT EMITTED BY THE PRODUCTION SERVER</div> | |||
<div style="color:#111111; margin-top:0.25rem;">This page previously described a callback that is not connected to the production consumable pipeline. Do not register new code for <code>onPlayerConsumableUse</code>.</div> | |||
</div> | |||
The old signature covered only a legacy mana-result payload and did not represent food, health restoration, periodic effects, or the current two-stage durable inventory transaction. | |||
== | == Replacement from update 0.1.3 == | ||
Use the callback that matches the information your server resource needs: | |||
* [[onPlayerConsumableDurablySettled]] — the primary read-only success callback after inventory and the final authoritative snapshot are durable. | |||
* [[onPlayerConsumableEffectTick]] — each successfully applied, non-zero health or mana tick from a periodic consumable. | |||
* [[onPlayerConsumableCommitRequested]] — advanced stage-one persistence lifecycle notification. | |||
* [[onPlayerConsumableFinalizeRequested]] — advanced final-snapshot persistence lifecycle notification. | |||
* [[onPlayerConsumableDetachedSnapshot]] — advanced disconnect-recovery lifecycle notification. | |||
The last three callbacks are transaction infrastructure owned by the bundled <code>gothic_rp</code> resource. Other resources may observe them, but must not remove inventory, apply progression values, or attempt to acknowledge the transaction. | |||
< | |||
There is no one-to-one server-side rejection callback under the legacy name. Pre-validation rejection and the client-visible result remain part of the authoritative native protocol rather than this Lua event. | |||
[[Category:Lua Events]] | [[Category:Lua Events]] | ||
[[Category: | [[Category:Deprecated API]] | ||
Latest revision as of 14:06, 8 September 2026
onPlayerConsumableUse
LEGACY NAME — NOT EMITTED BY THE PRODUCTION SERVER
This page previously described a callback that is not connected to the production consumable pipeline. Do not register new code for
onPlayerConsumableUse.The old signature covered only a legacy mana-result payload and did not represent food, health restoration, periodic effects, or the current two-stage durable inventory transaction.
Replacement from update 0.1.3
Use the callback that matches the information your server resource needs:
- onPlayerConsumableDurablySettled — the primary read-only success callback after inventory and the final authoritative snapshot are durable.
- onPlayerConsumableEffectTick — each successfully applied, non-zero health or mana tick from a periodic consumable.
- onPlayerConsumableCommitRequested — advanced stage-one persistence lifecycle notification.
- onPlayerConsumableFinalizeRequested — advanced final-snapshot persistence lifecycle notification.
- onPlayerConsumableDetachedSnapshot — advanced disconnect-recovery lifecycle notification.
The last three callbacks are transaction infrastructure owned by the bundled gothic_rp resource. Other resources may observe them, but must not remove inventory, apply progression values, or attempt to acknowledge the transaction.
There is no one-to-one server-side rejection callback under the legacy name. Pre-validation rejection and the client-visible result remain part of the authoritative native protocol rather than this Lua event.