public void Pack(ICustomDataWriter writer) { CustomDataWriter customWriter = new(); Serialize(customWriter); var size = customWriter.Data.Length; uint typeLen = ComputeTypeLen((uint)size); writer.WriteShort((short)SubComputeStaticHeader(MessageId, typeLen)); writer.WriteUInt(GLOBAL_INSTANCE++); switch (typeLen) { case 1: writer.WriteByte((byte)size); break; case 2: writer.WriteUShort((ushort)size); break; case 3: writer.WriteByte((byte)(size >> 16 & 255)); writer.WriteUShort((ushort)(size & 65535)); break; } writer.WriteBytes(customWriter.Data); customWriter.Dispose(); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteVarInt(this.GuildId); writer.WriteVarLong(this.LeaderId); writer.WriteByte(this.GuildLevel); writer.WriteByte(this.NbMembers); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteByte(this.JobId); writer.WriteByte(this.JobLevel); writer.WriteBoolean(this.Free); writer.WriteByte(this.MinLevel); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteByte(this.AlignmentSide); writer.WriteByte(this.AlignmentValue); writer.WriteByte(this.AlignmentGrade); writer.WriteDouble(this.CharacterPower); }
public override void Serialize(ICustomDataWriter writer) { base.Serialize(writer); writer.WriteVarShort(this.Days); writer.WriteByte(this.Hours); writer.WriteByte(this.Minutes); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteVarShort(this.CellId); writer.WriteByte(this.ZoneSize); writer.WriteInt(this.CellColor); writer.WriteByte(this.CellsType); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteByte(0); // Side writer.WriteByte(0); // Value writer.WriteByte(0); // Grade writer.WriteDouble(0); // Character power }
public override void Serialize(ICustomDataWriter writer) { base.Serialize(writer); byte box = 0; box = BooleanByteWrapper.SetFlag(box, 0, Sex); box = BooleanByteWrapper.SetFlag(box, 1, IsRideable); box = BooleanByteWrapper.SetFlag(box, 2, IsFeconded); box = BooleanByteWrapper.SetFlag(box, 3, IsFecondationReady); writer.WriteByte(box); writer.WriteVarLong(this.Id_); writer.WriteVarLong(this.ExpirationDate); writer.WriteVarInt(this.Model); writer.WriteUTF(this.Name); writer.WriteUTF(this.Owner); writer.WriteByte(this.Level); writer.WriteVarInt(this.ReproductionCount); writer.WriteVarInt(this.ReproductionCountMax); writer.WriteShort(this.Effects.Length); foreach (ObjectEffectInteger item in this.Effects) { item.Serialize(writer); } writer.WriteShort(this.Capacities.Length); foreach (int item in this.Capacities) { writer.WriteVarInt(item); } }
public override void Serialize(ICustomDataWriter writer) { writer.WriteVarInt(this.SymbioteUID); writer.WriteByte(this.SymbiotePos); writer.WriteVarInt(this.HostUID); writer.WriteByte(this.HostPos); }
public override void Serialize(ICustomDataWriter writer) { var box0 = new ByteBox(); box0[0] = false; // Cant be aggressed box0[1] = false; // Cant be challenged box0[2] = false; // Cant trade box0[3] = false; // Cant be attacked by mutant box0[4] = false; // Cant run box0[5] = false; // Force slow walk box0[6] = false; // Cant minimize box0[7] = false; // Cant move writer.WriteByte(box0.Value); var box1 = new ByteBox(); box1[0] = false; // Cant aggress box1[1] = false; // Cant challenge box1[2] = false; // Cant exchange box1[3] = false; // Cant attack box1[4] = false; // Cant chat box1[5] = false; // Cant be merchant box1[6] = false; // cant use object box1[7] = false; // Cant use tax collector writer.WriteByte(box1.Value); var box2 = new ByteBox(); box2[0] = false; // Cant use interactive box2[1] = false; // Cant speak to npc box2[2] = false; // Cant change zone box2[3] = false; // Cant attack monster box2[4] = false; // Cant walk 8 direction writer.WriteByte(box2.Value); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteVarShort(this.FightId); writer.WriteByte(this.TeamId); writer.WriteByte(this.Option); writer.WriteBoolean(this.State); }
public override void Serialize(ICustomDataWriter writer) { base.Serialize(writer); this.OwnerInformations.Serialize(writer); writer.WriteByte(this.Theme); writer.WriteByte(this.RoomId); writer.WriteByte(this.MaxRoomId); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteByte(this.TypeId); writer.WriteByte(this.State); writer.WriteInt(this.NextVulnerabilityDate); writer.WriteInt(this.PlacementDate); writer.WriteVarInt(this.RewardTokenCount); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteByte(this.TeamId); writer.WriteDouble(this.LeaderId); writer.WriteByte(this.TeamSide); writer.WriteByte(this.TeamTypeId); writer.WriteByte(this.NbWaves); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteInt(this.AreaId); writer.WriteByte(this.AtLeastNbMount); writer.WriteByte(this.AtLeastNbMachine); writer.WriteVarLong(this.MaxPrice); writer.WriteByte(this.OrderBy); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteByte(this.JobId); writer.WriteByte(this.JobLevel); writer.WriteVarLong(this.JobXP); writer.WriteVarLong(this.JobXpLevelFloor); writer.WriteVarLong(this.JobXpNextLevelFloor); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteInt(this.AreaId); writer.WriteByte(this.AtLeastNbRoom); writer.WriteByte(this.AtLeastNbChest); writer.WriteVarShort(this.SkillRequested); writer.WriteVarLong(this.MaxPrice); writer.WriteByte(this.OrderBy); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteByte(this.Major); writer.WriteByte(this.Minor); writer.WriteByte(this.Release); writer.WriteInt(this.Revision); writer.WriteByte(this.Patch); writer.WriteByte(this.BuildType); }
public override void Serialize(ICustomDataWriter writer) { base.Serialize(writer); writer.WriteByte(this.PartyType); writer.WriteUTF(this.PartyName); writer.WriteByte(this.MaxParticipants); writer.WriteVarLong(this.FromId); writer.WriteUTF(this.FromName); writer.WriteVarLong(this.ToId); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteUTF(this.GuildOwner); writer.WriteShort(this.WorldX); writer.WriteShort(this.WorldY); writer.WriteVarShort(this.SubAreaId); writer.WriteByte(this.NbMount); writer.WriteByte(this.NbObject); writer.WriteVarLong(this.Price); }
public override void Serialize(ICustomDataWriter writer) { byte box = 0; box = BooleanByteWrapper.SetFlag(box, 0, Activate); box = BooleanByteWrapper.SetFlag(box, 1, Party); writer.WriteByte(box); writer.WriteByte(this.Reason); writer.WriteVarShort(this.IdolId); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteDouble(this.SlaveId); writer.WriteShort(this.SpellCooldowns.Length); foreach (GameFightSpellCooldown item in this.SpellCooldowns) { item.Serialize(writer); } writer.WriteByte(this.SummonCount); writer.WriteByte(this.BombCount); }
public override void Serialize(ICustomDataWriter writer) { base.Serialize(writer); writer.WriteByte(this.TeamId); writer.WriteByte(this.Wave); writer.WriteBoolean(this.Alive); writer.WriteShort(this.PreviousPositions.Length); foreach (short item in this.PreviousPositions) { writer.WriteVarShort(item); } }
public override void Serialize(ICustomDataWriter writer) { base.Serialize(writer); byte box = 0; box = BooleanByteWrapper.SetFlag(box, 0, SilentCast); box = BooleanByteWrapper.SetFlag(box, 1, VerboseCast); writer.WriteByte(box); writer.WriteDouble(this.TargetId); writer.WriteShort(this.DestinationCellId); writer.WriteByte(this.Critical); }
public override void Serialize(ICustomDataWriter writer) { writer.WriteInt(this.SpouseAccountId); writer.WriteVarLong(this.SpouseId); writer.WriteUTF(this.SpouseName); writer.WriteVarShort(this.SpouseLevel); writer.WriteByte(this.Breed); writer.WriteByte(this.Sex); this.SpouseEntityLook.Serialize(writer); this.GuildInfo.Serialize(writer); writer.WriteByte(this.AlignmentSide); }
public override void Serialize(ICustomDataWriter writer) { byte box = 0; box = BooleanByteWrapper.SetFlag(box, 0, IsTeamPhase); box = BooleanByteWrapper.SetFlag(box, 1, CanBeCancelled); box = BooleanByteWrapper.SetFlag(box, 2, CanSayReady); box = BooleanByteWrapper.SetFlag(box, 3, IsFightStarted); writer.WriteByte(box); writer.WriteShort(this.TimeMaxBeforeFightStart); writer.WriteByte(this.FightType); }
public override void Serialize(ICustomDataWriter writer) { byte box = 0; box = BooleanByteWrapper.SetFlag(box, 0, Sex); box = BooleanByteWrapper.SetFlag(box, 1, Alive); writer.WriteByte(box); writer.WriteDouble(this.Id_); writer.WriteByte(this.Wave); writer.WriteVarShort(this.Level); writer.WriteByte(this.Breed); }
public override void Serialize(ICustomDataWriter writer) { byte box = 0; box = BooleanByteWrapper.SetFlag(box, 0, Sex); box = BooleanByteWrapper.SetFlag(box, 1, IsRideable); box = BooleanByteWrapper.SetFlag(box, 2, IsWild); box = BooleanByteWrapper.SetFlag(box, 3, IsFecondationReady); box = BooleanByteWrapper.SetFlag(box, 4, UseHarnessColors); writer.WriteByte(box); writer.WriteDouble(this.Id_); writer.WriteVarInt(this.Model); writer.WriteShort(this.Ancestor.Length); foreach (int item in this.Ancestor) { writer.WriteInt(item); } writer.WriteShort(this.Behaviors.Length); foreach (int item in this.Behaviors) { writer.WriteInt(item); } writer.WriteUTF(this.Name); writer.WriteInt(this.OwnerId); writer.WriteVarLong(this.Experience); writer.WriteVarLong(this.ExperienceForLevel); writer.WriteDouble(this.ExperienceForNextLevel); writer.WriteByte(this.Level); writer.WriteVarInt(this.MaxPods); writer.WriteVarInt(this.Stamina); writer.WriteVarInt(this.StaminaMax); writer.WriteVarInt(this.Maturity); writer.WriteVarInt(this.MaturityForAdult); writer.WriteVarInt(this.Energy); writer.WriteVarInt(this.EnergyMax); writer.WriteInt(this.Serenity); writer.WriteInt(this.AggressivityMax); writer.WriteVarInt(this.SerenityMax); writer.WriteVarInt(this.Love); writer.WriteVarInt(this.LoveMax); writer.WriteInt(this.FecondationTime); writer.WriteInt(this.BoostLimiter); writer.WriteDouble(this.BoostMax); writer.WriteInt(this.ReproductionCount); writer.WriteVarInt(this.ReproductionCountMax); writer.WriteVarShort(this.HarnessGID); writer.WriteShort(this.EffectList.Length); foreach (ObjectEffectInteger item in this.EffectList) { item.Serialize(writer); } }
public override void Serialize(ICustomDataWriter writer) { writer.WriteVarLong(this.PlayerId); writer.WriteUTF(this.PlayerName); writer.WriteByte(this.AlignmentSide); writer.WriteByte(this.Breed); writer.WriteBoolean(this.Sex); writer.WriteBoolean(this.IsInWorkshop); writer.WriteShort(this.WorldX); writer.WriteShort(this.WorldY); writer.WriteDouble(this.MapId); writer.WriteVarShort(this.SubAreaId); }
public override void Serialize(ICustomDataWriter writer) { byte box = 0; box = BooleanByteWrapper.SetFlag(box, 0, TutorialAvailable); box = BooleanByteWrapper.SetFlag(box, 1, CanCreateNewCharacter); writer.WriteByte(box); writer.WriteInt(this.AccountId); writer.WriteVarInt(this.BreedsVisible); writer.WriteVarInt(this.BreedsAvailable); writer.WriteByte(this.Status); writer.WriteDouble(this.UnlimitedRestatEndDate); }