fix limited friends & clanmates amount

This commit is contained in:
wish
2023-07-08 00:35:15 +10:00
parent 60e86c74fe
commit ab83e64f84
2 changed files with 13 additions and 9 deletions

View File

@@ -131,9 +131,6 @@ func (s *Server) getFriendsForCharacters(chars []character) []members {
}
friends = append(friends, charFriends...)
}
if len(friends) > 255 { // Uint8
friends = friends[:255]
}
return friends
}
@@ -153,15 +150,12 @@ func (s *Server) getGuildmatesForCharacters(chars []character) []members {
if err != nil {
continue
}
for i, _ := range charGuildmates {
for i := range charGuildmates {
charGuildmates[i].CID = char.ID
}
guildmates = append(guildmates, charGuildmates...)
}
}
if len(guildmates) > 255 { // Uint8
guildmates = guildmates[:255]
}
return guildmates
}