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

Show name of the player that invited you to a group instead of %TT #629

Merged

Conversation

madsboddum
Copy link
Member

Relates to #619

I've tried splitting this into multiple commits, so it's a bit easier to see what's refactoring and what's fixing the actual bug.
The last commit, 630b80a, contains the actual bug fix.

… GroupEventType enum constants, because grouping is implied
…roupService claims it should be -1 but it's 0 when server initializes
…be the object ID for the CREO that sent the invitation and not the object ID for the GRUP
@madsboddum madsboddum requested a review from Josh-Larson July 8, 2022 12:01
@madsboddum madsboddum self-assigned this Jul 8, 2022
@madsboddum madsboddum added IMPROVEMENT Enhancement of an existing feature BUGFIX Fix of a bug (Pull Request) labels Jul 8, 2022
@madsboddum madsboddum added this to the Game Update 2 - Brawler milestone Jul 8, 2022
val creo = player.creatureObject
creo ?: return
val group = getGroup(creo.groupId)
group ?: return
Copy link
Collaborator

Choose a reason for hiding this comment

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

This the the 2 above it can be replaced with

val group = getGroup(creo.groupId) ?: return

}

private fun handleMakeLeader(currentLeader: Player, newLeader: CreatureObject?) {
newLeader ?: return
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is the case should probably just change the function to be not-null

Copy link
Collaborator

Choose a reason for hiding this comment

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

And then up in the when, can add a ?: return

updateChatRoom(player, group, UpdateType.JOIN)
}

private fun removePlayerFromGroup(creature: CreatureObject?) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should probably be a non-null parameter

@Josh-Larson Josh-Larson merged commit e7624de into ProjectSWGCore:cu_quality_assurance Jul 15, 2022
@madsboddum madsboddum deleted the group_inviter_name branch July 15, 2022 18:39
@Undercova Undercova linked an issue Jul 17, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUGFIX Fix of a bug (Pull Request) IMPROVEMENT Enhancement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Group: invite name not shown
2 participants