Repository navigation
Cash Shop requests and cash equips - #523
Merged
Merged
Conversation
v83 sends PLAYER_UPDATE (0xDF) from FUN_00a03eba inside CField::OnSetField whenever a field is set, not only when the character data arrives. HeavenClient sent it only on entering the game, so a plain map change sent nothing. The server's handler is still a no-op.
v83 keeps a pending flag in CCashShop (+0x18). Every cash shop request checks it first and returns silently while it is set, and sets it once the request is sent. Only a QUERY_CASH or CASHSHOP_OPERATION result clears it. The checks happen before the buy and gift dialogs open, so a click on Buy while an answer is awaited does nothing. HeavenClient now does the same. The Check button, the balance check on regaining focus, the wish list buttons, buying, gifting, slot expansions, and taking items out of or putting them back in the Cash Inventory all go through UICashShop::request. Results 324 and 325 clear the flag. The server already answers every request the client sends, including a failure for the modes it does not serve.
When a focused dialog such as the purchase notice went inactive, the cash shop's UI state cleared the focus but returned the old cursor state without passing the event on. The button under the cursor never saw it hover, so the first click after closing the dialog did nothing. The event now falls through to the front window, so the first Buy click after the notice opens the buy dialog.
The v83 client decides an equip is cash by its Cash Shop serial (4f2cbb) and wears it at -(100 + slot), over whatever regular item is in that slot. The equip window draws the cash item in the cell when there is one, and dragging or double-clicking the cell takes that item off. The server already wrote positions under -100 as the cash list in the character data, but nothing ever put an item there. The server now only lets an item with a cash serial be worn 100 below its slot, and any other item at the slot itself. The overall and two-handed conflicts stay with the regular slots. HeavenClient used to read the worn cash items into the regular slots, where they overwrote the regular items. It now keeps them 100 above, shows them in the equip window and on the character over the regular ones, and sends the cash position when wearing an item with a serial or taking off the one a cell shows. Scrolls dropped on a cell go to the item it shows. The character keeps drawing the regular weapon, because HeavenClient has no cash weapon art over a weapon's stances.
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 #522 (
v83/megaphones-rocks-name-tag). Please change the base tomasteronce #522 is merged, since GitHub won't retarget it here.Cash Shop request handling (L186) and cash equips (L190).
What changed
UICashShop::request.Verification
inventory_moves,scrolls,cash_shop*andpetstests and in the client on Xvfb.cargo fmt --checkandcargo check --workspace --tests.