Fix stale alt-craft greeting after logging into the crafter character#105
Open
Dobbelklick wants to merge 1 commit intostevin05:mainfrom
Open
Fix stale alt-craft greeting after logging into the crafter character#105Dobbelklick wants to merge 1 commit intostevin05:mainfrom
Dobbelklick wants to merge 1 commit intostevin05:mainfrom
Conversation
When a notification was created while playing character X for a craft
that alt Y could do, the response message was pre-generated as an
alt-craft greeting ("my alt Y can craft this"). If the player then
logged into Y and clicked the notification, that stale message would
stil say "my alt" even though Y is now the active character.
Fix: extract greeting generation into BuildRawGreeting(), which
re-evaluates alt_craft against the current logged-in character each
time it is called. Add CraftScan.RebuildResponseMessage() which
detects the character mismatch and regenerates response.message
in-place. Store crafterFullName and alt_craft on the response so
the rebuild has enough context. Call RebuildResponseMessage() just
before sending the greeting (GreetCustomer) and before displaying
the proposed greeting in the chat-history tooltip.
Author
|
I'm one of those weirdos that relogs first and then sends a message as I feel like it lowers the barrier for a deal if the crafter is available immediately. |
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.
When a notification was created while playing character X for a craft that alt Y could do, the response message was pre-generated as an alt-craft greeting ("my alt Y can craft this"). If the player then logged into Y and clicked the notification, that stale message would stil say "my alt" even though Y is now the active character.
Fix:
extract greeting generation into BuildRawGreeting(), which re-evaluates alt_craft against the current logged-in character each time it is called.
Add CraftScan.RebuildResponseMessage() which detects the character mismatch and regenerates response.message in-place.
Store crafterFullName and alt_craft on the response so the rebuild has enough context.
Call RebuildResponseMessage() just before sending the greeting (GreetCustomer) and before displaying the proposed greeting in the chat-history tooltip.