summaryrefslogtreecommitdiff
path: root/src/map/script.c
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 /src/map/script.c
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.
Diffstat (limited to 'src/map/script.c')
-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 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;