Guest User

Untitled

a guest
Nov 20th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. function Behavior.push_sign_up_queue(match_type, player_uid, point_type, race_id,
  2.                                      queue_sign_up,
  3.                                      cb_send_player, cb_notify_result, is_robot)
  4.     local array_count = queue_sign_up.array_count
  5.    
  6.     queue_sign_up[player_uid] = {
  7.     uid = player_uid, point_type = point_type,
  8.     state = PlayerMatchState.sign_up,
  9.     seat_position = nil,
  10.     room_uid = "",
  11.     is_robot = is_robot,
  12.     }  
  13.    
  14.     queue_sign_up[array_count + 1] = player_uid
  15.     queue_sign_up.array_count = queue_sign_up.array_count + 1
  16.  
  17.     if cb_send_player then
  18.         cb_send_player(player_uid, JoinGameCmd.ConfirmSignUp,
  19.                        {match_type, point_type, race_id, nil}, nil)
  20.     end
  21.    
  22.     if cb_notify_result then       
  23.         cb_notify_result(StringTable[MatchReply.sign_up_success], player_uid)
  24.     end
  25. end
Add Comment
Please, Sign In to add comment