|
@@ -115,6 +115,9 @@ func (room_info *RoomInfoWrapper) process_move(color msg.RoleType, szNumber int3
|
|
func (room_info *RoomInfoWrapper) notify_settlement() {
|
|
func (room_info *RoomInfoWrapper) notify_settlement() {
|
|
message := &msg.NotifySettlement{}
|
|
message := &msg.NotifySettlement{}
|
|
message.FinishColors = room_info.getFinishColors()
|
|
message.FinishColors = room_info.getFinishColors()
|
|
|
|
+ if len(message.FinishColors) == 0 {
|
|
|
|
+ message.FinishColors = room_info.getNotKickColors()
|
|
|
|
+ }
|
|
room_info.notify_to_all_player(message)
|
|
room_info.notify_to_all_player(message)
|
|
}
|
|
}
|
|
|
|
|
|
@@ -198,9 +201,10 @@ func (room_info *RoomInfoWrapper) time_out_tuo_guan() {
|
|
color_data := room_info.getColorDataByColor(cur_color)
|
|
color_data := room_info.getColorDataByColor(cur_color)
|
|
color_data.TimeOutNum = color_data.TimeOutNum + 1
|
|
color_data.TimeOutNum = color_data.TimeOutNum + 1
|
|
if color_data.TimeOutNum > 5 { //如果玩家累计5次托管行为,将玩家踢出房间
|
|
if color_data.TimeOutNum > 5 { //如果玩家累计5次托管行为,将玩家踢出房间
|
|
- room_info.tick_color_of_room(cur_color)
|
|
|
|
if room_info.IsOverGame() { //宣布游戏结束
|
|
if room_info.IsOverGame() { //宣布游戏结束
|
|
room_info.notify_settlement()
|
|
room_info.notify_settlement()
|
|
|
|
+ } else {
|
|
|
|
+ room_info.tick_color_of_room(cur_color)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
room_info.tuo_guan_opt()
|
|
room_info.tuo_guan_opt()
|