示例#1
0
        internal static void parse_Target(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	uint target = " + stream.ReadUInt32());
            str.AppendLine("}");

            Form1.PacketSend('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#2
0
        internal static void parse_Equip(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 ItemHandle = " + stream.ReadUInt32());
            str.AppendLine("	4B Unknown = " + stream.ReadUInt32());
            str.AppendLine("}");

            Form1.PacketSend('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#3
0
        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());
        }
示例#4
0
        internal static void send_Dialog(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	Int32 dialog_type = " + stream.ReadInt32());
            str.AppendLine("	UInt32 npc_handle = " + stream.ReadUInt32());
            short titleLen = stream.ReadInt16();
            short textLen = stream.ReadInt16();
            short menuLen = stream.ReadInt16();
            str.AppendLine("	Int16 TitleLen = " + titleLen);
            str.AppendLine("	Int16 TextLen = " + textLen);
            str.AppendLine("	Int16 MenuLen = " + menuLen);
            str.AppendLine("	String(TitleLen) Title = " + stream.ReadString(0, titleLen));
            str.AppendLine("	String(TextLen) Text = " + stream.ReadString(0, textLen));
            str.AppendLine("	struct menu_option[MenuLen]");
            str.AppendLine("	{");
            str.AppendLine("		{");
            // TODO
            str.AppendLine("		}");
            str.AppendLine("	}");
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#5
0
        internal static void send_InventoryList(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            short count = stream.ReadInt16();
            str.AppendLine("	Int16 count = " + count);
            str.AppendLine("	struct Item[count]");
            str.AppendLine("	{");
            for (int i = 0; i < count; i++)
            {
                str.AppendLine("		{");
                str.AppendLine("			UInt32 item_handle = " + stream.ReadUInt32());
                str.AppendLine("			Int32 item_id = " + stream.ReadInt32());
                str.AppendLine("			Int64 item_uid = " + stream.ReadInt64());
                str.AppendLine("			Int64 count = " + stream.ReadInt64());
                str.AppendLine("			4B unknown = " + stream.ReadInt32());
                str.AppendLine("			4B unknown = " + stream.ReadInt32());
                str.AppendLine("			Byte enhance = " + stream.ReadByte());
                str.AppendLine("			Byte level = " + stream.ReadByte());
                str.AppendLine("			1B unknown = " + stream.ReadByte());
                for (int j = 0; j < 80; j+=4)
                    str.AppendLine("			4B unknown = " + stream.ReadInt32());
                str.AppendLine("			Int32 wear_info = " + stream.ReadInt32());
                str.AppendLine("			Int16 unknown // 0 = " + stream.ReadInt16());
                str.AppendLine("			Int32 idx = " + stream.ReadInt32());
                str.AppendLine("		}");
            }

            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#6
0
        internal static void send_A(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 unknown = " + stream.ReadUInt32());

            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#7
0
        internal static void send_BeltSlotInfo(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 slot0_handle = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 slot1_handle = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 slot2_handle = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 slot3_handle = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 slot4_handle = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 slot5_handle = " + stream.ReadUInt32());
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#8
0
        internal static void send_Property(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());
            bool as_int = stream.ReadBool();
            str.AppendLine("	Byte AsInt = " + as_int);
            str.AppendLine("	String(16) property_name = " + stream.ReadString(0, 16));
            str.AppendLine("	Int32 value = " + stream.ReadInt32());
            str.AppendLine("	Int32 unknown = " + stream.ReadInt32());
            if (!as_int)
                str.AppendLine("	String(?) value = " + stream.ReadString(0, stream.GetSize() - 28));
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#9
0
        internal static void send_SkillList(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32());
            short count = stream.ReadInt16();
            str.AppendLine("	Int16 count = " + count);
            str.AppendLine("	Byte unknown = " + stream.ReadByte());
            str.AppendLine("	struct skill_info[count]");
            str.AppendLine("	{");
            for (int i = 0; i < count; i++)
            {
                str.AppendLine("		{");
                str.AppendLine("			Int32 skill_id = " + stream.ReadInt32());
                str.AppendLine("			Byte skill_lv = " + stream.ReadByte());
                str.AppendLine("			Byte skill_lv = " + stream.ReadByte());
                str.AppendLine("			UInt32 cooldown = " + stream.ReadInt32());
                str.AppendLine("			UInt32 unknown = " + stream.ReadInt32());
                str.AppendLine("		}");
            }
            str.AppendLine("	}");
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#10
0
        //========== Send
        internal static void send_PacketResponse(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	Int16 packet_id = " + stream.ReadInt16());
            str.AppendLine("	Int16 response = " + stream.ReadInt16());
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32());
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#11
0
        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());
        }
示例#12
0
        internal static void send_MaxHPMPUpdate(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32());
            str.AppendLine("	4B unknown = " + stream.ReadInt32());
            str.AppendLine("	Int32 old_hp = " + stream.ReadInt32());
            str.AppendLine("	Int32 new_hp = " + stream.ReadInt32());
            str.AppendLine("	4B Unknown = " + stream.ReadInt32());
            str.AppendLine("	Int32 old_mp = " + stream.ReadInt32());
            str.AppendLine("	Int32 new_mp = " + stream.ReadInt32());
            str.AppendLine("	Byte unknown = " + stream.ReadByte());
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#13
0
        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());
        }
示例#14
0
        internal static void send_ItemDrop(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	uint source_handle = " + stream.ReadUInt32());
            str.AppendLine("	uint item_handle = " + stream.ReadUInt32());
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#15
0
        internal static void parse_UseSkill(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("	UInt32 handle = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32());
            str.AppendLine("	4B unknown = " + stream.ReadInt32());
            str.AppendLine("	4B unknown = " + stream.ReadInt32());
            str.AppendLine("	4B unknown = " + stream.ReadInt32());
            str.AppendLine("	1B unknown = " + stream.ReadByte());
            str.AppendLine("	Byte level = " + stream.ReadByte());
            str.AppendLine("}");

            Form1.PacketSend('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#16
0
        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());
        }
示例#17
0
        internal static void parse_WearChange(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 item_handle = " + stream.ReadUInt32());
            str.AppendLine("	Int16 wear_type = " + stream.ReadInt16());
            str.AppendLine("	UInt32 player_handle = " + stream.ReadUInt32());
            str.AppendLine("	Byte item_enhance = " + stream.ReadByte());
            str.AppendLine("	2B Unknown = " + stream.ReadInt16());
            str.AppendLine("	2B Unknown = " + stream.ReadInt16());
            str.AppendLine("	2B Unknown = " + stream.ReadInt16());
            str.AppendLine("	2B Unknown = " + stream.ReadInt16());
            str.AppendLine("}");

            Form1.PacketSend('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#18
0
        internal static void send_UpdateHPMP(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 hp_recover = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 mp_recover = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 new_hp = " + stream.ReadUInt32());
            str.AppendLine("	UInt32 new_mp = " + stream.ReadUInt32());
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#19
0
        internal static void send_Attack(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	uint src_handle = " + stream.ReadUInt32());
            str.AppendLine("	uint dst_handle = " + stream.ReadUInt32());
            str.AppendLine("	ushort attack_speed = " + stream.ReadInt16());
            str.AppendLine("	ushort attack_delay = " + stream.ReadInt16());
            str.AppendLine("	byte attack_action = " + stream.ReadByte());
            str.AppendLine("	byte attack_flag = " + stream.ReadByte());
            int count = stream.ReadByte();
            str.AppendLine("	byte count = " + count);
            for (int i = 0; i < count; i++)
            {
                str.AppendLine("	uint hp_damage = " + stream.ReadUInt32());
                str.AppendLine("	uint mp_damage = " + stream.ReadUInt32());
                str.AppendLine("	byte flag = " + stream.ReadByte());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint new_dst_hp = " + stream.ReadUInt32());
                str.AppendLine("	uint new_dst_mp = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint unknown = " + stream.ReadUInt32());
                str.AppendLine("	uint new_src_hp = " + stream.ReadUInt32());
                str.AppendLine("	uint new_src_mp = " + stream.ReadUInt32());
            }
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#20
0
        internal static void send_UpdateLevel(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32());
            str.AppendLine("	Int32 level = " + stream.ReadInt32());
            str.AppendLine("	Int32 job_level = " + stream.ReadInt32());
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#21
0
        internal static void send_Chat(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	uint src_handle = " + stream.ReadUInt32());
            short size = stream.ReadInt16();
            str.AppendLine("	short size = " + size);
            str.AppendLine("	String(size) message = " + stream.ReadString(0, size));
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#22
0
        internal static void send_UpdateStatus(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32()); /* 0 */
            str.AppendLine("	Int16 unknown1 = " + stream.ReadInt16());
            str.AppendLine("	Int16 strenght = " + stream.ReadInt16()); /* 6 */
            str.AppendLine("	Int16 vitality = " + stream.ReadInt16()); /* 8 */
            str.AppendLine("	Int16 dexterity = " + stream.ReadInt16()); /* 10 */
            str.AppendLine("	Int16 agility = " + stream.ReadInt16()); /* 12 */
            str.AppendLine("	Int16 int = " + stream.ReadInt16()); /* 14 */
            str.AppendLine("	Int16 wisdom = " + stream.ReadInt16()); /* 16 */
            str.AppendLine("	Int16 luck = " + stream.ReadInt16()); /* 18 */
            str.AppendLine("	Int16 crit_rate = " + stream.ReadInt16()); /* 20 */
            str.AppendLine("	Int16 crit_power = " + stream.ReadInt16()); /* 22 */
            str.AppendLine("	Int16 p_atk_right = " + stream.ReadInt16()); /* 24 */
            str.AppendLine("	Int16 p_atk_left = " + stream.ReadInt16()); /* 26 */
            str.AppendLine("	Int16 p_def = " + stream.ReadInt16());/* 28 */
            str.AppendLine("	Int16 block_def = " + stream.ReadInt16());/* 30 */
            str.AppendLine("	Int16 matk = " + stream.ReadInt16());/* 32 */
            str.AppendLine("	Int16 mdef = " + stream.ReadInt16());/* 34 */
            str.AppendLine("	Int16 accuracy_right = " + stream.ReadInt16());/* 36 */
            str.AppendLine("	Int16 accuracy_left = " + stream.ReadInt16()); /* 38 */
            str.AppendLine("	Int16 m_accuracy = " + stream.ReadInt16()); /* 40 */
            str.AppendLine("	Int16 evasion = " + stream.ReadInt16()); /* 42 */
            str.AppendLine("	Int16 m_res = " + stream.ReadInt16()); /* 44 */
            str.AppendLine("	Int16 block_per = " + stream.ReadInt16()); /* 46 */
            str.AppendLine("	Int16 mov_spd = " + stream.ReadInt16()); /* 48 */
            str.AppendLine("	Int16 atk_spd = " + stream.ReadInt16()); /* 50 */
            str.AppendLine("	Int16 unknown2 = " + stream.ReadInt16());
            str.AppendLine("	Int16 max_weight = " + stream.ReadInt16()); /* 54 */
            str.AppendLine("	Int16 unknown4 = " + stream.ReadInt16());
            str.AppendLine("	Int16 cast_spd = " + stream.ReadInt16());  /* 58 */
            str.AppendLine("	Int16 recast_spd = " + stream.ReadInt16());  /* 60 */
            str.AppendLine("	Int16 unknown5 = " + stream.ReadInt16());
            str.AppendLine("	Int16 hp_regen = " + stream.ReadInt16()); /* 64 */
            str.AppendLine("	Int16 hp_recov = " + stream.ReadInt16()); /* 66 */
            str.AppendLine("	Int16 mp_regen = " + stream.ReadInt16()); /* 68 */
            str.AppendLine("	Int16 mp_recov = " + stream.ReadInt16()); /* 70 */
            str.AppendLine("	Int16 perf_block = " + stream.ReadInt16()); /* 72 */
            str.AppendLine("	Int16 m_ignore = " + stream.ReadInt16()); /* 74 */
            str.AppendLine("	Int16 m_ignore_perc = " + stream.ReadInt16()); /* 76 */
            str.AppendLine("	Int16 p_ignore = " + stream.ReadInt16()); /* 78 */
            str.AppendLine("	Int16 p_ignore_perc = " + stream.ReadInt16()); /* 80 */
            str.AppendLine("	Int16 m_pierce = " + stream.ReadInt16()); /* 82 */
            str.AppendLine("	Int16 m_pierce_perc = " + stream.ReadInt16()); /* 84 */
            str.AppendLine("	Int16 p_pierce = " + stream.ReadInt16()); /* 86 */
            str.AppendLine("	Int16 p_pierce_perc = " + stream.ReadInt16()); /* 88 */
            str.AppendLine("	Byte is_temporary = " + stream.ReadByte()); /* 90 */
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }
示例#23
0
        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());
        }
示例#24
0
        internal static void send_EntityState(ref PacketStream stream)
        {
            StringBuilder str = new StringBuilder();
            str.AppendLine("struct " + GetPacketName(stream.GetId()) + " [" + stream.GetId() + "]");
            stream.ReadByte();

            str.AppendLine("{");
            str.AppendLine("	UInt32 handle = " + stream.ReadUInt32()); /* 0 */
            str.AppendLine("	UInt32 state = " + stream.ReadUInt32()); /* 4 */
            str.AppendLine("}");

            Form1.PacketRecv('G', GetPacketName(stream.GetId()), stream, str.ToString());
        }