Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't overwrite current world name when entering housing [skip ci] #2477

Merged
merged 2 commits into from
May 11, 2024

Conversation

ShadowCat117
Copy link
Contributor

Should fix the minor issue from #2388 but doesn't fix the main issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is the only place to have a special case to prevent the contribution message from appearing each time you entered housing but there may be other places I'm unaware of

if (m.find()) {
String worldName = m.group(1);
String worldName = housing ? currentWorldName : m.group(1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This assumes that even when joining other worlds by joining houses, you get to see the updated world name for a small bit. I only assume this is correct because of the duplicate messages this PR aims to fix, which I assume is triggered by first, the world change, then by the the world changing to "housing".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this doesn't fix the changing worlds housing issue, only it changing the world name to the name of the housing, which then makes features that use current world name not work correctly. Server uptime overlay, bomb bell command/overlay, discord rich presence etc.

So since setState checks the world names aren't equal before posting the world change event, it won't incorrectly post the event as the newWorldName is still set to currentWorldName

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, so it's not a full fix, but at least it patches the issue. Sure.

@kristofbolyai kristofbolyai merged commit 3f1179a into Wynntils:main May 11, 2024
1 check passed
@ShadowCat117 ShadowCat117 deleted the housing-world-name branch May 12, 2024 17:16
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.

None yet

2 participants