/// <summary> /// Initializes a new instance of the <see cref="PacketAchievement" /> class. /// </summary> /// <param name="packet">The packet.</param> public PacketAchievement(IL2RPacket packet) { EAchievementType = packet.ReadByte(); AchievementInfoID = packet.ReadUInt32(); EAchievementState = packet.ReadByte(); TaskParam = packet.ReadUInt32(); }
/// <summary> /// Initializes a new instance of the <see cref="PacketPlayerGuild" /> class. /// </summary> /// <param name="packet">The packet.</param> public PacketPlayerGuild(IL2RPacket packet) { GuildID = packet.ReadUInt64(); GuildMembersGrade = packet.ReadByte(); GuildName = packet.ReadString(); EmblemSymbolInfoID = packet.ReadUInt32(); EmblemBackgroundInfoID = packet.ReadUInt32(); OccupyTitleInfoID = packet.ReadUInt32(); CastleType = packet.ReadByte(); }
/// <summary> /// Initializes a new instance of the <see cref="PacketLinkItem" /> class. /// </summary> /// <param name="packet">The packet.</param> public PacketLinkItem(IL2RPacket packet) { Level = packet.ReadByte(); EnchantLevel = packet.ReadByte(); LimitBreakCount = packet.ReadByte(); Count = packet.ReadUInt16(); BasicOptionLength = packet.ReadUInt16(); for (int k = 0; BasicOptionLength > k; k++) { ItemOptionList.Add(new PacketItemOption(packet)); } Bind = packet.ReadByte(); AbilityLevel = packet.ReadByte(); }
/// <summary> /// Initializes a new instance of the <see cref="PacketGuildAgitQuestListresult" /> class. /// </summary> /// <param name="packet">The packet.</param> public PacketGuildAgitQuestListresult(IL2RPacket packet) { using (StreamWriter stm = new StreamWriter(@"Output\QuestList.csv", true)) { stm.WriteLineAsync("QuestId,State,PlayerId,Player,Rank,CompletedAt"); packet.Skip(2); byte[] unkHeader = packet.ReadBytes(4); uint numQuests = packet.ReadUInt16(); for (int i = 0; i < numQuests; i++) { uint questId = packet.ReadUInt32(); byte[] unk = packet.ReadBytes(4); string state = Enum.QuestState.Enum(packet.ReadByte()); ulong playerId = packet.ReadUInt64(); string player = packet.ReadString(); string rank = CSV.guildMemberGrade.guildMemberGradeName(packet.ReadByte()); DateTime completedTime = DateTime.Now;//packet.ReadDate(); stm.WriteLineAsync(questId + "," + state + "," + playerId + "," + player + "," + rank + "," + completedTime); } } }
/// <summary> /// Initializes a new instance of the <see cref="PacketGuildSearchResult"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketGuildSearchResult(IL2RPacket packet) { using (StreamWriter fileStream = new StreamWriter(@"Output\GuildSearch.csv", true)) { packet.Skip(2); ushort NumberofGuilds = packet.ReadUInt16(); if (fileStream.BaseStream.Length < 1) { fileStream.WriteLineAsync("Ranking,Name,Leader,Level,Exp,Reputation,Members,ClanCP,LevelReq,Closed,Intro"); } for (int j = 0; j < NumberofGuilds; j++) { ClanID = packet.ReadUInt64(); Name = packet.ReadString(); Unk1 = packet.ReadUInt32(); Unk2 = packet.ReadUInt32(); Intro = packet.ReadString(); Level = packet.ReadUInt16(); Exp = packet.ReadUInt32(); Reputation = packet.ReadUInt32(); Ranking = packet.ReadUInt32(); Unk3 = packet.ReadUInt32(); Members = packet.ReadUInt16(); Leader = packet.ReadString(); Unk4 = packet.ReadUInt32(); Unk5 = packet.ReadUInt32(); Closed = packet.ReadByte(); Unk7 = packet.ReadUInt16(); LevelReq = packet.ReadUInt32(); ClanCP = packet.ReadUInt32(); Unk8 = packet.ReadUInt32(); Unk9 = packet.ReadUInt16(); Unk0 = packet.ReadUInt64(); Spacer = packet.ReadByte(); fileStream.WriteLineAsync(Ranking + "," + Name + "," + Leader + "," + Level + "," + Exp + "," + Reputation + "," + Members + "," + ClanCP + "," + "," + LevelReq + "," + Closed + ",\"" + Intro + "\""); } } }
/// <summary> /// Initializes a new instance of the <see cref="PacketGuildRecommendationListReadresult"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketGuildRecommendationListReadresult(IL2RPacket packet) { using (StreamWriter fileStream = new StreamWriter(@"Output\GuildRankings.csv", true)) { packet.Skip(2); NumberofGuilds = packet.ReadUInt16(); fileStream.WriteLineAsync("Ranking,Name,Leader,Level,Exp,Reputation,Members,ClanCP,Wins,Draws,Losses,LevelReq,Closed,Intro"); for (int j = 0; j < NumberofGuilds; j++) { ClanID = packet.ReadUInt64(); Name = packet.ReadString(); Unk1 = packet.ReadUInt32(); Unk2 = packet.ReadUInt32(); Intro = packet.ReadString(); Level = packet.ReadUInt16(); Exp = packet.ReadUInt32(); Reputation = packet.ReadUInt32(); Ranking = packet.ReadUInt32(); Unk3 = packet.ReadUInt32(); Members = packet.ReadUInt16(); Leader = packet.ReadString(); Unk4 = packet.ReadUInt32(); Unk5 = packet.ReadUInt32(); Closed = packet.ReadByte(); LevelReq = packet.ReadUInt16(); Wins = packet.ReadUInt16(); Draws = packet.ReadUInt16(); Losses = packet.ReadUInt16(); ClanCP = packet.ReadUInt32(); Unk7 = packet.ReadUInt32(); Unk8 = packet.ReadUInt32(); Unk9 = packet.ReadUInt32(); Spacer = packet.ReadByte(); fileStream.WriteLineAsync(Ranking + "," + Name + "," + Leader + "," + Level + "," + Exp + "," + Reputation + "," + Members + "," + ClanCP + "," + Wins + "," + Draws + "," + Losses + "," + LevelReq + "," + Closed + ",\"" + Intro + "\""); } } }
/// <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="PacketBagInfo"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketBagInfo(IL2RPacket packet) { Type = packet.ReadByte(); EnabledSlotCount = packet.ReadUInt16(); ExpandedCount = packet.ReadUInt16(); ItemCount = packet.ReadUInt16(); for (int j = 0; j < ItemCount; j++) { ItemList.Add(new PacketItem(packet)); } }
/// <summary> /// Initializes a new instance of the <see cref="PacketPKMode"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketPKMode(IL2RPacket packet) { PkStatus = packet.ReadByte(); Monster = packet.ReadByte(); Guild = packet.ReadByte(); Alliance = packet.ReadByte(); Friends = packet.ReadByte(); EtcPlayer = packet.ReadByte(); BadPlayer = packet.ReadByte(); }
/// <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="PacketGadget"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketGadget(IL2RPacket packet) { GadgetUID = packet.ReadUInt64(); GadgetID = packet.ReadUInt32(); XPos = packet.ReadSingle(); YPos = packet.ReadSingle(); ZPos = packet.ReadSingle(); Direction = packet.ReadSingle(); Active = packet.ReadByte(); OwnerName = packet.ReadString();//This is a guess RemainCount = packet.ReadUInt32(); }
/// <summary> /// Initializes a new instance of the <see cref="PacketChatGuildunknown"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketChatGuildunknown(IL2RPacket packet) { packet.Skip(2); IsPrevMessage = packet.ReadByte(); LastChatID = packet.ReadUInt64(); numMessages = packet.ReadUInt16(); for (int i = 0; i < numMessages; i++) { var msg = new PacketChatGuildunknown(packet); ChatGuildListReadResultSet.Add(msg); } }
/// <summary> /// Processes the specified packet identifier. /// </summary> /// <param name="RawPacket">The raw packet.</param> /// <returns></returns> public PacketItem(IL2RPacket packet) { UItemID = packet.ReadUInt64(); ItemID = Enum.Item.Enum(packet.ReadUInt32()); Exp = packet.ReadUInt32(); Level = packet.ReadByte(); EnchantLevel = packet.ReadByte(); LimitBreakCount = packet.ReadByte(); LimitBreakAddRate = packet.ReadByte(); Count = packet.ReadUInt16(); Liked = packet.ReadByte(); //LootedTime = packet.ReadDate(); BasicOptionLength = packet.ReadUInt16(); Bind = packet.ReadByte(); AbilityLevel = packet.ReadByte(); AbilityUpgradeAddRate = packet.ReadUInt16(); CraftFlag = packet.ReadByte(); EventPeriodID = packet.ReadUInt32(); ExpireTime = packet.ReadUInt64(); SocketListLength = packet.ReadUInt16(); for (int k = 0; BasicOptionLength > k; k++) { ItemOptions.Add(new PacketItemOption(packet)); } for (int k = 0; SocketListLength > k; k++) { SocketID = packet.ReadUInt64(); SocketName = Enum.Item.Enum(packet.ReadUInt32()); packet.Skip(4); SocketList[k] = "\"" + SocketName + "\""; SoulCrystalCount = packet.ReadUInt16(); packet.Skip(1); } }
/// <summary> /// Initializes a new instance of the <see cref="PacketNpc"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketNpc(IL2RPacket packet) { NPCUID = packet.ReadUInt64(); NPCID = packet.ReadUInt32(); XPos = packet.ReadSingle(); YPos = packet.ReadSingle(); ZPos = packet.ReadSingle(); Direction = packet.ReadSingle(); CurrentHP = packet.ReadUInt32(); MaxHP = packet.ReadUInt32(); MoveSpeed = packet.ReadUInt32(); ushort BuffCount = packet.ReadUInt16(); // PktBuffInfo for (int i = 0; i < BuffCount; i++) { BuffInfoList.Add(new PacketBuffInfo(packet)); } byte CombatMode = packet.ReadByte(); uint SpawnInfoId = packet.ReadUInt32(); ulong TeamID = packet.ReadUInt64(); }
public PacketItemLootNotify(IL2RPacket packet) { string itemlist = ""; packet.Skip(2); ushort ComplexCounter = packet.ReadUInt16(); for (int j = 0; j < ComplexCounter; j++) { ulong UItemID = packet.ReadUInt64(); string ItemID = Enum.Item.Enum(packet.ReadUInt32()); packet.Skip(4);//Junk uint Count = packet.ReadUInt32(); byte Unknown = packet.ReadByte(); packet.Skip(2); //Junk? DateTime LootTime = DateTime.Now; //packet.ReadDate(); packet.Skip(2); //Junk? ushort UnkCounter = packet.ReadUInt16(); // All data seems blank for (int i = 0; i < UnkCounter; i++) { packet.Skip(19); } byte UnkBool1 = packet.ReadByte();//One of these must be bind byte UnkBool2 = packet.ReadByte(); packet.Skip(7); itemlist += ",\"" + ItemID + "\"," + Count; } ushort SimpleCounter = packet.ReadUInt16(); for (int j = 0; j < SimpleCounter; j++) { ulong UItemID = packet.ReadUInt64(); string ItemID = Enum.Item.Enum(packet.ReadUInt32()); ushort Count = packet.ReadUInt16(); DateTime LootTime = DateTime.Now; // packet.ReadDate(); byte Bind = packet.ReadByte(); //One of these must be bind uint EventPeriodID = packet.ReadUInt32(); itemlist += ",\"" + ItemID + "\"," + Count; } ushort MultiCounter = packet.ReadUInt16(); for (int j = 0; j < MultiCounter; j++) { ulong UItemID = packet.ReadUInt64(); ushort Count = packet.ReadUInt16(); ushort Stack = packet.ReadUInt16(); itemlist += "," + UItemID + "," + Count; } packet.Skip(2); byte LooterType = packet.ReadByte(); uint NPCInfoID = packet.ReadUInt32(); using (StreamWriter fileStream = new StreamWriter(@"Output\ItemsLooted.csv", true)) { //if (Kamael.Packets.Globals.lootIndex == 1) //{ fileStream.Write(","); //} fileStream.Write("," + NPCInfoID + "," + itemlist); } }
/// <summary> /// Initializes a new instance of the <see cref="PacketAppeareance"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketAppeareance(IL2RPacket packet) { HairID = packet.ReadByte(); HairStyleID = packet.ReadByte(); HairColorID = packet.ReadByte(); }
/// <summary> /// Initializes a new instance of the <see cref="PacketActorOwnerInfo" /> class. /// </summary> /// <param name="packet">The packet.</param> public PacketActorOwnerInfo(IL2RPacket packet) { ActorUID = packet.ReadUInt64(); ActorType = packet.ReadByte(); // Could be UInt OwnerNamer = packet.ReadString(); }
/// <summary> /// Initializes a new instance of the <see cref="PacketOtherPlayer"/> class. /// </summary> /// <param name="packet">The packet.</param> public PacketOtherPlayer(IL2RPacket packet) { //pushing a change to be sure PlayerUID = packet.ReadUInt64(); //uint unk1 = packet.ReadUInt32(); //byte unk2 = packet.ReadByte(); PlayerName = packet.ReadString(); Race = packet.ReadUInt32(); Class = packet.ReadUInt32(); Level = packet.ReadUInt16(); XPos = packet.ReadSingle(); YPos = packet.ReadSingle(); ZPos = packet.ReadSingle(); Direction = packet.ReadSingle(); CurHP = packet.ReadUInt32(); MaxHP = packet.ReadUInt32(); MoveSpeed = packet.ReadUInt32(); BuffCount = packet.ReadUInt16(); // PktBuffInfo BuffInfoList = new List <PacketBuffInfo>(); for (int i = 0; i < BuffCount; i++) { ////PktBuffInfo.Packet(packet); BuffInfoList.Add(new PacketBuffInfo(packet)); } CombatMode = packet.ReadByte(); SoulShotEnabled = packet.ReadByte(); PKStatus = packet.ReadByte(); PKAttackState = packet.ReadByte(); PKPoint = packet.ReadUInt32(); //// PktAppearance AppearanceList = new List <PacketAppeareance>(); AppearanceList.Add(new PacketAppeareance(packet)); EquipCount = packet.ReadUInt16(); // PktSimpleEquipment SimpleEquipList = new List <PacketSimpleEquipment>(); for (int i = 0; i < EquipCount; i++) { SimpleEquipList.Add(new PacketSimpleEquipment(packet)); } TeamID = packet.ReadUInt64(); ControlGadgetID = packet.ReadUInt64(); Guilded = packet.ReadByte(); // PktPlayerGuild PlayerGuildList = new List <PacketPlayerGuild>(); if (Guilded > 0) { PlayerGuildList.Add(new PacketPlayerGuild(packet)); } RidingPetInfoID = packet.ReadUInt32(); RidingPetLevel = packet.ReadUInt16(); RidingPetGrade = packet.ReadByte(); EquippedTitleInfoID = packet.ReadUInt32(); //pktPartyEmblem byte SetEmblem = packet.ReadByte(); PartyEmblemList = new List <PacketPartyEmblem>(); if (SetEmblem > 0) { PartyEmblemList.Add(new PacketPartyEmblem(packet)); } //PktSimpleCape SimpleCapeList = new List <PacketSimpleCape>(); SimpleCapeList.Add(new PacketSimpleCape(packet)); //PktPKMode PKModeList = new List <PacketPKMode>(); PKModeList.Add(new PacketPKMode(packet)); CurBarrier = packet.ReadUInt32(); MaxBarrier = packet.ReadUInt32(); IsCostumeHidden = 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"); } } }