summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2017-11-02 23:38:36 +0000
committerAsheraf <acheraf1998@gmail.com>2017-11-02 23:47:57 +0000
commit72cfd8a02a516467d4b14553f42f7fc67f6cc41a (patch)
tree7cb0517bacea052a1ec9814ba4c61b6565bf1bc0
parent9519c40b00802dfb22070884820ab4a26d7c5ba5 (diff)
downloadhercules-72cfd8a02a516467d4b14553f42f7fc67f6cc41a.tar.gz
hercules-72cfd8a02a516467d4b14553f42f7fc67f6cc41a.tar.bz2
hercules-72cfd8a02a516467d4b14553f42f7fc67f6cc41a.tar.xz
hercules-72cfd8a02a516467d4b14553f42f7fc67f6cc41a.zip
update qtype constants to support new 2017 client icons.
-rw-r--r--db/constants.conf23
-rw-r--r--doc/script_commands.txt18
-rw-r--r--src/map/script.c42
3 files changed, 54 insertions, 29 deletions
diff --git a/db/constants.conf b/db/constants.conf
index 0015646dd..921acbeaf 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -3610,15 +3610,20 @@ constants_db: {
HUNTING: 2
comment__: "questinfo"
- QTYPE_NONE: 0x270f
- QTYPE_QUEST: 0x00
- QTYPE_QUEST2: 0x01
- QTYPE_JOB: 0x02
- QTYPE_JOB2: 0x03
- QTYPE_EVENT: 0x04
- QTYPE_EVENT2: 0x05
- QTYPE_WARG: 0x06
- QTYPE_WARG2: 0x08
+ QTYPE_NONE: 0x270f
+ QTYPE_QUEST: 0x00
+ QTYPE_QUEST2: 0x01
+ QTYPE_JOB: 0x02
+ QTYPE_JOB2: 0x03
+ QTYPE_EVENT: 0x04
+ QTYPE_EVENT2: 0x05
+ QTYPE_WARG: 0x06
+ QTYPE_CLICKME: 0x06
+ QTYPE_DAILYQUEST: 0x07
+ QTYPE_WARG2: 0x08
+ QTYPE_EVENT3: 0x08
+ QTYPE_JOBQUEST: 0x09
+ QTYPE_JUMPING_PORING: 0xA
comment__: "Font weight"
FW_DONTCARE: 0
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 5c730106b..b4ba373b7 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -9226,7 +9226,14 @@ No Icon : QTYPE_NONE
! Event Icon : QTYPE_EVENT
? Event Icon : QTYPE_EVENT2
Warg : QTYPE_WARG
-Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410)
+Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315)
+
+- Only for packetver >= 20170315
+Click Me Icon : QTYPE_CLICKME
+! Daily Quest Icon : QTYPE_DAILYQUEST
+! Green Event Icon : QTYPE_EVENT3
+! Job Quest Icon : QTYPE_JOBQUEST
+Jumping Poring : QTYPE_JUMPING_PORING
Map Mark Color, when used, creates a mark in the user's mini map on the position of the NPC,
the available color values are:
@@ -9335,7 +9342,14 @@ Remove Icon : QTYPE_NONE
! Event Icon : QTYPE_EVENT
? Event Icon : QTYPE_EVENT2
Warg : QTYPE_WARG
-Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410)
+Warg Face : QTYPE_WARG2 (Only for packetver >= 20120410 && packetver < 20170315)
+
+- Only for packetver >= 20170315
+Click Me Icon : QTYPE_CLICKME
+! Daily Quest Icon : QTYPE_DAILYQUEST
+! Green Event Icon : QTYPE_EVENT3
+! Job Quest Icon : QTYPE_JOBQUEST
+Jumping Poring : QTYPE_JUMPING_PORING
Mark Color:
0 - No Mark
diff --git a/src/map/script.c b/src/map/script.c
index 6b920514c..97dab1ed9 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -20447,15 +20447,18 @@ BUILDIN(questinfo)
quest_id = script_getnum(st, 2);
icon = script_getnum(st, 3);
- #if PACKETVER >= 20120410
- if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
- icon = 9999; // Default to nothing if icon id is invalid.
- #else
- if(icon < 0 || icon > 7)
- icon = 0;
- else
- icon = icon + 1;
- #endif
+#if PACKETVER >= 20170315
+ if (icon < 0 || (icon > 10 && icon != 9999))
+ icon = 9999;
+#elif PACKETVER >= 20120410
+ if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
+ icon = 9999; // Default to nothing if icon id is invalid.
+#else
+ if (icon < 0 || icon > 7)
+ icon = 0;
+ else
+ icon = icon + 1;
+#endif
qi.quest_id = quest_id;
qi.icon = (unsigned char)icon;
@@ -20649,15 +20652,18 @@ BUILDIN(showevent)
}
}
- #if PACKETVER >= 20120410
- if(icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
- icon = 9999; // Default to nothing if icon id is invalid.
- #else
- if(icon < 0 || icon > 7)
- icon = 0;
- else
- icon = icon + 1;
- #endif
+#if PACKETVER >= 20170315
+ if (icon < 0 || (icon > 10 && icon != 9999))
+ icon = 9999;
+#elif PACKETVER >= 20120410
+ if (icon < 0 || (icon > 8 && icon != 9999) || icon == 7)
+ icon = 9999; // Default to nothing if icon id is invalid.
+#else
+ if (icon < 0 || icon > 7)
+ icon = 0;
+ else
+ icon = icon + 1;
+#endif
clif->quest_show_event(sd, &nd->bl, icon, color);
return true;