void OnUpSucc(string str, System.Object obj) { EventMgr.NetMsg msg = (EventMgr.NetMsg)obj; MSG_GR_R_UserSit sitInfo = (MSG_GR_R_UserSit)msg.para; if (Global.CurrentUserId == sitInfo.dwUserID) //如果是自己起身,就需要离开游戏 { Leave(); } else { foreach (UserInfoStruct user in onLineUsers) { if (sitInfo.dwUserID == user.dwUserID) //更新玩家信息的数据 { user.bDeskStation = 255; } } } }
void OnSitSucc(string str, System.Object obj) { EventMgr.NetMsg msg = (EventMgr.NetMsg)obj; MSG_GR_R_UserSit sitInfo = (MSG_GR_R_UserSit)msg.para; int uid = (int)sitInfo.dwUserID; if (uid == myInfo.dwUserID) //更新玩家本人信息的数据 { myInfo.bDeskStation = sitInfo.bDeskStation; myInfo.bUserState = sitInfo.bUserState; GameNetworkManager.Instance.getGameStatus(); //获取游戏信息 } else { foreach (UserInfoStruct user in onLineUsers) { if (uid == user.dwUserID) //更新玩家信息的数据 { user.bDeskStation = sitInfo.bDeskStation; user.bUserState = sitInfo.bUserState; } } } }