房间错误信息修正
This commit is contained in:
parent
844e165a7d
commit
9667eec16b
|
@ -68,7 +68,7 @@ func (slf *Room[PlayerID, Player]) ChangeOwner(id PlayerID) {
|
|||
|
||||
func (slf *Room[PlayerID, Player]) Join(player Player) error {
|
||||
if slf.players.Size() >= slf.playerLimit && slf.playerLimit > 0 {
|
||||
return ErrWorldPlayerLimit
|
||||
return ErrRoomPlayerLimit
|
||||
}
|
||||
log.Debug("Room.Join", zap.Any("guid", slf.GetGuid()), zap.Any("player", player.GetID()))
|
||||
slf.players.Set(player.GetID(), player)
|
||||
|
|
|
@ -3,6 +3,7 @@ package builtin
|
|||
import "errors"
|
||||
|
||||
var (
|
||||
ErrRoomPlayerLimit = errors.New("the number of players in the room has reached the upper limit") // 玩家数量达到上限
|
||||
ErrRoomNoHasMaster = errors.New("room not has master, can't kick player")
|
||||
ErrRoomNotIsOwner = errors.New("not is room owner, can't kick player")
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue