summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2016-01-18 16:53:43 +0530
committerAsheraf <acheraf1998@gmail.com>2018-03-12 18:06:14 +0000
commit4896facf53cf6d6ea60dba22f72389721d502673 (patch)
treee77486997ed0d8241e401413c4206a35ad984023 /src
parent8e8e0a2da0f9696c5965e79237642b3dee36dd78 (diff)
downloadhercules-4896facf53cf6d6ea60dba22f72389721d502673.tar.gz
hercules-4896facf53cf6d6ea60dba22f72389721d502673.tar.bz2
hercules-4896facf53cf6d6ea60dba22f72389721d502673.tar.xz
hercules-4896facf53cf6d6ea60dba22f72389721d502673.zip
Extended ADD_QUEST to support new packet
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c11
-rw-r--r--src/map/packets_struct.h15
2 files changed, 25 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index e996db1f1..f0c090a03 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -16222,6 +16222,7 @@ void clif_quest_send_mission(struct map_session_data *sd)
/// Notification about a new quest (ZC_ADD_QUEST).
/// 02b3 <quest id>.L <active>.B <start time>.L <expire time>.L <mobs>.W { <mob id>.L <mob count>.W <mob name>.24B }*3
+/// 09f9 <quest id>.L <active>.B <start time>.L <expire time>.L <mobs>.W { <hunt identification>.L <mob type>.L <mob id>.L <min level>.L <max level>.L <mob count>.W <mob name>.24B }*3
void clif_quest_add(struct map_session_data *sd, struct quest *qd)
{
int i, len;
@@ -16252,7 +16253,17 @@ void clif_quest_add(struct map_session_data *sd, struct quest *qd)
struct mob_db *monster;
monster = mob->db(qi->objectives[i].mob);
+
+#if PACKETVER >= 20150513
+ packet->objectives[i].huntIdent = (qd->quest_id * 1000) + i;
+ packet->objectives[i].mobType = 0; // Info Needed
+#endif
packet->objectives[i].mob_id = qi->objectives[i].mob;
+#if PACKETVER >= 20150513
+ // Info Needed
+ packet->objectives[i].levelMin = 0;
+ packet->objectives[i].levelMax = 0;
+#endif
packet->objectives[i].huntCount = qd->count[i];
memcpy(packet->objectives[i].mobName, monster->jname, NAME_LENGTH);
}
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index c8ed85947..309c5f007 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -357,7 +357,11 @@ enum packet_headers {
clanLeave = 0x0989, ///< ZC_ACK_CLAN_LEAVE
clanMessage = 0x098E, ///< ZC_NOTIFY_CLAN_CHAT
#endif
+#if PACKETVER >= 20150513 // [4144] 0x09f9 handled in client from 2014-10-29aRagexe and 2014-03-26cRagexeRE
+ questAddType = 0x9f9,
+#else
questAddType = 0x2b3,
+#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
@@ -1610,9 +1614,18 @@ struct PACKET_ZC_NOTIFY_CLAN_CHAT {
/**
* PACKET_ZC_MISSION_HUNT (PACKETVER < 20150513)
+ * PACKET_ZC_MISSION_HUNT_EX (PACKETVER >= 20150513)
*/
struct packet_quest_hunt_sub {
+#if PACKETVER >= 20150513
+ uint32 huntIdent;
+ uint32 mobType;
+#endif
int32 mob_id;
+#if PACKETVER >= 20150513
+ int16 levelMin;
+ int16 levelMax;
+#endif
int16 huntCount;
char mobName[NAME_LENGTH];
} __attribute__((packed));
@@ -1620,7 +1633,7 @@ struct packet_quest_hunt_sub {
/**
* Header for:
* PACKET_ZC_ADD_QUEST (PACKETVER < 20150513)
- *
+ * PACKET_ZC_ADD_QUEST_EX (PACKETVER >= 20150513)
*/
struct packet_quest_add_header {
uint16 PacketType;