Optimize GetOnlinePlayerListRsp

This commit is contained in:
Melledy
2022-04-29 14:36:02 -07:00
parent 66c2743d6e
commit f8f4d89cd0
2 changed files with 11 additions and 28 deletions

View File

@@ -822,7 +822,7 @@ public class Player {
.setProfilePicture(ProfilePicture.newBuilder().setAvatarId(this.getHeadImage()));
if (this.getWorld() != null) {
onlineInfo.setCurPlayerNumInWorld(this.getWorld().getPlayers().indexOf(this) + 1);
onlineInfo.setCurPlayerNumInWorld(getWorld().getPlayerCount());
} else {
onlineInfo.setCurPlayerNumInWorld(1);
}