Beispiel #1
0
 public virtual void Read(ServerMessage str)
 {
     index = str.ReadByte();
     turn = str.ReadInteger();
     priority = str.ReadInteger();
     speed = str.ReadInteger();
 }
Beispiel #2
0
        public void ReceiveCommand(ServerPlayer p, ServerMessage msg)
        {
            byte opcode = msg.ReadByte();

                ServerBattleCommand cmd = null;

                switch (opcode) {
                case ServerBattle.opBattleAttack:
                        cmd = new BattleAttackCommand(p);
                        break;

                case ServerBattle.opBattleItem:
                        cmd = new BattleItemCommand(p);
                        break;

                case ServerBattle.opBattleSwitch:
                        cmd = new BattleSwitchCommand(p);
                        break;

                case ServerBattle.opBattleDefend:
                        cmd = new BattleDefendCommand(p);
                        break;

                case ServerBattle.opBattleCapture:
                    cmd = new BattleCaptureCommand(p);
                    break;

                default:
                    return;
            }

            cmd.Read(msg);
            this.AddCommand(cmd);

            actionTime = Utils.GetTickCount();
        }
Beispiel #3
0
 public override void Read(ServerMessage str)
 {
     base.Read(str);
     switchIndex = str.ReadByte();
     resetStats = str.ReadByte();
     switchMsg = str.ReadString();
 }
Beispiel #4
0
        public override void Read(ServerMessage str)
        {
            base.Read(str);

            targetTeam = str.ReadByte();
            targetMonster = str.ReadByte();
        }
Beispiel #5
0
        public override void Read(ServerMessage str)
        {
            base.Read(str);

            sourceTeam = str.ReadByte();
            sourceMonster = str.ReadByte();
        }