|
@@ -99,7 +99,7 @@ func (room_info *RoomInfoWrapper) process_sz(msg_body *msg.NotifyPlayerSzNumber)
|
|
|
|
|
|
func (room_info *RoomInfoWrapper) process_move(color msg.RoleType, szNumber int32, isAddRound bool, isFinish bool) {
|
|
|
if room_info.IsOverGame() {
|
|
|
- room_info.notify_settlement(color)
|
|
|
+ room_info.notify_settlement()
|
|
|
} else {
|
|
|
if szNumber == 6 || isAddRound || isFinish {
|
|
|
|
|
@@ -112,9 +112,8 @@ func (room_info *RoomInfoWrapper) process_move(color msg.RoleType, szNumber int3
|
|
|
}
|
|
|
|
|
|
|
|
|
-func (room_info *RoomInfoWrapper) notify_settlement(color msg.RoleType) {
|
|
|
+func (room_info *RoomInfoWrapper) notify_settlement() {
|
|
|
message := &msg.NotifySettlement{}
|
|
|
- message.Color = color
|
|
|
message.FinishColors = room_info.getFinishColors()
|
|
|
room_info.notify_to_all_player(message)
|
|
|
}
|
|
@@ -200,6 +199,9 @@ func (room_info *RoomInfoWrapper) time_out_tuo_guan() {
|
|
|
color_data.TimeOutNum = color_data.TimeOutNum + 1
|
|
|
if color_data.TimeOutNum > 5 {
|
|
|
room_info.tick_color_of_room(cur_color)
|
|
|
+ if room_info.IsOverGame() {
|
|
|
+ room_info.notify_settlement()
|
|
|
+ }
|
|
|
} else {
|
|
|
room_info.tuo_guan_opt()
|
|
|
}
|
|
@@ -262,11 +264,13 @@ func (room_info *RoomInfoWrapper) notify_update_room_info() {
|
|
|
|
|
|
|
|
|
func (room_info *RoomInfoWrapper) tick_color_of_room(color msg.RoleType) {
|
|
|
+ room_info.tickColor(color)
|
|
|
message := &msg.NotifyPlayerStatus{
|
|
|
Color: color,
|
|
|
Status: msg.PlayerStatus_COLOR_KICK,
|
|
|
+ Colors: room_info.Colors,
|
|
|
}
|
|
|
- room_info.tickColor(color)
|
|
|
+
|
|
|
room_info.notify_to_all_player(message)
|
|
|
}
|
|
|
|