Cherry-picked from main (c539905).
Prevents infinite loop when stage binary data never arrives by
limiting to 10 iterations (10 seconds) before returning empty response.
Cherry-picked from main (7459ded) with conflict resolution.
The original fix changed the poogie outfit unlock from incorrect
math.Pow calculation to direct value assignment.
Also removes unused math import (531b3d2).
Add comprehensive tests documenting current behavior before applying
fixes from main branch. Tests cover:
- Cafe item PointCost parsing (uint32 vs uint16 for different client modes)
- Guild poogie outfit unlock calculation bug (math.Pow issue)
- Guild manage right nil pointer condition (&& vs || logic)
- InfoGuild applicant GR field size for <G10 clients
- Stage binary wait infinite loop risk (no timeout)
- Entrance server hardcoded clan member limit
- Renamed config key from GuildMealDuration to ClanMealDuration
- Changed unit from minutes to seconds (matching upstream convention)
- Updated handler to use seconds-based calculation
- Updated documentation and examples
This fixes the bug where clan meals were not being shared between
guild members when using a config.json with the upstream naming.
Distributions now read items from the distribution_items table instead of
requiring a pre-built binary data blob. This enables creating distributions
via simple SQL inserts rather than generating binary data manually.
Changes:
- Add getDistributionItems() to fetch items from distribution_items table
- Update handleMsgMhfApplyDistItem to build response from table data
- Move server-side rewards (points, RP) to handleMsgMhfAcquireDistItem
- Support G8+ item format (13 bytes per item)