[GH-ISSUE #1365] [server-thread] Hero of the Village gives no trading discount #388

Closed
opened 2026-11-02 15:38:43 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @rdbtCVS on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1365

Tested 83fa14e51b89eab728b8e233e9e5d95296bef93d, fresh equivalent worlds with explicit singleplayer mode flags.

Reproduce

  1. Find a farmer offering one emerald for 20 wheat. Record the ordinary price.
  2. Apply /effect give @s hero_of_the_village 60 0.
  3. Reopen trading and complete that offer with 20 wheat available.
  4. Compare --server-thread and --no-server-thread.

Expected: Hero I discounts this offer to 14 wheat. Native 26.3's villager price calculation applies the 30% Hero I reduction.

Actual: Old mode spends 14 and returns six wheat alongside one emerald. Threaded mode spends all 20, with the effect still active. Without Hero, both spend 20. This is an actual completed trade, not just a displayed price difference.

Reproduced in two fresh mode pairs using identical fixed offers and fresh villagers; authoritative player inventory confirms the payment amounts.

Evidence: .local/singleplayer-audit/entities-{f,g}/hero-trade-{old,threaded}/result.json and trade screenshots. Driver: tools/singleplayer_entities_audit.py --case hero-trade. Native bytecode: vanilla-bytecode/Villager.txt:updateSpecialPrices. No matching issue found.

Hypothesis: lan_open_merchant explicitly resets the guest merchant session's Hero level to None, despite the guest now having effects.

Acceptance: Active Hero discounts are reflected in both displayed costs and authoritative payment consumption in threaded trading; ordinary prices remain correct.

Originally created by @rdbtCVS on GitHub (Oct 23, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/1365 Tested `83fa14e51b89eab728b8e233e9e5d95296bef93d`, fresh equivalent worlds with explicit singleplayer mode flags. **Reproduce** 1. Find a farmer offering one emerald for 20 wheat. Record the ordinary price. 2. Apply `/effect give @s hero_of_the_village 60 0`. 3. Reopen trading and complete that offer with 20 wheat available. 4. Compare `--server-thread` and `--no-server-thread`. **Expected:** Hero I discounts this offer to 14 wheat. Native 26.3's villager price calculation applies the 30% Hero I reduction. **Actual:** Old mode spends 14 and returns six wheat alongside one emerald. Threaded mode spends all 20, with the effect still active. Without Hero, both spend 20. This is an actual completed trade, not just a displayed price difference. Reproduced in two fresh mode pairs using identical fixed offers and fresh villagers; authoritative player inventory confirms the payment amounts. Evidence: `.local/singleplayer-audit/entities-{f,g}/hero-trade-{old,threaded}/result.json` and trade screenshots. Driver: `tools/singleplayer_entities_audit.py --case hero-trade`. Native bytecode: `vanilla-bytecode/Villager.txt:updateSpecialPrices`. No matching issue found. **Hypothesis:** `lan_open_merchant` explicitly resets the guest merchant session's Hero level to None, despite the guest now having effects. **Acceptance:** Active Hero discounts are reflected in both displayed costs and authoritative payment consumption in threaded trading; ordinary prices remain correct.
Author
Owner

@ludovic111 commented on GitHub (Oct 25, 2026):

Claimed by rdbt on Discord (GitHub: rdbtCVS), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #1365).

<!-- gh-comment-id:6391877080 --> @ludovic111 commented on GitHub (Oct 25, 2026): Claimed by `rdbt` on Discord (GitHub: `rdbtCVS`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #1365). <!-- kira:work -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#388
No description provided.