Exemplo n.º 1
0
        // debug
        public static CPacket CreateAddGuestRequest()
        {
            byte messageSize = 0;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EReadyRoom.AddGuestRequest);

            return(packet);
        }
Exemplo n.º 2
0
        public static CPacket CreatePortalTeleport()
        {
            byte messageSize = 0;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)603);

            return(packet);
        }
Exemplo n.º 3
0
        public static CPacket CreateCharacterInfoPacket()
        {
            byte messageSize = 0;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EInGame.CharacterInfoRequest);

            return(packet);
        }
Exemplo n.º 4
0
        public static CPacket CreateShutdownPacket()
        {
            byte messageSize = 0;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, _cmdShutdownCode);

            return(packet);
        }
Exemplo n.º 5
0
        public static CPacket CreateMoveStartPacket(Vector3 now, Vector3 dest)
        {
            byte messageSize = 24;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EInGame.MoveStart);
            packet.Write(now.x).Write(now.y).Write(now.z).Write(dest.x).Write(dest.y).Write(dest.z);

            return(packet);
        }
Exemplo n.º 6
0
        // debug
        public static CPacket CreateBanRequest(int slotNum)
        {
            byte messageSize = 4;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EReadyRoom.BanRequest);
            packet.Write(slotNum);

            return(packet);
        }
Exemplo n.º 7
0
        public static CPacket CreateReturnLobbyPacket()
        {
            byte messageSize = 0;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EReadyRoom.LobbyReturnRequest);
            Debug.Log("Return Lobby Request");

            return(packet);
        }
Exemplo n.º 8
0
        public static CPacket CreateActionStartPacket(int actionNumber, Vector3 now, Vector3 dest)
        {
            byte messageSize = 28;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EInGame.ActionStart);
            packet.Write(actionNumber).Write(now.x).Write(now.y).Write(now.z).Write(dest.x).Write(dest.y).Write(dest.z);

            return(packet);
        }
Exemplo n.º 9
0
        public static CPacket CreateMoveStopPacket(Vector3 now)
        {
            byte messageSize = 12;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EInGame.MoveStop);
            packet.Write(now.x).Write(now.y).Write(now.z);

            return(packet);
        }
Exemplo n.º 10
0
        // 메세지 구성 확인 필요
        public static CPacket CreateRoomCountRequest(int sid)
        {
            byte messageSize = 4;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)ELobby.RoomCountRequest);
            Debug.Log("Room Count Request");

            return(packet);
        }
Exemplo n.º 11
0
        public static CPacket CreateLobbyRequest()
        {
            byte messageSize = 0;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)ELogin.LobbyRequest);
            Debug.Log("Lobby Request");

            return(packet);
        }
Exemplo n.º 12
0
        public static CPacket CreateRegisterRequest(string id, string pw)
        {
            byte messageSize = 36;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)ELogin.RegisterRequest);
            packet.Write(id, 16).Write(pw, 20);

            return(packet);
        }
Exemplo n.º 13
0
        public static CPacket CreateRoomJoinRequest(int rid, string id)
        {
            byte messageSize = 20;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)ELobby.RoomJoinRequest);
            packet.Write(rid).Write(id, 16);
            Debug.Log("Room Join Request");

            return(packet);
        }
Exemplo n.º 14
0
        public static CPacket CreateHostQuitPacket(int rid)
        {
            byte messageSize = 4;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EReadyRoom.HostQuitRequest);
            packet.Write(rid);
            Debug.Log("Host Quit Request");

            return(packet);
        }
Exemplo n.º 15
0
        public static CPacket CreateGuestQuitPacket(int rid, int slot)
        {
            byte messageSize = 8;

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)EReadyRoom.GuestQuitRequest);
            packet.Write(rid).Write(slot);
            Debug.Log("Guest Quit Request");

            return(packet);
        }
Exemplo n.º 16
0
        public static CPacket CreatePortalPopup()
        {
            byte messageSize = 0;

            Debug.Log("Portal Popup");

            CPacket packet = new CPacket((int)messageSize);

            packet.WriteHeader(messageSize, (int)602);

            return(packet);
        }
Exemplo n.º 17
0
        public static CPacket CreatePortalVote(int accept)
        {
            byte messageSize = 4;

            CPacket packet = new CPacket((int)messageSize);

            Debug.Log("Portal Vote");
            packet.WriteHeader(messageSize, (int)601);
            packet.Write(accept);

            return(packet);
        }