-
Notifications
You must be signed in to change notification settings - Fork 19
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
Show name of the player that invited you to a group instead of %TT #629
Conversation
… 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
src/main/java/com/projectswg/holocore/services/gameplay/player/group/GroupService.kt
Outdated
Show resolved
Hide resolved
src/main/java/com/projectswg/holocore/services/gameplay/player/group/GroupService.kt
Outdated
Show resolved
Hide resolved
src/main/java/com/projectswg/holocore/services/gameplay/player/group/GroupService.kt
Outdated
Show resolved
Hide resolved
src/main/java/com/projectswg/holocore/services/gameplay/player/group/GroupService.kt
Outdated
Show resolved
Hide resolved
val creo = player.creatureObject | ||
creo ?: return | ||
val group = getGroup(creo.groupId) | ||
group ?: return |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?) { |
There was a problem hiding this comment.
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
…nefit from null-checking by the compiler
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.