예제 #1
0
 public void ReadFromByteArray(ByteArray byteArray)
 {
     this.BattleMode = BattleModeHelper.ReadFromByteArray(byteArray);
     this.LinkMode   = BattleLinkModeHelper.ReadFromByteArray(byteArray);
     this.Rules      = new BattleRuleSequence();
     this.Rules.ReadFromByteArray(byteArray);
 }
예제 #2
0
        private static bool OnDirectBattle(ByteArray byteArray, IRoomClientService clientService)
        {
            int        server     = byteArray.ReadInt();
            BattleMode battleMode = BattleModeHelper.ReadFromByteArray(byteArray);

            clientService.OnDirectBattle(server, battleMode);
            return(true);
        }
예제 #3
0
        private static bool OnAgentBattle(ByteArray byteArray, IRoomClientService clientService)
        {
            int        identity       = byteArray.ReadInt();
            byte       playerPosition = byteArray.ReadByte();
            BattleMode battleMode     = BattleModeHelper.ReadFromByteArray(byteArray);

            clientService.OnAgentBattle(identity, playerPosition, battleMode);
            return(true);
        }
        private static bool OnLogon(int sessionID, ByteArray byteArray, IPokemonBattleServerService serverService)
        {
            string     identity    = byteArray.ReadUTF();
            BattleMode modeInfo    = BattleModeHelper.ReadFromByteArray(byteArray);
            string     versionInfo = byteArray.ReadUTF();

            serverService.OnLogon(sessionID, identity, modeInfo, versionInfo);
            return(true);
        }