summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c271
1 files changed, 209 insertions, 62 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 28b20c9e2..4dc36be6d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -293,7 +293,11 @@ unsigned char clif_bl_type(struct block_list *bl)
case BL_NPC:
vd = status->get_viewdata(bl);
nullpo_retr(CLUT_NPC, vd);
+#if PACKETVER >= 20170726
+ return CLUT_EVENT;
+#else
return pc->db_checkid(vd->class) ? CLUT_PC : CLUT_EVENT;
+#endif
case BL_PET:
vd = status->get_viewdata(bl);
nullpo_retr(CLUT_NPC, vd);
@@ -679,7 +683,7 @@ void clif_authok(struct map_session_data *sd)
p.font = sd->status.font;
#endif
// Some clients smaller than 20160330 cant be tested [4144]
-#if PACKETVER >= 20141016 && PACKETVER < 20160330
+#if PACKETVER >= 20141022 && PACKETVER < 20160330
p.sex = sd->status.sex;
#endif
clif->send(&p,sizeof(p),&sd->bl,SELF);
@@ -888,8 +892,8 @@ void clif_get_weapon_view(struct map_session_data* sd, unsigned short *rhand, un
}
#if PACKETVER < 4
- *rhand = sd->status.weapon;
- *lhand = sd->status.shield;
+ *rhand = sd->status.look.weapon;
+ *lhand = sd->status.look.shield;
#else
if (sd->equip_index[EQI_HAND_R] >= 0 &&
sd->inventory_data[sd->equip_index[EQI_HAND_R]])
@@ -1067,14 +1071,17 @@ void clif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enu
#endif
#if PACKETVER >= 20120221
if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) {
- const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
p.maxHP = status_get_max_hp(bl);
p.HP = status_get_hp(bl);
- p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0;
} else {
p.maxHP = -1;
p.HP = -1;
- p.isBoss = 0;
+ }
+ if (bl->type == BL_MOB) {
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+ p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE;
+ } else {
+ p.isBoss = BTYPE_NONE;
}
#endif
#if PACKETVER >= 20150513
@@ -1216,14 +1223,17 @@ void clif_spawn_unit(struct block_list* bl, enum send_target target) {
#endif
#if PACKETVER >= 20120221
if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) {
- const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
p.maxHP = status_get_max_hp(bl);
p.HP = status_get_hp(bl);
- p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0;
} else {
p.maxHP = -1;
p.HP = -1;
- p.isBoss = 0;
+ }
+ if (bl->type == BL_MOB) {
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+ p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE;
+ } else {
+ p.isBoss = BTYPE_NONE;
}
#endif
#if PACKETVER >= 20150513
@@ -1315,14 +1325,17 @@ void clif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
#endif
#if PACKETVER >= 20120221
if (battle_config.show_monster_hp_bar && bl->type == BL_MOB && status_get_hp(bl) < status_get_max_hp(bl)) {
- const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
p.maxHP = status_get_max_hp(bl);
p.HP = status_get_hp(bl);
- p.isBoss = (md->spawn != NULL && md->spawn->state.boss) ? 1 : 0;
} else {
p.maxHP = -1;
p.HP = -1;
- p.isBoss = 0;
+ }
+ if (bl->type == BL_MOB) {
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+ p.isBoss = (md->spawn != NULL) ? md->spawn->state.boss : BTYPE_NONE;
+ } else {
+ p.isBoss = BTYPE_NONE;
}
#endif
#if PACKETVER >= 20150513
@@ -1491,8 +1504,8 @@ bool clif_spawn(struct block_list *bl)
}
if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count > 0)
clif->spiritcharm(sd);
- if (sd->status.robe)
- clif->refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA);
+ if (sd->status.look.robe != 0)
+ clif->refreshlook(bl, bl->id, LOOK_ROBE, sd->status.look.robe, AREA);
}
break;
case BL_MOB:
@@ -2414,9 +2427,9 @@ void clif_addcards2(unsigned short *cards, struct item* item) {
int clif_add_item_options(struct ItemOptions *buf, const struct item *it)
{
int i = 0, j = 0, total_options = 0;
-
+
nullpo_ret(buf);
-
+
// Append the buffer with existing options first.
for (i = 0; i < MAX_ITEM_OPTIONS; i++) {
if (it->option[i].index) {
@@ -2433,7 +2446,7 @@ void clif_addcards2(unsigned short *cards, struct item* item) {
WBUFW(buf, j * 5 + 2) = 0;
WBUFB(buf, j * 5 + 4) = 0;
}
-
+
return total_options;
}
@@ -2488,7 +2501,7 @@ void clif_additem(struct map_session_data *sd, int n, int amount, int fail)
#endif
#if PACKETVER >= 20160921
p.favorite = sd->status.inventory[n].favorite;
- p.look = sd->inventory_data[n]->look;
+ p.look = sd->inventory_data[n]->view_sprite;
#endif
}
p.result = (unsigned char)fail;
@@ -2597,7 +2610,7 @@ void clif_item_equip(short idx, struct EQUIPITEM_INFO *p, struct item *it, struc
#endif
#if PACKETVER >= 20100629
- p->wItemSpriteNumber = (id->equip&EQP_VISIBLE) ? id->look : 0;
+ p->wItemSpriteNumber = (id->equip&EQP_VISIBLE) ? id->view_sprite : 0;
#endif
#if PACKETVER >= 20120925
@@ -3033,27 +3046,50 @@ void clif_updatestatus(struct map_session_data *sd,int type)
WFIFOL(fd,4)=sd->status.zeny;
len = packet_len(0xb1);
break;
+// [4144] unconfirment exact version can be from 20170405 to 20170913
+#if PACKETVER >= 20170830
case SP_BASEEXP:
- WFIFOW(fd,0)=0xb1;
- WFIFOL(fd,4)=sd->status.base_exp;
+ WFIFOW(fd, 0) = 0xacb;
+ WFIFOQ(fd, 4) = sd->status.base_exp;
+ len = packet_len(0xacb);
+ break;
+ case SP_JOBEXP:
+ WFIFOW(fd, 0) = 0xacb;
+ WFIFOQ(fd, 4) = sd->status.job_exp;
+ len = packet_len(0xacb);
+ break;
+ case SP_NEXTBASEEXP:
+ WFIFOW(fd, 0) = 0xacb;
+ WFIFOQ(fd, 4) = pc->nextbaseexp(sd);
+ len = packet_len(0xacb);
+ break;
+ case SP_NEXTJOBEXP:
+ WFIFOW(fd, 0) = 0xacb;
+ WFIFOQ(fd, 4) = pc->nextjobexp(sd);
+ len = packet_len(0xacb);
+ break;
+#else
+ case SP_BASEEXP:
+ WFIFOW(fd, 0) = 0xb1;
+ WFIFOL(fd, 4) = (uint32)(sd->status.base_exp);
len = packet_len(0xb1);
break;
case SP_JOBEXP:
- WFIFOW(fd,0)=0xb1;
- WFIFOL(fd,4)=sd->status.job_exp;
+ WFIFOW(fd, 0) = 0xb1;
+ WFIFOL(fd, 4) = (uint32)(sd->status.job_exp);
len = packet_len(0xb1);
break;
case SP_NEXTBASEEXP:
- WFIFOW(fd,0)=0xb1;
- WFIFOL(fd,4)=pc->nextbaseexp(sd);
+ WFIFOW(fd, 0) = 0xb1;
+ WFIFOL(fd, 4) = (uint32)pc->nextbaseexp(sd);
len = packet_len(0xb1);
break;
case SP_NEXTJOBEXP:
- WFIFOW(fd,0)=0xb1;
- WFIFOL(fd,4)=pc->nextjobexp(sd);
+ WFIFOW(fd, 0) = 0xb1;
+ WFIFOL(fd, 4) = (uint32)pc->nextjobexp(sd);
len = packet_len(0xb1);
break;
-
+#endif
/**
* SP_U<STAT> are used to update the amount of points necessary to increase that stat
**/
@@ -3183,7 +3219,9 @@ void clif_changelook(struct block_list *bl,int type,int val)
struct status_change* sc;
struct view_data* vd;
enum send_target target = AREA;
+#if PACKETVER >= 4
int val2 = 0;
+#endif
nullpo_retv(bl);
sd = BL_CAST(BL_PC, bl);
@@ -3307,17 +3345,22 @@ void clif_changelook(struct block_list *bl,int type,int val)
#if PACKETVER < 4
clif->sendlook(bl, bl->id, type, val, 0, target);
#else
- if(type == LOOK_WEAPON || type == LOOK_SHIELD) {
- nullpo_retv(vd);
- type = LOOK_WEAPON;
- val = vd->weapon;
- val2 = vd->shield;
- }
- if (clif->isdisguised(bl)) {
- clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS);
- clif->sendlook(bl, -bl->id, type, val, val2, SELF);
+ if (bl->type != BL_NPC) {
+ if(type == LOOK_WEAPON || type == LOOK_SHIELD) {
+ nullpo_retv(vd);
+ type = LOOK_WEAPON;
+ val = vd->weapon;
+ val2 = vd->shield;
+ }
+ if (clif->isdisguised(bl)) {
+ clif->sendlook(bl, bl->id, type, val, val2, AREA_WOS);
+ clif->sendlook(bl, -bl->id, type, val, val2, SELF);
+ } else {
+ clif->sendlook(bl, bl->id, type, val, val2, target);
+ }
} else {
- clif->sendlook(bl, bl->id, type, val, val2, target);
+ struct npc_data *nd = BL_UCAST(BL_NPC, bl);
+ npc->refresh(nd);
}
#endif
}
@@ -3527,7 +3570,7 @@ void clif_equipitemack(struct map_session_data *sd,int n,int pos,enum e_EQUIP_IT
p.wearLocation = pos;
#if PACKETVER >= 20100629
if (result == EIA_SUCCESS && sd->inventory_data[n]->equip&EQP_VISIBLE)
- p.wItemSpriteNumber = sd->inventory_data[n]->look;
+ p.wItemSpriteNumber = sd->inventory_data[n]->view_sprite;
else
p.wItemSpriteNumber = 0;
#endif
@@ -4309,8 +4352,8 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl) {
clif->specialeffect_single(bl,421,sd->fd);
if (tsd->bg_id != 0 && map->list[tsd->bl.m].flag.battleground)
clif->sendbgemblem_single(sd->fd,tsd);
- if (tsd->status.robe)
- clif->refreshlook(&sd->bl,bl->id,LOOK_ROBE,tsd->status.robe,SELF);
+ if (tsd->status.look.robe != 0)
+ clif->refreshlook(&sd->bl, bl->id, LOOK_ROBE, tsd->status.look.robe, SELF);
}
break;
case BL_MER: // Devotion Effects
@@ -6402,7 +6445,7 @@ void clif_vendinglist(struct map_session_data* sd, unsigned int id, struct s_ven
// [4144] date 20160921 not confirmend. Can be bigger or smaller
#if PACKETVER >= 20160921
WFIFOL(fd, offset + 47 + i * item_length) = pc->item_equippoint(sd, data);
- WFIFOW(fd, offset + 51 + i * item_length) = data->look;
+ WFIFOW(fd, offset + 51 + i * item_length) = data->view_sprite;
#endif
}
WFIFOSET(fd,WFIFOW(fd,2));
@@ -9449,8 +9492,8 @@ void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) {
// Character Looks
#if PACKETVER < 4
- clif->changelook(&sd->bl,LOOK_WEAPON,sd->status.weapon);
- clif->changelook(&sd->bl,LOOK_SHIELD,sd->status.shield);
+ clif->changelook(&sd->bl, LOOK_WEAPON, sd->status.look.weapon);
+ clif->changelook(&sd->bl, LOOK_SHIELD, sd->status.look.shield);
#else
clif->changelook(&sd->bl,LOOK_WEAPON,0);
#endif
@@ -14025,7 +14068,7 @@ void clif_parse_NoviceExplosionSpirits(int fd, struct map_session_data *sd)
/* it sends the request when the criteria doesn't match (and of course we let it fail) */
/* so restoring the old parse_globalmes method. */
if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) {
- unsigned int next = pc->nextbaseexp(sd);
+ uint64 next = pc->nextbaseexp(sd);
if( next == 0 ) next = pc->thisbaseexp(sd);
if( next ) {
int percent = (int)( ( (float)sd->status.base_exp/(float)next )*1000. );
@@ -16695,20 +16738,34 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat
/// exp type:
/// 0 = normal exp gain/loss
/// 1 = quest exp gain/loss
-void clif_displayexp(struct map_session_data *sd, unsigned int exp, char type, bool is_quest) {
+void clif_displayexp(struct map_session_data *sd, uint64 exp, char type, bool is_quest)
+{
int fd;
+// [4144] unconfirment exact version can be from 20170405 to 20170913
+#if PACKETVER >= 20170830
+ const int cmd = 0xacc;
+#else
+ const int cmd = 0x7f6;
+#endif
nullpo_retv(sd);
fd = sd->fd;
- WFIFOHEAD(fd, packet_len(0x7f6));
- WFIFOW(fd,0) = 0x7f6;
- WFIFOL(fd,2) = sd->bl.id;
- WFIFOL(fd,6) = exp;
- WFIFOW(fd,10) = type;
- WFIFOW(fd,12) = is_quest?1:0;// Normal exp is shown in yellow, quest exp is shown in purple.
- WFIFOSET(fd,packet_len(0x7f6));
+ WFIFOHEAD(fd, packet_len(cmd));
+ WFIFOW(fd, 0) = cmd;
+ WFIFOL(fd, 2) = sd->bl.id;
+// [4144] unconfirment exact version can be from 20170405 to 20170913
+#if PACKETVER >= 20170830
+ WFIFOQ(fd, 6) = exp;
+ WFIFOW(fd, 14) = type;
+ WFIFOW(fd, 16) = is_quest ? 1 : 0; // Normal exp is shown in yellow, quest exp is shown in purple.
+#else
+ WFIFOL(fd, 6) = (uint32)exp;
+ WFIFOW(fd, 10) = type;
+ WFIFOW(fd, 12) = is_quest ? 1 : 0; // Normal exp is shown in yellow, quest exp is shown in purple.
+#endif
+ WFIFOSET(fd, packet_len(cmd));
}
/// Displays digital clock digits on top of the screen (ZC_SHOWDIGIT).
@@ -19344,7 +19401,7 @@ void clif_parse_rodex_checkname(int fd, struct map_session_data *sd)
int char_id = 0, base_level = 0;
short class = 0;
char name[NAME_LENGTH];
-
+
safestrncpy(name, rPacket->Name, NAME_LENGTH);
rodex->check_player(sd, name, &base_level, &char_id, &class);
@@ -19431,8 +19488,9 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
packet = WFIFOP(fd, 0);
packet->PacketType = ((page_start == (VECTOR_LENGTH(sd->rodex.messages) - 1)) ? rodexmailList : rodexnextpage);
+#if PACKETVER < 20170419
packet->opentype = open_type;
-
+#endif
inner = WFIFOP(fd, size);
while (page_start >= 0 && count < RODEX_MAIL_PER_PAGE) {
@@ -19445,7 +19503,11 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
inner->MailID = msg->id;
inner->Isread = msg->is_read == true ? 1 : 0;
inner->type = msg->type;
+#if PACKETVER >= 20170419
+ inner->openType = msg->opentype;
+#else
inner->regDateTime = (int)time(NULL) - msg->send_date;
+#endif
inner->expireDateTime = msg->expire_date - (int)time(NULL);
if (open_type == RODEX_OPENTYPE_RETURN) {
inner->expireDateTime += RODEX_EXPIRE;
@@ -19463,12 +19525,80 @@ void clif_rodex_send_maillist(int fd, struct map_session_data *sd, int8 open_typ
}
packet->PacketLength = size;
+#if PACKETVER < 20170419
packet->cnt = count;
+#endif
packet->IsEnd = page_start > 0 ? 0 : 1;
WFIFOSET(fd, size);
#endif
}
+void clif_rodex_send_mails_all(int fd, struct map_session_data *sd)
+{
+#if PACKETVER >= 20170419
+ struct PACKET_ZC_MAIL_LIST *packet;
+ struct maillistinfo *inner;
+ int16 size = sizeof(*packet);
+ int packetMailCount = 0;
+ int mailListCount = 0;
+ int mailsSize = VECTOR_LENGTH(sd->rodex.messages);
+ int i;
+
+ nullpo_retv(sd);
+
+ WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
+ packet = WFIFOP(fd, 0);
+ packet->PacketType = rodexmailList;
+ inner = WFIFOP(fd, size);
+
+ i = mailsSize - 1;
+ while (i >= 0) {
+ struct rodex_message *msg = &VECTOR_INDEX(sd->rodex.messages, i);
+ --i;
+
+ if (msg->is_deleted)
+ continue;
+
+ inner->MailID = msg->id;
+ inner->Isread = msg->is_read == true ? 1 : 0;
+ inner->type = msg->type;
+ inner->openType = msg->opentype;
+ inner->expireDateTime = msg->expire_date - (int)time(NULL);
+ if (msg->opentype == RODEX_OPENTYPE_RETURN) {
+ inner->expireDateTime += RODEX_EXPIRE;
+ }
+ inner->Titlelength = (int16)strlen(msg->title) + 1;
+ if (msg->opentype != RODEX_OPENTYPE_RETURN) {
+ strncpy(inner->SenderName, msg->sender_name, sizeof(msg->sender_name));
+ } else {
+ strncpy(inner->SenderName, msg->receiver_name, sizeof(msg->receiver_name));
+ }
+ strncpy(inner->title, msg->title, inner->Titlelength);
+ size += sizeof(*inner) + inner->Titlelength;
+ inner = WFIFOP(fd, size);
+ packetMailCount ++;
+ mailListCount ++;
+ if (packetMailCount == RODEX_MAIL_PER_PAGE) {
+ packet->PacketLength = size;
+ packet->IsEnd = mailListCount > mailsSize ? 1 : 0;
+ WFIFOSET(fd, size);
+ WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
+ packet = WFIFOP(fd, 0);
+ packet->PacketType = rodexmailList;
+ size = sizeof(*packet);
+ inner = WFIFOP(fd, size);
+ packetMailCount = 0;
+ }
+ }
+
+ if (packetMailCount > 0 || mailListCount == 0) {
+ packet->PacketLength = size;
+ packet->IsEnd = 1;
+ WFIFOSET(fd, size);
+ }
+#endif
+}
+
void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type, int count)
{
#if PACKETVER >= 20131218
@@ -19482,8 +19612,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
WFIFOHEAD(fd, sizeof(*packet) + (sizeof(*inner) + RODEX_TITLE_LENGTH) * RODEX_MAIL_PER_PAGE);
packet = WFIFOP(fd, 0);
packet->PacketType = rodexmailList;
+#if PACKETVER < 20170419
packet->opentype = open_type;
-
+#endif
inner = WFIFOP(fd, size);
i = VECTOR_LENGTH(sd->rodex.messages) - 1;
@@ -19498,7 +19629,11 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
inner->MailID = msg->id;
inner->Isread = msg->is_read == true ? 1 : 0;
inner->type = msg->type;
+#if PACKETVER >= 20170419
+ inner->openType = msg->opentype;
+#else
inner->regDateTime = (int)time(NULL) - msg->send_date;
+#endif
inner->expireDateTime = msg->expire_date - (int)time(NULL);
if (open_type == RODEX_OPENTYPE_RETURN) {
inner->expireDateTime += RODEX_EXPIRE;
@@ -19516,7 +19651,9 @@ void clif_rodex_send_refresh(int fd, struct map_session_data *sd, int8 open_type
}
packet->PacketLength = size;
+#if PACKETVER < 20170419
packet->cnt = count;
+#endif
packet->IsEnd = 1;
WFIFOSET(fd, size);
#endif
@@ -19547,7 +19684,7 @@ void clif_rodex_read_mail(struct map_session_data *sd, int8 opentype, struct rod
nullpo_retv(sd);
nullpo_retv(msg);
-
+
fd = sd->fd;
body_len = (int)strlen(msg->body) + 1;
size = sizeof(*sPacket);
@@ -19624,7 +19761,7 @@ void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd) __attrib
void clif_parse_rodex_request_zeny(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_ZENY_FROM_MAIL *rPacket = RFIFOP(fd, 0);
-
+
rodex->get_zeny(sd, rPacket->opentype, rPacket->MailID);
}
@@ -19665,7 +19802,7 @@ void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64
nullpo_retv(sd);
fd = sd->fd;
-
+
WFIFOHEAD(fd, sizeof(*sPacket));
sPacket = WFIFOP(fd, 0);
sPacket->PacketType = rodexgetitem;
@@ -19679,7 +19816,7 @@ void clif_rodex_request_items(struct map_session_data *sd, int8 opentype, int64
void clif_rodex_icon(int fd, bool show)
{
// packet add date is 20140716, but from players reports it wrong. Using closer known correct version.
-#if PACKETVER >= 20150513
+#if PACKETVER >= 20141112
WFIFOHEAD(fd, 3);
WFIFOW(fd, 0) = rodexicon;
WFIFOB(fd, 2) = (show == true ? 1 : 0);
@@ -19691,14 +19828,22 @@ void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd) __at
void clif_parse_rodex_refresh_maillist(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_REFRESH_MAIL_LIST *packet = RFIFOP(fd, 0);
+#if PACKETVER >= 20170419
+ rodex->refresh(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID);
+#else
rodex->refresh(sd, packet->opentype, packet->Upper_MailID);
+#endif
}
void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd) __attribute__((nonnull(2)));
void clif_parse_rodex_open_mailbox(int fd, struct map_session_data *sd)
{
const struct PACKET_CZ_REQ_OPEN_MAIL *packet = RFIFOP(fd, 0);
- rodex->open(sd, packet->opentype);
+#if PACKETVER >= 20170419
+ rodex->open(sd, RODEX_OPENTYPE_UNSET, packet->Upper_MailID);
+#else
+ rodex->open(sd, packet->opentype, packet->Upper_MailID);
+#endif
rodex->clean(sd, 1);
}
@@ -19926,9 +20071,10 @@ void packetdb_loaddb(void) {
memset(packet_db,0,sizeof(packet_db));
#define packet(id, size, ...) packetdb_addpacket((id), (size), ##__VA_ARGS__, 0xFFFF)
-#define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0)
#include "packets.h" /* load structure data */
#undef packet
+#define packetKeys(a,b,c) do { clif->cryptKey[0] = (a); clif->cryptKey[1] = (b); clif->cryptKey[2] = (c); } while(0)
+#include "packets_keys.h"
#undef packetKeys
}
void clif_bc_ready(void) {
@@ -20782,4 +20928,5 @@ void clif_defaults(void) {
clif->pRodexRequestItems = clif_parse_rodex_request_items;
clif->rodex_request_items = clif_rodex_request_items;
clif->rodex_icon = clif_rodex_icon;
+ clif->rodex_send_mails_all = clif_rodex_send_mails_all;
}