Esempio n. 1
0
        public void Write(string path)
        {
            var writer = new BigEndianWriter();

            writer.WriteByte(150);

            writer.WriteByte((byte)MapVersion);
            writer.WriteInt(Id);
            writer.WriteByte((byte)Layers.Count);
            writer.WriteInt(-1);
            writer.WriteInt(-1);
            writer.WriteInt(-1);
            writer.WriteInt(-1);
            foreach (var item in Layers.OrderBy(x => x.LayerId))
            {
                item.Write(writer, MapVersion);
            }

            foreach (var item in Cells)
            {
                writer.WriteBoolean(item.Mov);
                writer.WriteBoolean(item.IsTopChange);
                writer.WriteBoolean(item.IsBotChange);
                writer.WriteBoolean(item.IsRightChange);
                writer.WriteBoolean(item.IsLeftChange);
            }

            File.WriteAllBytes(path + @"\" + Id + ".mapEditor", writer.Data);
        }
Esempio n. 2
0
        public static void SerializeState(AuthClient client, byte step, bool display, int countryId, bool connectedToServer)
        {
            BigEndianWriter packet = new BigEndianWriter();

            packet.WriteByte(step);       //Step
            packet.WriteBoolean(display); //Display serveur
            if (display)
            {
                packet.WriteInt(countryId);             //0 FR
                packet.WriteBoolean(connectedToServer); //Connecté au serveur
                if (connectedToServer)
                {
                    BigEndianWriter server = new BigEndianWriter();
                    server.WriteInt(0);        //Id account
                    server.WriteUTF("Clemon"); //Pseudo
                    server.WriteInt(1);        //Nombre de serveur
                    for (int i = 0; i < 1; i++)
                    {
                        server.WriteInt(1); //ID serveur
                        server.WriteInt(0); //Droit du serveur
                    }

                    packet.WriteInt(server.Data.Length);
                    packet.WriteBytes(server.Data);
                }
            }
            client.Send(MessageConstant.S_STATE_CONNECTION, packet);
        }
Esempio n. 3
0
        public void Write(BigEndianWriter writer)
        {
            writer.WriteByte(150);

            writer.WriteByte((byte)MapVersion);
            writer.WriteInt(Id);
            writer.WriteByte((byte)Layers.Count);
            writer.WriteInt(this.TopNeighbourId);
            writer.WriteInt(this.BottomNeighbourId);
            writer.WriteInt(this.LeftNeighbourId);
            writer.WriteInt(this.RightNeighbourId);

            foreach (var item in Layers.OrderBy(x => x.LayerId))
            {
                item.Write(writer, MapVersion);
            }



            foreach (var item in Cells)
            {
                writer.WriteBoolean(item.Mov);
                writer.WriteBoolean(item.IsTopChange);
                writer.WriteBoolean(item.IsBotChange);
                writer.WriteBoolean(item.IsRightChange);
                writer.WriteBoolean(item.IsLeftChange);
            }
        }
Esempio n. 4
0
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteInt(playerId);
     writer.WriteUTF(playerName);
     writer.WriteSByte(alignmentSide);
     writer.WriteSByte(breed);
     writer.WriteBoolean(sex);
     writer.WriteBoolean(isInWorkshop);
     writer.WriteShort(worldX);
     writer.WriteShort(worldY);
     writer.WriteInt(mapId);
     writer.WriteShort(subAreaId);
     writer.WriteShort(status.TypeId);
     status.Serialize(writer);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteInt(fightId);
     writer.WriteVarInt(sourceId);
     writer.WriteVarInt(targetId);
     writer.WriteBoolean(accept);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteVarInt(foodUID);
     writer.WriteByte(foodPos);
     writer.WriteBoolean(preview);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteShort(npcId);
     writer.WriteBoolean(sex);
     writer.WriteShort(specialArtworkId);
 }
public virtual void Serialize(BigEndianWriter writer)
{

writer.WriteInt(lifePoints);
            writer.WriteInt(maxLifePoints);
            writer.WriteInt(baseMaxLifePoints);
            writer.WriteInt(permanentDamagePercent);
            writer.WriteInt(shieldPoints);
            writer.WriteShort(actionPoints);
            writer.WriteShort(maxActionPoints);
            writer.WriteShort(movementPoints);
            writer.WriteShort(maxMovementPoints);
            writer.WriteInt(summoner);
            writer.WriteBoolean(summoned);
            writer.WriteShort(neutralElementResistPercent);
            writer.WriteShort(earthElementResistPercent);
            writer.WriteShort(waterElementResistPercent);
            writer.WriteShort(airElementResistPercent);
            writer.WriteShort(fireElementResistPercent);
            writer.WriteShort(neutralElementReduction);
            writer.WriteShort(earthElementReduction);
            writer.WriteShort(waterElementReduction);
            writer.WriteShort(airElementReduction);
            writer.WriteShort(fireElementReduction);
            writer.WriteShort(criticalDamageFixedResist);
            writer.WriteShort(pushDamageFixedResist);
            writer.WriteShort(dodgePALostProbability);
            writer.WriteShort(dodgePMLostProbability);
            writer.WriteShort(tackleBlock);
            writer.WriteShort(tackleEvade);
            writer.WriteSByte(invisibilityState);
            

}
Esempio n. 9
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(targetId);
     writer.WriteShort(stateId);
     writer.WriteBoolean(active);
 }
