internal static void SkipAppearance(this PacketReader pr, short job) { var m = new Mapler { Job = job }; pr.SkipAppearance(m); }
internal static void SkipAppearance(this PacketReader pr, Mapler m) { pr.Skip(15); // [Gender (1)] [Skin (1)] [Face (4)] [Job (2)] [SubJob (2)] [Mega (1)] [Hair (4)] for (int j = 0; j < 3; ++j) // Skips the Equipment { pr.Next(0xFF); } pr.Skip(4); // [00 00 00 00] pr.Skip(21); // [Weapon (4)] [Shield (4)] [Mercedes Ears (1)] [Zeros (12)] if (m.IsDemon || m.IsXenon) // Demon/Xenon { pr.Skip(4); // [FaceMark (4)] } else if (m.IsBeastTamer) // Beast Tamer { pr.Skip(14); // [FaceMark (4)] [Ears (1)] [EarType (4)] [Tail (1)] [TailType (4)] } pr.Skip(3); // ?? ?? ?? }
internal static Mapler ReadMapler(this PacketReader pr) { var m = new Mapler(); // [uid (4)] [uid (4)] [02 00 00 00] [Name (13)] m.Id = pr.ReadInt(); pr.Skip(8); m.Name = pr.ReadString(13).TrimEnd('\0'); //[Gender (1)] [Skin (1)] [Face (4)] [Hair (4)] [FF 00 00] [Level (1)] [Job (2)] pr.Skip(13); m.Level = pr.ReadByte(); m.Job = pr.ReadShort(); //[str (2)] [dex (2)] [int (2)] [luk (2)] [hp (4)] [maxhp (4)] [mp (4)] [maxmp (4)] [Unused AP (2)] m.Str = pr.ReadShort(); m.Dex = pr.ReadShort(); m.Int = pr.ReadShort(); m.Luk = pr.ReadShort(); m.Hp = pr.ReadInt(); m.MaxHp = pr.ReadInt(); m.Mp = pr.ReadInt(); m.MaxMp = pr.ReadInt(); m.Ap = pr.ReadShort(); /* Correct way to do separated sp */ if (!m.IsAran && !m.IsZero && !m.IsBeastTamer) { for (int j = pr.ReadByte(); j > 0; j--) { pr.Skip(5); } } else { pr.ReadShort(); } // [Exp (8)] [Fame (4)] [GachExp (4)] [?? (4)] [MapId (4)] m.Exp = pr.ReadLong(); m.Fame = pr.ReadInt(); pr.Skip(8); m.Map = pr.ReadInt(); pr.Skip(7); // [SpawnPoint (1)] 00 00 00 00 [SubJob (2)] [(Demon, Xenon, Beast Tamer) ? FaceMark (4)] if (m.IsDemon || m.IsXenon || m.IsBeastTamer) // Demon/Xenon/Beast Tamer { pr.Skip(4); } /* [Fatigue (1)] [Date (4)] * [Ambition (4)] [Insight (4)] [Willpower (4)] [Dilligence (4)] [Empathy (4)] [Charm (4)] * [Zeros (13)] [00 40 E0 FD] [3B 37 4F 01] * [PvP Exp (4)] [PvP Rank (1)] [Battle Pts (4)] [Byte (1)] [Byte (1)] [Int (4)] * part time job - Resting = 1, Herbalism = 2, Mining = 3, General Store = 4, Weapon/Armor Store = 5 * [3B 37 4F 01] [00 40 E0 FD] [00 00 00 00] [00] * Character Cards 9 bytes each * [Last Login (8)] 00 */ pr.Skip(5 + 24 + 21 + 15 + 1 + 13 + 81 + 9); return(m); }