Skip to content

Guild invitations, personal shops and the trade window - #520

Merged
neeerp merged 3 commits into
masterfrom
v83/guild-invites-shops
Oct 18, 2026
Merged

neeerp merged 3 commits into
masterfrom
v83/guild-invites-shops

Conversation

@neeerp

@neeerp neeerp commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Stacked on #519 (v83/wording-and-dialogs). Please change the base to master once #519 is merged, since GitHub won't retarget it here.

What changed

  • Guild invitations, leaving and expelling (L178):
    • The master and Jr. Masters invite players on their channel.
    • Members can leave or be expelled, on the server and in HeavenClient.
  • Personal shops (L164):
    • A player with a store permit opens a shop on a Free Market map, lists items in bundles, and sells to up to three visitors.
    • The room lives in the field next to trading rooms.
  • Trade window (L164): text and avatars are drawn as v83 does. The partner faces right, names are white on the dark tags, and the chat log follows the mini-room log.

Verification

  • New harness test personal_shop; guilds extended.
  • New client test personal_shop; guild extended.
  • This layer passes cargo fmt --check and cargo check --workspace --tests.
  • At the top of the stack the full harness suite passes (run at 45e356d, the last server commit; the commits after it change only HeavenClient). All 83 client tests pass in a debug build.

The master and Jr. Masters can now invite players on their channel, and
members can leave or be expelled, on both the server and HeavenClient.

The server reads GUILD_OPERATION modes 5 to 8 and DENY_GUILD_REQUEST. The
world directory finds the invitee by name on the inviter's channel and
keeps one guild's invitation for each invitee for three minutes. It
passes a refusal back to the inviter once. Joining adds the member at
rank 5 inside a transaction that locks the guild, so concurrent joins
can't pass its capacity. Leaving and expelling follow the client's rank
rules, and the map sees the guild tag go.

The client shows v83's guild invite card ("from '<name>'" over "Guild
invite"). Like v83, it refuses an invitation by itself while a guild
card is already up or a window that holds the cursor is open. It handles
the join, leave, expel and refusal modes. /guildinfo, /leaveguild,
/guildinvite and /guildexpel make v83's checks before asking the server.
The Guild tab's INVITE, LEAVE and EXPEL buttons use the same commands
and follow FUN_0090f17c's enable rules.
A player with a store permit can now open a personal shop on a Free
Market map, list items in bundles, and sell them to up to three visitors.
The room lives in the field next to trading rooms and shares their room
ids, visits, chat and leaving. The owner's client actor holds the stock
until it sells or the shop closes, and the rules for tax, permits,
listing, buying and selling live in net::personal_shop. A shop that sells
out closes with "The items are out of stock.", as v83 does. The owner's
balloon goes out with UPDATE_CHAR_BOX and in the spawn packet.

HeavenClient gets the v83 shop window (CPersonalShopDlg) with its avatars,
rows, chat and fee table, the sell dialog, the sold-items dialog, and the
balloon over the owner's head with the house cursor and double-click to
visit. The permit opens a shop from the cash bag, and items dragged from
the inventory go up for sale. Text in these windows is drawn 6 px higher
than the v83 coordinates, since HeavenClient puts a line's cap top about
6 px lower than v83's GDI text.
The partner on the left now faces right, towards me (FUN_007c1f37). The
names on the dark tags are white, as OnCreate's font 0 is. The chat log
follows the mini-room log the personal shop uses: Arial 12 rows of 16,
eleven to the box, wrapped to the box less 14, with my lines in blue and
my partner's in black. The input is Arial 12 too. Text goes up by 6 to
match where v83 puts a line's cap top.
@neeerp
neeerp changed the base branch from v83/wording-and-dialogs to master October 18, 2026 18:46
@neeerp
neeerp merged commit 3b097f6 into master Oct 18, 2026
1 check passed
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.

1 participant