summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2016-01-18 17:13:15 +0530
committerAsheraf <acheraf1998@gmail.com>2018-03-13 07:52:47 +0000
commit974c7f982484341b58bf85c517bc81ab3b0e5ebe (patch)
tree947532cd69a30780138fff3e31513e2cf203c108
parent7a73c1cef1a60cc7282e1f60b5ed8e4a79d0dae7 (diff)
downloadhercules-974c7f982484341b58bf85c517bc81ab3b0e5ebe.tar.gz
hercules-974c7f982484341b58bf85c517bc81ab3b0e5ebe.tar.bz2
hercules-974c7f982484341b58bf85c517bc81ab3b0e5ebe.tar.xz
hercules-974c7f982484341b58bf85c517bc81ab3b0e5ebe.zip
Extended UPDATE_MISSION_HUNT to support new packet
-rw-r--r--src/map/clif.c5
-rw-r--r--src/map/packets_struct.h12
2 files changed, 16 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index a8f958241..8adb24450 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16286,6 +16286,7 @@ void clif_quest_delete(struct map_session_data *sd, int quest_id) {
/// Notification of an update to the hunting mission counter (ZC_UPDATE_MISSION_HUNT).
/// 02b5 <packet len>.W <mobs>.W { <quest id>.L <mob id>.L <total count>.W <current count>.W }*3
+/// 09fa <packet len>.W <mobs>.W { <quest id>.L <hunt identification>.L <total count>.W <current count>.W }*3
void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd)
{
int i, len, real_len;
@@ -16313,7 +16314,11 @@ void clif_quest_update_objective(struct map_session_data *sd, struct quest *qd)
real_len += sizeof(packet->objectives[i]);
packet->objectives[i].questID = qd->quest_id;
+#if PACKETVER >= 20150513
+ packet->objectives[i].huntIdent = (qd->quest_id * 1000) + i;
+#else
packet->objectives[i].mob_id = qi->objectives[i].mob;
+#endif
packet->objectives[i].maxCount = qi->objectives[i].count;
packet->objectives[i].count = qd->count[i];
}
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index 159aba98c..e7920aba4 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -362,7 +362,11 @@ enum packet_headers {
#else
questAddType = 0x2b3,
#endif // PACKETVER < 20150513
+#if PACKETVER >= 20150513
+ questUpdateType = 0x9fa,
+#else
questUpdateType = 0x2b5,
+#endif // PACKETVER < 20150513
};
#if !defined(sun) && (!defined(__NETBSD__) || __NetBSD_Version__ >= 600000000) // NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
@@ -1622,7 +1626,7 @@ struct packet_quest_hunt_sub {
uint32 huntIdent;
uint32 mobType;
#endif
- int32 mob_id;
+ uint32 mob_id;
#if PACKETVER >= 20150513
int16 levelMin;
int16 levelMax;
@@ -1648,10 +1652,15 @@ struct packet_quest_add_header {
/**
* PACKET_MOB_HUNTING (PACKETVER < 20150513)
+ * PACKET_MOB_HUNTING_EX (PACKETVER >= 20150513)
*/
struct packet_quest_update_hunt {
uint32 questID;
+#if PACKETVER >= 20150513
+ uint32 huntIdent;
+#else
uint32 mob_id;
+#endif // PACKETVER < 20150513
int16 maxCount;
int16 count;
} __attribute__((packed));
@@ -1659,6 +1668,7 @@ struct packet_quest_update_hunt {
/**
* Header for:
* PACKET_ZC_UPDATE_MISSION_HUNT (PACKETVER < 20150513)
+ * PACKET_ZC_UPDATE_MISSION_HUNT_EX (PACKETVER >= 20150513)
*/
struct packet_quest_update_header {
uint16 PacketType;