Esempio n. 10
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteShort(fightId);
     writer.WriteSByte(teamId);
     writer.WriteSByte(option);
     writer.WriteBoolean(state);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteSByte(paymentType);
     writer.WriteBoolean(bAdd);
     writer.WriteVarInt(objectToMoveId);
     writer.WriteVarInt(quantity);
 }
Esempio n. 12
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteByte(guildLevel);
     writer.WriteByte(nbMembers);
     writer.WriteBoolean(enabled);
 }
Esempio n. 13
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteBoolean(hireOrFire);
     basicInfos.Serialize(writer);
     writer.WriteInt(playerId);
     writer.WriteUTF(playerName);
 }
Esempio n. 14
0
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteUTF(uid);
     writer.WriteShort(figure);
     writer.WriteShort(pedestal);
     writer.WriteBoolean(bound);
 }
Esempio n. 15
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(playerId);
     writer.WriteUTF(playerName);
     writer.WriteSByte(breed);
     writer.WriteBoolean(sex);
 }
Esempio n. 16
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteInt(accountId);
     writer.WriteBoolean(tutorialAvailable);
     writer.WriteShort(breedsVisible);
     writer.WriteShort(breedsAvailable);
     writer.WriteSByte(status);
 }
Esempio n. 17
0
public override void Serialize(BigEndianWriter writer)
{

writer.WriteInt(id);
            writer.WriteBoolean(ready);
            

}
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteSByte(teamId);
     writer.WriteBoolean(alive);
     writer.WriteShort(stats.TypeId);
     stats.Serialize(writer);
 }
Esempio n. 19
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteShort(serverId);
     writer.WriteUTF(address);
     writer.WriteUShort(port);
     writer.WriteBoolean(canCreateNewCharacter);
     writer.WriteUTF(ticket);
 }
Esempio n. 20
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteByte(level);
     alignmentInfos.Serialize(writer);
     writer.WriteSByte(breed);
     writer.WriteBoolean(sex);
 }
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(targetId);
     writer.WriteShort(destinationCellId);
     writer.WriteSByte(critical);
     writer.WriteBoolean(silentCast);
 }
Esempio n. 22
0
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteInt(playerId);
     writer.WriteUTF(playerName);
     writer.WriteSByte(breed);
     writer.WriteBoolean(sex);
     writer.WriteShort(level);
 }
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteUShort(id);
     writer.WriteSByte(status);
     writer.WriteSByte(completion);
     writer.WriteBoolean(isSelectable);
     writer.WriteSByte(charactersCount);
     writer.WriteDouble(date);
 }
Esempio n. 24
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteUTF(leaderName);
     writer.WriteVarShort(nbConnectedMembers);
     writer.WriteSByte(nbTaxCollectors);
     writer.WriteInt(lastActivity);
     writer.WriteBoolean(enabled);
 }
Esempio n. 25
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteVarUhShort(m_ObjectId);
     writer.WriteByte(m_status);
     writer.WriteByte(m_completion);
     writer.WriteBoolean(m_isSelectable);
     writer.WriteByte(m_charactersCount);
     writer.WriteDouble(m_date);
 }
Esempio n. 26
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteInt(lastTimeSlotModificationDate);
     writer.WriteInt(lastTimeSlotModificationAuthorGuildId);
     writer.WriteInt(lastTimeSlotModificationAuthorId);
     writer.WriteUTF(lastTimeSlotModificationAuthorName);
     writer.WriteBoolean(hasTeleporterModule);
 }
Esempio n. 27
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteBoolean(spellPrevisualization);
     writer.WriteUShort((ushort)spells.Length);
     foreach (var entry in spells)
     {
         entry.Serialize(writer);
     }
 }
 public virtual void Serialize(BigEndianWriter writer)
 {
     writer.WriteInt(modelId);
     writer.WriteUTF(ownerName);
     writer.WriteBoolean(ownerConnected);
     writer.WriteShort(worldX);
     writer.WriteShort(worldY);
     writer.WriteShort(subAreaId);
     writer.WriteSByte(nbRoom);
     writer.WriteSByte(nbChest);
     writer.WriteUShort((ushort)skillListIds.Length);
     foreach (var entry in skillListIds)
     {
         writer.WriteInt(entry);
     }
     writer.WriteBoolean(isLocked);
     writer.WriteInt(price);
 }
Esempio n. 29
0
 public override void Serialize(BigEndianWriter writer)
 {
     writer.WriteInt(mimicryUID);
     writer.WriteByte(mimicryPos);
     writer.WriteInt(foodUID);
     writer.WriteByte(foodPos);
     writer.WriteInt(hostUID);
     writer.WriteByte(hostPos);
     writer.WriteBoolean(preview);
 }
Esempio n. 30
0
 public override void Serialize(BigEndianWriter writer)
 {
     base.Serialize(writer);
     writer.WriteVarShort(dungeonId);
     writer.WriteUShort((ushort)playersDungeonReady.Length);
     foreach (var entry in playersDungeonReady)
     {
         writer.WriteBoolean(entry);
     }
 }