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);
        }
Exemplo n.º 2
0
 public override void Deserialize(ICustomDataReader reader)
 {
     this.InteractiveElement = new InteractiveElement();
     this.InteractiveElement.Deserialize(reader);
 }
Exemplo n.º 3
0
 public InteractiveElementUpdatedMessage InitInteractiveElementUpdatedMessage(InteractiveElement InteractiveElement)
 {
     this.InteractiveElement = InteractiveElement;
     return(this);
 }