summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-28 22:13:45 +0300
committerAndrei Karas <akaras@inbox.ru>2018-10-02 21:41:55 +0300
commit16b4e9a8a2ee0eae30d18bdf30ed0a24d85200bb (patch)
tree5e118e67499cf196526ecc3408a8eab296b8516f /src
parent4752716873b2fd25613d11be3ec0994f515165bd (diff)
downloadhercules-16b4e9a8a2ee0eae30d18bdf30ed0a24d85200bb.tar.gz
hercules-16b4e9a8a2ee0eae30d18bdf30ed0a24d85200bb.tar.bz2
hercules-16b4e9a8a2ee0eae30d18bdf30ed0a24d85200bb.tar.xz
hercules-16b4e9a8a2ee0eae30d18bdf30ed0a24d85200bb.zip
Fix achievement reward packet.
Diffstat (limited to 'src')
-rw-r--r--src/map/achievement.c5
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/packets_struct.h2
3 files changed, 5 insertions, 4 deletions
diff --git a/src/map/achievement.c b/src/map/achievement.c
index 1fb513ea0..2450cfb49 100644
--- a/src/map/achievement.c
+++ b/src/map/achievement.c
@@ -1021,7 +1021,8 @@ static bool achievement_check_title(struct map_session_data *sd, int title_id) {
* @param sd session data
* @param ad achievement data
*/
-static void achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad) {
+static void achievement_get_rewards(struct map_session_data *sd, const struct achievement_data *ad)
+{
int i = 0;
struct achievement *ach = NULL;
@@ -1062,8 +1063,8 @@ static void achievement_get_rewards(struct map_session_data *sd, const struct ac
VECTOR_PUSH(sd->title_ids, ad->rewards.title_id);
clif->achievement_send_list(sd->fd, sd);
} else {
- clif->achievement_reward_ack(sd->fd, sd, ad);
clif->achievement_send_update(sd->fd, sd, ad); // send update.
+ clif->achievement_reward_ack(sd->fd, sd, ad);
}
}
diff --git a/src/map/clif.c b/src/map/clif.c
index 1bf77399c..cf9487fe0 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -20638,7 +20638,7 @@ static void clif_achievement_reward_ack(int fd, struct map_session_data *sd, con
nullpo_retv(ad);
p.packet_id = achievementRewardAckType;
- p.received = 1;
+ p.failed = 0;
p.ach_id = ad->id;
clif->send(&p, packet_len(achievementRewardAckType), &sd->bl, SELF);
diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h
index af76a66d7..e23822e31 100644
--- a/src/map/packets_struct.h
+++ b/src/map/packets_struct.h
@@ -2722,7 +2722,7 @@ struct packet_achievement_update {
struct packet_achievement_reward_ack {
uint16 packet_id;
- uint8 received;
+ uint8 failed;
uint32 ach_id;
} __attribute__((packed));