Skip to content

Fix stale alt-craft greeting after logging into the crafter character#105

Open
Dobbelklick wants to merge 1 commit intostevin05:mainfrom
Dobbelklick:bugfix/greeting-character-mismatch
Open

Fix stale alt-craft greeting after logging into the crafter character#105
Dobbelklick wants to merge 1 commit intostevin05:mainfrom
Dobbelklick:bugfix/greeting-character-mismatch

Conversation

@Dobbelklick
Copy link
Copy Markdown

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.

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.
@Dobbelklick
Copy link
Copy Markdown
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.

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