/// <summary> /// Initializes a new instance of the <see cref="PacketItemSocket" /> class. /// </summary> /// <param name="packet">The packet.</param> public PacketItemSoulCrystal(IL2RPacket packet) { SoulCrystalID = packet.ReadUInt64(); SoulCrystalName = Enum.Item.Enum(packet.ReadUInt32()); SoulCrystalEXP = packet.ReadInt32(); SoulCrystalLevel = packet.ReadByte(); SoulCrystalCount = packet.ReadUInt16(); for (int i = 0; i < SoulCrystalCount; i++) { ItemOptionList.Add(new PacketItemOption(packet)); } }
/// <summary> /// Initializes a new instance of the <see cref="PacketChat" /> class. /// </summary> /// <param name="packet">The packet.</param> public PacketChat(IL2RPacket packet) { ChatUID = packet.ReadUInt64(); PlayerUID = packet.ReadUInt64(); PlayerName = packet.ReadString(); Race = CSV.race.RaceName(packet.ReadInt32()); PlayerClass = CSV.Class.className(packet.ReadUInt32()); //MsgTime = packet.ReadDate(); Message = packet.ReadString(); Level = packet.ReadUInt16(); EmblemSymbolID = packet.ReadUInt32(); EmblemBackgroundID = packet.ReadUInt32(); LinkWorldBossID = packet.ReadUInt32(); LinkWorldBossDieID = packet.ReadUInt32(); LinkWorldBossDespawnID = packet.ReadUInt32(); LinkItem = packet.ReadUInt16(); if (LinkItem > 0) { LinkItemList.Add(new PacketLinkItem(packet)); } ushort LinkDungeon = packet.ReadUInt16(); if (LinkDungeon > 0) { LinkDungeonList.Add(new PacketLinkDungeon(packet)); } ushort LinkGuildDungeon = packet.ReadUInt16(); if (LinkGuildDungeon > 0) { LinkGuildList.Add(new PacketLinkGuildDungeon(packet)); } LinkVoice = packet.ReadString(); LinkType = packet.ReadByte(); LinkSpotID = packet.ReadUInt32(); LanguageType = packet.ReadByte(); }
/// <summary> /// Initializes a new instance of the <see cref="PacketSkillHitNotify"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketSkillHitNotify(IL2RPacket packet) { using (StreamWriter fileStream = new StreamWriter(@"Output\PktSkillHitNotify.csv", true)) { if (fileStream.BaseStream.Length < 1) { fileStream.WriteLine("ActorID,SkillInfoID,ComboCount,HitList,HitActorID,CritHit,Damage,ParryingDamage,ActorHP,MPDamage,MissList,MissActorID,MissType,Junk"); } ActorID = packet.ReadUInt64(); SkillInfoID = CSV.skill.skillName(packet.ReadInt32()); ComboCount = packet.ReadUInt16(); HitList = packet.ReadUInt16(); HitActorID = new ulong[HitList]; CritHit = new byte[HitList]; Damage = new int[HitList]; ParryingDamage = new int[HitList]; ActorHP = new uint[HitList]; MPDamage = new uint[HitList]; for (int j = 0; j < HitList; j++) { HitActorID[j] = packet.ReadUInt64(); CritHit[j] = packet.ReadByte(); Damage[j] = packet.ReadInt32(); ParryingDamage[j] = packet.ReadInt32(); ActorHP[j] = packet.ReadUInt32(); MPDamage[j] = packet.ReadUInt32(); } ushort MissList = packet.ReadUInt16(); ulong[] MissActorID = new ulong[MissList]; byte[] MissType = new byte[MissList]; for (int j = 0; j < MissList; j++) { MissActorID[j] = packet.ReadUInt64(); MissType[j] = packet.ReadByte(); } //byte[] junkdata = packet.ReadBytes(packet.Remaining); /* Commented out until I figure this part out * UInt16 PullList = packet.ReadUInt16(); * for (int j = 0; j < PullList; j++) * { * UInt64[] PullActorID = new UInt64[PullList]; * } * * UInt16 KBList = packet.ReadUInt16(); * for (int j = 0; j < KBList; j++) * { * UInt64[] PullActorID = new UInt64[KBList]; * } * }*/ ushort MaxArray = Math.Max(HitList, MissList); // MaxArray = Math.Max(MaxArray, PullList); // MaxArray = Math.Max(MaxArray, KBList); for (int j = 0; j < MaxArray; j++) { fileStream.Write(ActorID + "," + SkillInfoID + "," + ComboCount + "," + HitList + ","); if (HitList < MaxArray) { fileStream.Write(",,,,,,"); } else { fileStream.Write(HitActorID[j] + "," + CritHit[j] + "," + Damage[j] + "," + ParryingDamage[j] + "," + ActorHP[j] + "," + MPDamage[j] + ","); } fileStream.Write(MissList + ","); if (MissList < MaxArray) { fileStream.Write(",,"); } else { fileStream.Write(MissActorID[j] + "," + MissType[j] + ","); } //fileStream.Write(string.Join(",", junkdata) + "\n"); } } }
/// <summary> /// Processes the specified packet identifier. /// </summary> /// <param name="RawPacket">The raw packet.</param> /// <returns></returns> public PacketItemOption(IL2RPacket packet) { OptionName = CSV.itemOption.itemOptionName(packet.ReadInt32()); IOvalue = packet.ReadUInt32(); }