Implemented the new unequip all button (#7955)

With this button you can also unequip all costumes now.
Also the button will now unequip your arrows.

Thanks to @Dia and @Pokye
This commit is contained in:
Lemongrass3110 2023-10-05 01:12:49 +02:00 committed by GitHub
parent 5b2f4e63a7
commit f5889b08ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View File

@ -22512,8 +22512,18 @@ void clif_parse_unequipall( int fd, map_session_data* sd ){
return;
}
for( int i = 0; i < EQI_COSTUME_HEAD_TOP; i++ ){
if( sd->equip_index[i] >= 0 ){
struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL* p = (struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL*)RFIFOP( fd, 0 );
#if PACKETVER_MAIN_NUM >= 20230906
uint32 location = p->location;
int max = EQI_MAX;
#else
uint32 location = 0xFFFFFFFF;
int max = EQI_COSTUME_HEAD_TOP;
#endif
for( int i = 0; i < max; i++ ){
if( sd->equip_index[i] >= 0 && ( location & equip_bitmask[i] ) != 0 ){
pc_unequipitem( sd, sd->equip_index[i], 1 );
}
}

View File

@ -5251,7 +5251,13 @@ struct PACKET_ZC_DELETE_MEMBER_FROM_GROUP {
} __attribute__((packed));
DEFINE_PACKET_HEADER(ZC_DELETE_MEMBER_FROM_GROUP, 0x0105);
#if PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818
#if PACKETVER_MAIN_NUM >= 20230906
struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL {
int16 PacketType;
uint32 location;
} __attribute__((packed));
DEFINE_PACKET_HEADER(CZ_REQ_TAKEOFF_EQUIP_ALL, 0x0bf5);
#elif PACKETVER_MAIN_NUM >= 20210818 || PACKETVER_RE_NUM >= 20211103 || PACKETVER_ZERO_NUM >= 20210818
struct PACKET_CZ_REQ_TAKEOFF_EQUIP_ALL {
int16 PacketType;
} __attribute__((packed));