protected override void serializeContent(ICustomDataWriter writer) { // SelectedServerData (42) writer.WriteVarShort(211); // Server id writer.WriteUTF("127.0.0.1"); // Server address writer.WriteShort(1); // Number of ports writer.WriteInt(5556); // Game Server port writer.WriteBool(false); // Can create new character var ticket = Guid.NewGuid().ToString().Replace("-", ""); writer.WriteVarInt(ticket.Length); // Ticket length writer.WriteUTFBytes(ticket); // Ticket //SelectedServerDataExtended writer.WriteUShort(1); // Number of servers // GameServerInformations var byteBox = new ByteBox(); byteBox[0] = false; // Is Mono account byteBox[1] = true; // Is Selectable writer.WriteByte(byteBox.Value); writer.WriteVarShort(211); // Server id writer.WriteByte(0); // Type writer.WriteByte(3); // Status writer.WriteByte(0); // Completion writer.WriteByte(1); // Character count writer.WriteByte(5); // Character slots writer.WriteDouble(0); // Date }
protected override void serializeContent(ICustomDataWriter writer) { var mapPosition = GameDataManager <MapPosition> .Instance.Get(MapId); writer.WriteVarShort((short)mapPosition.SubAreaId); writer.WriteDouble(MapId); writer.WriteShort(0); // House count //writer.WriteShort(0); // Actors count writer.WriteShort(1); // Actors count var actorInfos = new GameRolePlayCharacterInformations(); actorInfos.Initialize(Entity); writer.WriteShort((short)actorInfos.ProtocolId); actorInfos.Serialize(writer); writer.WriteShort(0); // Interactive elements count writer.WriteShort(0); // Stated elements count writer.WriteShort(0); // Obstacles count writer.WriteShort(0); // Fights count writer.WriteBool(false); // Has aggressive monsters var fightPositions = new FightStartingPositions(); fightPositions.Serialize(writer); }
protected override void serializeContent(ICustomDataWriter writer) { var characterInfos = new CharacterBaseInformations(); characterInfos.Initialize(Entity); characterInfos.Serialize(writer); writer.WriteBool(false); // Is collecting stats }
public override void Serialize(ICustomDataWriter writer) { var restrictions = new ActorRestrictionsInformations(); restrictions.Serialize(writer); writer.WriteBool(Gender); writer.WriteShort(0); // Options }
protected override void serializeContent(ICustomDataWriter writer) { writer.WriteUShort((ushort)Characters.Count); // Number of characters foreach (var character in Characters) { writer.WriteShort((short)character.ProtocolId); character.Serialize(writer); } writer.WriteBool(false); // Has startup actions }
protected override void serializeContent(ICustomDataWriter writer) { writer.WriteBool(Quiet); }
public override void Serialize(ICustomDataWriter writer) { base.Serialize(writer); writer.WriteBool(Gender); }