internal static void send_EntityAck(ref PacketStream stream) { StringBuilder str = new StringBuilder(); str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]"); stream.ReadByte(); str.AppendLine("{"); byte mainType = stream.ReadByte(); str.Append(" Byte main_type = (" + mainType + ") "); switch (mainType) { case 0: str.Append("Player\r\n"); break; case 1: str.Append("NPC\r\n"); break; case 2: str.Append("Static Object\r\n"); break; } str.AppendLine(" UInt32 handle = " + stream.ReadUInt32()); str.AppendLine(" Single x = " + stream.ReadFloat()); str.AppendLine(" Single y = " + stream.ReadFloat()); str.AppendLine(" Single z = " + stream.ReadFloat()); str.AppendLine(" Byte layer = " + stream.ReadByte()); byte subType = stream.ReadByte(); str.Append(" Byte sub_type = (" + subType +") "); switch (subType) { case 0: str.Append("Player\r\n"); break; case 1: str.Append("NPC\r\n"); break; case 2: str.Append("Item\r\n"); break; case 3: str.Append("Mob\r\n"); break; case 4: str.Append("Summon\r\n"); break; case 5: str.Append("SkillProp\r\n"); break; case 6: str.Append("FieldProp\r\n"); break; case 7: str.Append("Pet\r\n"); break; } str.AppendLine(" "); if (mainType == 0) { // Player str.AppendLine(" [Extra Info]"); } else if (mainType == 1) { // NPC str.AppendLine(" uint status = " + stream.ReadUInt32()); str.AppendLine(" float face_dir = " + stream.ReadFloat()); str.AppendLine(" int hp = " + stream.ReadInt32()); str.AppendLine(" int max_hp = " + stream.ReadInt32()); str.AppendLine(" int mp = " + stream.ReadInt32()); str.AppendLine(" int max_mp = " + stream.ReadInt32()); str.AppendLine(" int level = " + stream.ReadInt32()); str.AppendLine(" byte race = " + stream.ReadByte()); str.AppendLine(" uint skin_color = " + stream.ReadUInt32()); str.AppendLine(" bool is_first_enter = " + stream.ReadBool()); str.AppendLine(" int energy = " + stream.ReadInt32()); if (subType == 0) { // Player } else if (subType == 1) {// NPC long encId = stream.ReadInt64(); str.AppendLine(" Int64 encrypted_id = (" + encId + ") " + EncryptedInt.Revert(encId)); } else if (subType == 3) {// Mob long encId = stream.ReadInt64(); str.AppendLine(" Int64 encrypted_id = (" + encId + ") " + EncryptedInt.Revert(encId)); } else if (subType == 4) {// Summon str.AppendLine(" uint master_handle = " + stream.ReadUInt32()); long encId = stream.ReadInt64(); str.AppendLine(" Int64 encrypted_id = (" + encId + ") " + EncryptedInt.Revert(encId)); str.AppendLine(" char[19] name = " + stream.ReadString(0, 19)); } else if (subType == 7) {// Pet str.AppendLine(" uint master_handle = " + stream.ReadUInt32()); long encId = stream.ReadInt64(); str.AppendLine(" Int64 encrypted_id = (" + encId + ") " + EncryptedInt.Revert(encId)); str.AppendLine(" char[19] name = " + stream.ReadString(0, 19)); } else { str.AppendLine(" [Extra Info]"); } } else if (mainType == 2) { // Static if (subType == 2) { // Item long encId = stream.ReadInt64(); str.AppendLine(" Int64 encrypted_id = (" + encId + ") " + EncryptedInt.Revert(encId)); str.AppendLine(" Int64 count = " + stream.ReadInt64()); str.AppendLine(" uint drop_time = " + stream.ReadUInt32()); str.AppendLine(" uint player1 = " + stream.ReadUInt32()); str.AppendLine(" uint player2 = " + stream.ReadUInt32()); str.AppendLine(" uint player3 = " + stream.ReadUInt32()); str.AppendLine(" int party1 = " + stream.ReadInt32()); str.AppendLine(" int party2 = " + stream.ReadInt32()); str.AppendLine(" int party3 = " + stream.ReadInt32()); } else if (subType == 5) { //SkillProp str.AppendLine(" uint caster = " + stream.ReadUInt32()); str.AppendLine(" uint start_time = " + stream.ReadUInt32()); str.AppendLine(" int skill_id = " + stream.ReadInt32()); } else if (subType == 6) { // FieldProp str.AppendLine(" int prop_id = " + stream.ReadInt32()); str.AppendLine(" float fZOffset = " + stream.ReadFloat()); str.AppendLine(" float fRotateX = " + stream.ReadFloat()); str.AppendLine(" float fRotateY = " + stream.ReadFloat()); str.AppendLine(" float fRotateZ = " + stream.ReadFloat()); str.AppendLine(" float fScaleX = " + stream.ReadFloat()); str.AppendLine(" float fScaleY = " + stream.ReadFloat()); str.AppendLine(" float fScaleZ = " + stream.ReadFloat()); str.AppendLine(" bool bLockHeight = " + stream.ReadBool()); str.AppendLine(" float fLockHeight = " + stream.ReadFloat()); } else { str.AppendLine(" [Extra Info]"); } } str.AppendLine("}"); Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString()); }
internal static void parse_PCMoveUpdt(ref PacketStream stream) { StringBuilder str = new StringBuilder(); str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]"); stream.ReadByte(); str.AppendLine("{"); str.AppendLine(" Int32 update_time = " + stream.ReadInt32()); str.AppendLine(" Single current_x = " + stream.ReadFloat()); str.AppendLine(" Single current_y = " + stream.ReadFloat()); str.AppendLine(" Single current_z = " + stream.ReadFloat()); str.AppendLine(" Byte stop = " + stream.ReadByte()); str.AppendLine("}"); Form1.PacketSend('G', GetPacketName(stream.GetId()), stream, str.ToString()); }
internal static void parse_PCMoveReq(ref PacketStream stream) { StringBuilder str = new StringBuilder(); str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]"); stream.ReadByte(); str.AppendLine("{"); str.AppendLine(" UInt32 player_handle = " + stream.ReadUInt32()); str.AppendLine(" Single from_x = " + stream.ReadFloat()); str.AppendLine(" Single from_y = " + stream.ReadFloat()); str.AppendLine(" UInt32 move_time = " + stream.ReadUInt32()); str.AppendLine(" Byte speed_sync = " + stream.ReadByte()); short c = stream.ReadInt16(); str.AppendLine(" Int16 move_count = " + c); str.AppendLine(" struct move_positions[move_count]"); str.AppendLine(" {"); for (int i = 0; i < c; i++) { str.AppendLine(" {"); str.AppendLine(" Single to_x = " + stream.ReadFloat()); str.AppendLine(" Single to_y = " + stream.ReadFloat()); str.AppendLine(" }"); } str.AppendLine(" }"); str.AppendLine("}"); Form1.PacketSend('G', GetPacketName(stream.GetId()), stream, str.ToString()); }
internal static void send_Unamed191(ref PacketStream stream) { StringBuilder str = new StringBuilder(); str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]"); stream.ReadByte(); str.AppendLine("{"); str.AppendLine(" UInt16 skill_id = " + stream.ReadUInt16()); str.AppendLine(" Byte level = " + stream.ReadByte()); str.AppendLine(" UInt32 handle = " + stream.ReadUInt32()); str.AppendLine(" UInt32 handle = " + stream.ReadUInt32()); str.AppendLine(" Float x = " + stream.ReadFloat()); str.AppendLine(" Float y = " + stream.ReadFloat()); str.AppendLine(" Float z = " + stream.ReadFloat()); str.AppendLine(" Byte layer = " + stream.ReadByte()); str.AppendLine(" ---Unknown Data---"); str.AppendLine("}"); Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString()); }
internal static void send_PCMove(ref PacketStream stream) { StringBuilder str = new StringBuilder(); str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]"); stream.ReadByte(); str.AppendLine("{"); str.AppendLine(" UInt32 time = " + stream.ReadUInt32()); /* 0 */ str.AppendLine(" UInt32 handle = " + stream.ReadUInt32()); /* 4 */ str.AppendLine(" Byte layer = " + stream.ReadByte()); /* 8 */ str.AppendLine(" Byte move_speed = " + stream.ReadByte()); /* 9 */ short pcount = stream.ReadInt16(); str.AppendLine(" Int16 point_count = " + pcount); /* 10 */ str.AppendLine(" struct move_positions[point_count]"); str.AppendLine(" {"); for (int i = 0; i < pcount; i++) { str.AppendLine(" {"); str.AppendLine(" Single to_x = " + stream.ReadFloat()); /* 12 */ str.AppendLine(" Single to_y = " + stream.ReadFloat()); /* 16 */ str.AppendLine(" }"); } str.AppendLine(" }"); str.AppendLine("}"); Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString()); }
internal static void send_LoginResult(ref PacketStream stream) { StringBuilder str = new StringBuilder(); str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]"); stream.ReadByte(); str.AppendLine("{"); str.AppendLine(" Int16 result = " + stream.ReadInt16()); str.AppendLine(" UInt32 handle = " + stream.ReadUInt32()); str.AppendLine(" float x = " + stream.ReadFloat()); str.AppendLine(" float y = " + stream.ReadFloat()); str.AppendLine(" float z = " + stream.ReadFloat()); str.AppendLine(" Byte layer = " + stream.ReadByte()); str.AppendLine(" float face = " + stream.ReadFloat()); str.AppendLine(" Int32 region_size = " + stream.ReadInt32()); str.AppendLine(" Int32 hp = " + stream.ReadInt32()); str.AppendLine(" Int32 mp = " + stream.ReadInt32()); str.AppendLine(" Int32 max_hp = " + stream.ReadInt32()); str.AppendLine(" Int32 max_mp = " + stream.ReadInt32()); str.AppendLine(" Int32 havoc = " + stream.ReadInt32()); str.AppendLine(" Int32 max_havoc = " + stream.ReadInt32()); str.AppendLine(" Int32 sex = " + stream.ReadInt32()); str.AppendLine(" Int32 race = " + stream.ReadInt32()); str.AppendLine(" Int32 skin_color = " + stream.ReadInt32()); str.AppendLine(" Int32 face_id = " + stream.ReadInt32()); str.AppendLine(" Int32 hair_id = " + stream.ReadInt32()); str.AppendLine(" string(19) char_name = " + stream.ReadString(0, 19)); str.AppendLine(" Int32 cell_size = " + stream.ReadInt32()); str.AppendLine(" Int32 guild_id = " + stream.ReadInt32()); str.AppendLine("}"); Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString()); }