Beispiel #1
0
        void Server_ReceivePlayerTeam(RemoteEntityWorld sender, ReceiveDataReader reader)
        {
            uint uni = reader.ReadUInt32();
            PlayerTeam value = (PlayerTeam)reader.ReadInt32();
            if (!reader.Complete())
                return;
            this.playerTeam = value;

               UserManagementServerNetworkService.UserInfo uinfo = GameNetworkServer.Instance.UserManagementService.GetUser(uni);

               PlayerManager.ServerOrSingle_Player player = PlayerManager.Instance.ServerOrSingle_GetPlayer(uinfo.Name);
               player.Team = playerTeam;

            //   foreach( PlayerManager.ServerOrSingle_Player player in
            //			PlayerManager.Instance.ServerOrSingle_Players ) {
             //       if (player.Identifier == uni )
              //      {
               //         player.Team = value;
             //       }
              //  }
        }