@@ -1799,8 +1799,13 @@ void clif_hominfo( struct map_session_data *sd, struct homun_data *hd, int flag
|
||||
p.sp = status->sp;
|
||||
p.maxSp = status->max_sp;
|
||||
}
|
||||
#if PACKETVER_MAIN_NUM >= 20210303 || PACKETVER_RE_NUM >= 20211103
|
||||
p.exp = hd->homunculus.exp;
|
||||
p.expNext = hd->exp_next;
|
||||
#else
|
||||
p.exp = (uint32)hd->homunculus.exp;
|
||||
p.expNext = (uint32)hd->exp_next;
|
||||
#endif
|
||||
switch( hom_class2type( hd->homunculus.class_ ) ){
|
||||
case HT_REG:
|
||||
case HT_EVO:
|
||||
@@ -2175,7 +2180,7 @@ void clif_buylist( struct map_session_data *sd, struct npc_data *nd ){
|
||||
uint16 len = sizeof( struct PACKET_ZC_PC_PURCHASE_ITEMLIST ) + nd->u.shop.count * sizeof( struct PACKET_ZC_PC_PURCHASE_ITEMLIST_sub );
|
||||
WFIFOHEAD( fd, len );
|
||||
struct PACKET_ZC_PC_PURCHASE_ITEMLIST *p = (struct PACKET_ZC_PC_PURCHASE_ITEMLIST *)WFIFOP( fd, 0 );
|
||||
p->packetType = 0xc6;
|
||||
p->packetType = HEADER_ZC_PC_PURCHASE_ITEMLIST;
|
||||
|
||||
int count = 0;
|
||||
for( int i = 0, discount = npc_shop_discount( nd ); i < nd->u.shop.count; i++ ){
|
||||
@@ -2185,6 +2190,12 @@ void clif_buylist( struct map_session_data *sd, struct npc_data *nd ){
|
||||
p->items[count].discountPrice = ( discount ) ? pc_modifybuyvalue( sd, val ) : val;
|
||||
p->items[count].itemType = itemtype( nd->u.shop.shop_item[i].nameid );
|
||||
p->items[count].itemId = client_nameid( nd->u.shop.shop_item[i].nameid );
|
||||
#if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103
|
||||
struct item_data* id = itemdb_exists( nd->u.shop.shop_item[i].nameid );
|
||||
|
||||
p->items[count].viewSprite = id->look;
|
||||
p->items[count].location = pc_equippoint_sub( sd, id );
|
||||
#endif
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -2277,6 +2288,9 @@ void clif_npc_market_open(struct map_session_data *sd, struct npc_data *nd) {
|
||||
p->list[count].price = item->value;
|
||||
p->list[count].qty = item->qty;
|
||||
p->list[count].weight = id->weight;
|
||||
#if PACKETVER_MAIN_NUM >= 20210203 || PACKETVER_RE_NUM >= 20211103
|
||||
p->list[count].location = pc_equippoint_sub( sd, id );
|
||||
#endif
|
||||
count++;
|
||||
}
|
||||
|
||||
@@ -16352,15 +16366,22 @@ void clif_Mail_Receiver_Ack( struct map_session_data* sd, uint32 char_id, short
|
||||
/// Request information about the recipient
|
||||
/// 0a13 <name>.24B (CZ_CHECK_RECEIVE_CHARACTER_NAME)
|
||||
void clif_parse_Mail_Receiver_Check(int fd, struct map_session_data *sd) {
|
||||
#if PACKETVER >= 20140423
|
||||
#if PACKETVER_MAIN_NUM >= 20201104 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20201118
|
||||
struct PACKET_CZ_CHECKNAME2* p = (struct PACKET_CZ_CHECKNAME2*)RFIFOP( fd, 0 );
|
||||
#else
|
||||
struct PACKET_CZ_CHECKNAME1* p = (struct PACKET_CZ_CHECKNAME1*)RFIFOP( fd, 0 );
|
||||
#endif
|
||||
static char name[NAME_LENGTH];
|
||||
|
||||
if( mail_invalid_operation( sd ) ){
|
||||
return;
|
||||
}
|
||||
|
||||
safestrncpy(name, RFIFOCP(fd, 2), NAME_LENGTH);
|
||||
safestrncpy(name, p->Name, NAME_LENGTH);
|
||||
|
||||
intif_mail_checkreceiver(sd, name);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// Request to receive mail's attachment.
|
||||
@@ -16518,7 +16539,18 @@ void clif_parse_Mail_delete(int fd, struct map_session_data *sd){
|
||||
/// Request to return a mail (CZ_REQ_MAIL_RETURN).
|
||||
/// 0273 <mail id>.L <receive name>.24B
|
||||
void clif_parse_Mail_return(int fd, struct map_session_data *sd){
|
||||
#if PACKETVER_MAIN_NUM >= 20201104 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20201118
|
||||
struct PACKET_CZ_UNCONFIRMED_RODEX_RETURN* p = (struct PACKET_CZ_UNCONFIRMED_RODEX_RETURN*)RFIFOP( fd, 0 );
|
||||
|
||||
//ShowDump( p, sizeof( p ) );
|
||||
|
||||
int mail_id = p->msgId;
|
||||
|
||||
// not supported for now
|
||||
return;
|
||||
#else
|
||||
int mail_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
|
||||
#endif
|
||||
//char *rec_name = RFIFOP(fd,packet_db[RFIFOW(fd,0)].pos[1]);
|
||||
int i;
|
||||
|
||||
@@ -22304,6 +22336,34 @@ void clif_parse_refineui_refine( int fd, struct map_session_data* sd ){
|
||||
#endif
|
||||
}
|
||||
|
||||
void clif_unequipall_reply( struct map_session_data* sd, bool failed ){
|
||||
#if PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103
|
||||
struct PACKET_ZC_TAKEOFF_EQUIP_ALL_ACK p = {};
|
||||
|
||||
p.PacketType = HEADER_ZC_TAKEOFF_EQUIP_ALL_ACK;
|
||||
p.result = failed;
|
||||
|
||||
clif_send( &p, sizeof( struct PACKET_ZC_TAKEOFF_EQUIP_ALL_ACK ), &sd->bl, SELF );
|
||||
#endif // PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103
|
||||
}
|
||||
|
||||
void clif_parse_unequipall( int fd, struct map_session_data* sd ){
|
||||
#if PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818
|
||||
if( pc_cant_act( sd ) ){
|
||||
clif_unequipall_reply( sd, true );
|
||||
return;
|
||||
}
|
||||
|
||||
for( int i = 0; i < EQI_COSTUME_HEAD_TOP; i++ ){
|
||||
if( sd->equip_index[i] >= 0 ){
|
||||
pc_unequipitem( sd, sd->equip_index[i], 1 );
|
||||
}
|
||||
}
|
||||
|
||||
clif_unequipall_reply( sd, false );
|
||||
#endif
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
* Main client packet processing function
|
||||
*------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user