summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-08-21 04:25:58 +0300
committerAndrei Karas <akaras@inbox.ru>2018-08-22 06:33:28 +0300
commita365de2b0735e51fc3c089253a8b4a2a54050be7 (patch)
tree2c3be872d4e35542efcac36dd1e38998569c79eb /src
parent39e50b6a4d8820635035ba691abbc9b59a420d91 (diff)
downloadhercules-a365de2b0735e51fc3c089253a8b4a2a54050be7.tar.gz
hercules-a365de2b0735e51fc3c089253a8b4a2a54050be7.tar.bz2
hercules-a365de2b0735e51fc3c089253a8b4a2a54050be7.tar.xz
hercules-a365de2b0735e51fc3c089253a8b4a2a54050be7.zip
Fix version check for achivment packets.
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 1c8f51856..beb9cdf47 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -20318,7 +20318,7 @@ static unsigned short clif_parse_cmd_optional(int fd, struct map_session_data *s
*/
static void clif_achievement_send_list(int fd, struct map_session_data *sd)
{
-#if PACKETVER >= 20141016
+#if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
int i = 0, count = 0, curr_exp_tmp = 0;
struct packet_achievement_list p = { 0 };
@@ -20381,7 +20381,7 @@ static void clif_achievement_send_list(int fd, struct map_session_data *sd)
*/
static void clif_achievement_send_update(int fd, struct map_session_data *sd, const struct achievement_data *ad)
{
-#if PACKETVER >= 20141016
+#if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
struct packet_achievement_update p = { 0 };
struct achievement *a = NULL;
int i = 0, points = 0, rank = 0, curr_rank_points = 0;
@@ -20435,7 +20435,6 @@ static void clif_achievement_send_update(int fd, struct map_session_data *sd, co
static void clif_parse_achievement_get_reward(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
static void clif_parse_achievement_get_reward(int fd, struct map_session_data *sd)
{
-#if PACKETVER >= 20141016
int ach_id = RFIFOL(fd, 2);
const struct achievement_data *ad = NULL;
struct achievement *ach = NULL;
@@ -20449,7 +20448,6 @@ static void clif_parse_achievement_get_reward(int fd, struct map_session_data *s
if (achievement->check_complete(sd, ad) && ach->completed_at && ach->rewarded_at == 0) {
achievement->get_rewards(sd, ad);
}
-#endif // PACKETVER >= 20141016
}
/**
@@ -20458,7 +20456,7 @@ static void clif_parse_achievement_get_reward(int fd, struct map_session_data *s
*/
static void clif_achievement_reward_ack(int fd, struct map_session_data *sd, const struct achievement_data *ad)
{
-#if PACKETVER >= 20141016
+#if PACKETVER_MAIN_NUM >= 20150225 || PACKETVER_RE_NUM >= 20141126 || defined(PACKETVER_ZERO)
struct packet_achievement_reward_ack p = { 0 };
nullpo_retv(sd);