summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-11-04 21:02:49 +0100
committerGitHub <noreply@github.com>2017-11-04 21:02:49 +0100
commit51b3d1e9234dd33fb4fe6308cb9b7b01b90559d9 (patch)
tree795669ee3e9e1bc7ef9ee47309566d7c88c6cdc4 /src
parent94859ffd0f75163b30b883091b7c54bae30beacb (diff)
parent72cfd8a02a516467d4b14553f42f7fc67f6cc41a (diff)
downloadhercules-51b3d1e9234dd33fb4fe6308cb9b7b01b90559d9.tar.gz
hercules-51b3d1e9234dd33fb4fe6308cb9b7b01b90559d9.tar.bz2
hercules-51b3d1e9234dd33fb4fe6308cb9b7b01b90559d9.tar.xz
hercules-51b3d1e9234dd33fb4fe6308cb9b7b01b90559d9.zip
Merge pull request #1894 from Asheraf/qtype
update qtype constants to support new 2017 client icons.
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c42
1 files changed, 24 insertions, 18 deletions
diff --git a/src/map/script.c b/src/map/script.c
index c218e98a6..2d4f60f37 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -20452,15 +20452,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;
@@ -20654,15 +20657,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;