コード例 #1
0
        public override void Deserialize(ICustomDataReader reader)
        {
            this.SubAreaId = reader.ReadVarShort();
            this.MapId     = reader.ReadDouble();
            int HousesLen = reader.ReadShort();

            Houses = new HouseInformations[HousesLen];
            for (int i = 0; i < HousesLen; i++)
            {
                this.Houses[i] = ProtocolTypeManager.GetInstance <HouseInformations>(reader.ReadShort());
                this.Houses[i].Deserialize(reader);
            }
            int ActorsLen = reader.ReadShort();

            Actors = new GameRolePlayActorInformations[ActorsLen];
            for (int i = 0; i < ActorsLen; i++)
            {
                this.Actors[i] = ProtocolTypeManager.GetInstance <GameRolePlayActorInformations>(reader.ReadShort());
                this.Actors[i].Deserialize(reader);
            }
            int InteractiveElementsLen = reader.ReadShort();

            InteractiveElements = new InteractiveElement[InteractiveElementsLen];
            for (int i = 0; i < InteractiveElementsLen; i++)
            {
                this.InteractiveElements[i] = ProtocolTypeManager.GetInstance <InteractiveElement>(reader.ReadShort());
                this.InteractiveElements[i].Deserialize(reader);
            }
            int StatedElementsLen = reader.ReadShort();

            StatedElements = new StatedElement[StatedElementsLen];
            for (int i = 0; i < StatedElementsLen; i++)
            {
                this.StatedElements[i] = new StatedElement();
                this.StatedElements[i].Deserialize(reader);
            }
            int ObstaclesLen = reader.ReadShort();

            Obstacles = new MapObstacle[ObstaclesLen];
            for (int i = 0; i < ObstaclesLen; i++)
            {
                this.Obstacles[i] = new MapObstacle();
                this.Obstacles[i].Deserialize(reader);
            }
            int FightsLen = reader.ReadShort();

            Fights = new FightCommonInformations[FightsLen];
            for (int i = 0; i < FightsLen; i++)
            {
                this.Fights[i] = new FightCommonInformations();
                this.Fights[i].Deserialize(reader);
            }
            this.HasAggressiveMonsters = reader.ReadBoolean();
            this.FightStartPositions   = new FightStartingPositions();
            this.FightStartPositions.Deserialize(reader);
        }
コード例 #2
0
 public MapComplementaryInformationsDataMessage InitMapComplementaryInformationsDataMessage(short SubAreaId, double MapId, HouseInformations[] Houses, GameRolePlayActorInformations[] Actors, InteractiveElement[] InteractiveElements, StatedElement[] StatedElements, MapObstacle[] Obstacles, FightCommonInformations[] Fights, bool HasAggressiveMonsters, FightStartingPositions FightStartPositions)
 {
     this.SubAreaId             = SubAreaId;
     this.MapId                 = MapId;
     this.Houses                = Houses;
     this.Actors                = Actors;
     this.InteractiveElements   = InteractiveElements;
     this.StatedElements        = StatedElements;
     this.Obstacles             = Obstacles;
     this.Fights                = Fights;
     this.HasAggressiveMonsters = HasAggressiveMonsters;
     this.FightStartPositions   = FightStartPositions;
     return(this);
 }
コード例 #3
0
 public override void Deserialize(ICustomDataReader reader)
 {
     this.MapId = reader.ReadDouble();
     this.FightStartPositions = new FightStartingPositions();
     this.FightStartPositions.Deserialize(reader);
 }
コード例 #4
0
 public MapFightStartPositionsUpdateMessage InitMapFightStartPositionsUpdateMessage(double MapId, FightStartingPositions FightStartPositions)
 {
     this.MapId = MapId;
     this.FightStartPositions = FightStartPositions;
     return(this);
 }