Beispiel #1
0
        public override void Deserialize(IDataReader reader)
        {
            subAreaId = reader.ReadShort();
            if (subAreaId < 0)
            {
                throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
            }
            mapId = reader.ReadInt();
            if (mapId < 0)
            {
                throw new Exception("Forbidden value on mapId = " + mapId + ", it doesn't respect the following condition : mapId < 0");
            }
            subareaAlignmentSide = reader.ReadSByte();
            var limit = reader.ReadUShort();

            houses = new Types.HouseInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                houses[i] = Types.ProtocolTypeManager.GetInstance <Types.HouseInformations>(reader.ReadShort());
                houses[i].Deserialize(reader);
            }
            limit  = reader.ReadUShort();
            actors = new Types.GameRolePlayActorInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                actors[i] = Types.ProtocolTypeManager.GetInstance <Types.GameRolePlayActorInformations>(reader.ReadShort());
                actors[i].Deserialize(reader);
            }
            limit = reader.ReadUShort();
            interactiveElements = new Types.InteractiveElement[limit];
            for (int i = 0; i < limit; i++)
            {
                interactiveElements[i] = Types.ProtocolTypeManager.GetInstance <Types.InteractiveElement>(reader.ReadShort());
                interactiveElements[i].Deserialize(reader);
            }
            limit          = reader.ReadUShort();
            statedElements = new Types.StatedElement[limit];
            for (int i = 0; i < limit; i++)
            {
                statedElements[i] = new Types.StatedElement();
                statedElements[i].Deserialize(reader);
            }
            limit     = reader.ReadUShort();
            obstacles = new Types.MapObstacle[limit];
            for (int i = 0; i < limit; i++)
            {
                obstacles[i] = new Types.MapObstacle();
                obstacles[i].Deserialize(reader);
            }
            limit  = reader.ReadUShort();
            fights = new Types.FightCommonInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fights[i] = new Types.FightCommonInformations();
                fights[i].Deserialize(reader);
            }
        }
        public override void Deserialize(IDataReader reader)
        {
            subAreaId = reader.ReadVarUhShort();
            mapId     = reader.ReadDouble();
            var limit = (ushort)reader.ReadUShort();

            houses = new Types.HouseInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                houses[i] = ProtocolTypeManager.GetInstance <Types.HouseInformations>(reader.ReadUShort());
                houses[i].Deserialize(reader);
            }
            limit  = (ushort)reader.ReadUShort();
            actors = new Types.GameRolePlayActorInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                actors[i] = ProtocolTypeManager.GetInstance <Types.GameRolePlayActorInformations>(reader.ReadUShort());
                actors[i].Deserialize(reader);
            }
            limit = (ushort)reader.ReadUShort();
            interactiveElements = new Types.InteractiveElement[limit];
            for (int i = 0; i < limit; i++)
            {
                interactiveElements[i] = ProtocolTypeManager.GetInstance <Types.InteractiveElement>(reader.ReadUShort());
                interactiveElements[i].Deserialize(reader);
            }
            limit          = (ushort)reader.ReadUShort();
            statedElements = new Types.StatedElement[limit];
            for (int i = 0; i < limit; i++)
            {
                statedElements[i] = new Types.StatedElement();
                statedElements[i].Deserialize(reader);
            }
            limit     = (ushort)reader.ReadUShort();
            obstacles = new Types.MapObstacle[limit];
            for (int i = 0; i < limit; i++)
            {
                obstacles[i] = new Types.MapObstacle();
                obstacles[i].Deserialize(reader);
            }
            limit  = (ushort)reader.ReadUShort();
            fights = new Types.FightCommonInformations[limit];
            for (int i = 0; i < limit; i++)
            {
                fights[i] = new Types.FightCommonInformations();
                fights[i].Deserialize(reader);
            }
            hasAggressiveMonsters = reader.ReadBoolean();
            fightStartPositions   = new Types.FightStartingPositions();
            fightStartPositions.Deserialize(reader);
        }
 public override void Deserialize(ICustomDataInput reader)
 {
     commonsInfos = new Types.FightCommonInformations();
     commonsInfos.Deserialize(reader);
 }
 public GameRolePlayShowChallengeMessage(Types.FightCommonInformations commonsInfos)
 {
     this.commonsInfos = commonsInfos;
 }
 public override void Deserialize(ICustomDataInput reader)
 {
     commonsInfos = new Types.FightCommonInformations();
     commonsInfos.Deserialize(reader);
 }
 public GameRolePlayShowChallengeMessage(Types.FightCommonInformations commonsInfos)
 {
     this.commonsInfos = commonsInfos;
 }
 public override void Deserialize(BigEndianReader reader)
 {
     subAreaId = reader.ReadVarShort();
     if (subAreaId < 0)
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
     mapId = reader.ReadInt();
     if (mapId < 0)
         throw new Exception("Forbidden value on mapId = " + mapId + ", it doesn't respect the following condition : mapId < 0");
     var limit = reader.ReadUShort();
     houses = new Types.HouseInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          houses[i] = Types.ProtocolTypeManager.GetInstance<Types.HouseInformations>(reader.ReadShort());
          houses[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     actors = new Types.GameRolePlayActorInformations[limit];
     for (int i = 0; i < limit; i++)
     {
         short id = reader.ReadShort();
         actors[i] = Types.ProtocolTypeManager.GetInstance<Types.GameRolePlayActorInformations>(id);
         actors[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     interactiveElements = new Types.InteractiveElement[limit];
     for (int i = 0; i < limit; i++)
     {
          interactiveElements[i] = Types.ProtocolTypeManager.GetInstance<Types.InteractiveElement>(reader.ReadShort());
          interactiveElements[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     statedElements = new Types.StatedElement[limit];
     for (int i = 0; i < limit; i++)
     {
          statedElements[i] = new Types.StatedElement();
          statedElements[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     obstacles = new Types.MapObstacle[limit];
     for (int i = 0; i < limit; i++)
     {
          obstacles[i] = new Types.MapObstacle();
          obstacles[i].Deserialize(reader);
     }
     limit = reader.ReadUShort();
     fights = new Types.FightCommonInformations[limit];
     for (int i = 0; i < limit; i++)
     {
          fights[i] = new Types.FightCommonInformations();
          fights[i].Deserialize(reader);
     }
 }
 public void Deserialize(IDataReader reader)
 {
     commonsInfos = new Types.FightCommonInformations();
     commonsInfos.Deserialize(reader);
 }
        public override void Deserialize(IDataReader reader)
        {
            subAreaId = reader.ReadVarShort();
            if (subAreaId < 0)
            {
                throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
            }
            mapId = reader.ReadInt();
            if (mapId < 0)
            {
                throw new Exception("Forbidden value on mapId = " + mapId + ", it doesn't respect the following condition : mapId < 0");
            }
            var limit   = reader.ReadShort();
            var houses_ = new HouseInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                houses_[i] = Types.ProtocolTypeManager.GetInstance <HouseInformations>(reader.ReadShort());
                houses_[i].Deserialize(reader);
            }
            houses = houses_;
            limit  = reader.ReadShort();
            var actors_ = new GameRolePlayActorInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                actors_[i] = Types.ProtocolTypeManager.GetInstance <GameRolePlayActorInformations>(reader.ReadShort());
                actors_[i].Deserialize(reader);
            }
            actors = actors_;
            limit  = reader.ReadShort();
            var interactiveElements_ = new InteractiveElement[limit];

            for (int i = 0; i < limit; i++)
            {
                interactiveElements_[i] = Types.ProtocolTypeManager.GetInstance <InteractiveElement>(reader.ReadShort());
                interactiveElements_[i].Deserialize(reader);
            }
            interactiveElements = interactiveElements_;
            limit = reader.ReadShort();
            var statedElements_ = new Types.StatedElement[limit];

            for (int i = 0; i < limit; i++)
            {
                statedElements_[i] = new Types.StatedElement();
                statedElements_[i].Deserialize(reader);
            }
            statedElements = statedElements_;
            limit          = reader.ReadShort();
            var obstacles_ = new Types.MapObstacle[limit];

            for (int i = 0; i < limit; i++)
            {
                obstacles_[i] = new Types.MapObstacle();
                obstacles_[i].Deserialize(reader);
            }
            obstacles = obstacles_;
            limit     = reader.ReadShort();
            var fights_ = new Types.FightCommonInformations[limit];

            for (int i = 0; i < limit; i++)
            {
                fights_[i] = new Types.FightCommonInformations();
                fights_[i].Deserialize(reader);
            }
            fights = fights_;
            hasAggressiveMonsters = reader.ReadBoolean();
            fightStartPositions   = new Types.FightStartingPositions();
            fightStartPositions.Deserialize(reader);
        }
Beispiel #10
0
 public override void Deserialize(BigEndianReader reader)
 {
     commonsInfos = new Types.FightCommonInformations();
     commonsInfos.Deserialize(reader);
 }
 public override void Deserialize(BigEndianReader reader)
 {
     commonsInfos = new Types.FightCommonInformations();
     commonsInfos.Deserialize(reader);
 }