Repository navigation
Guild invitations, personal shops and the trade window - #520
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #519 (
v83/wording-and-dialogs). Please change the base tomasteronce #519 is merged, since GitHub won't retarget it here.What changed
Verification
personal_shop;guildsextended.personal_shop;guildextended.cargo fmt --checkandcargo check --workspace --tests.