Apply suggestions from code review

Co-authored-by: Pokye <98105181+Pokye@users.noreply.github.com>
This commit is contained in:
Lemongrass3110 2023-12-29 11:25:29 +01:00 committed by GitHub
parent 91ecd7bdc8
commit 9d8e7f47d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 25 deletions

View File

@ -25168,11 +25168,11 @@ void clif_goldpc_info( map_session_data& sd ){
struct PACKET_ZC_GOLDPCCAFE_POINT p = {};
p.packetType = HEADER_ZC_GOLDPCCAFE_POINT;
p.active = true;
p.isActive = true;
if( battle_config.feature_goldpc_vip && pc_isvip( &sd ) ){
p.unitPoint = 2;
p.mode = 2;
}else{
p.unitPoint = 1;
p.mode = 1;
}
p.point = (int32)pc_readparam( &sd, SP_GOLDPC_POINTS );
if( sd.goldpc_tid != INVALID_TIMER ){
@ -25185,12 +25185,12 @@ void clif_goldpc_info( map_session_data& sd ){
// Always round up to full second
remaining += ( remaining % 1000 );
p.accumulatePlaySecond = (int32)( client_max_seconds - ( remaining / 1000 ) );
p.playedTime = (int32)( client_max_seconds - ( remaining / 1000 ) );
}else{
p.accumulatePlaySecond = 0;
p.playedTime = 0;
}
}else{
p.accumulatePlaySecond = client_max_seconds;
p.playedTime = client_max_seconds;
}
clif_send( &p, sizeof( p ), &sd.bl, SELF );

View File

@ -475,23 +475,6 @@ struct PACKET_ZC_ACK_SE_CASH_ITEM_LIST2{
struct PACKET_ZC_ACK_SE_CASH_ITEM_LIST2_sub items[];
} __attribute__((packed));
#if PACKETVER_MAIN_NUM >= 20140508 || PACKETVER_RE_NUM >= 20140508 || defined(PACKETVER_ZERO)
struct PACKET_ZC_GOLDPCCAFE_POINT{
int16 packetType;
int8 active;
int8 unitPoint;
int32 point;
int32 accumulatePlaySecond;
} __attribute__((packed));
#elif PACKETVER_MAIN_NUM >= 20140430 || PACKETVER_RE_NUM >= 20140430
// TODO: find difference (1byte) priority low...
#endif
struct PACKET_CZ_DYNAMICNPC_CREATE_REQUEST{
int16 packetType;
char nickname[NAME_LENGTH];
} __attribute__((packed));
// NetBSD 5 and Solaris don't like pragma pack but accept the packed attribute
#if !defined( sun ) && ( !defined( __NETBSD__ ) || __NetBSD_Version__ >= 600000000 )
#pragma pack( pop )
@ -547,8 +530,6 @@ DEFINE_PACKET_HEADER(ZC_ACK_OPEN_BANKING, 0x9b7)
DEFINE_PACKET_HEADER(ZC_ACK_CLOSE_BANKING, 0x9b9)
DEFINE_PACKET_HEADER(ZC_ACK_COUNT_BARGAIN_SALE_ITEM, 0x9c4)
DEFINE_PACKET_HEADER(ZC_ACK_GUILDSTORAGE_LOG, 0x9da)
DEFINE_PACKET_HEADER(ZC_GOLDPCCAFE_POINT, 0xa15)
DEFINE_PACKET_HEADER(CZ_DYNAMICNPC_CREATE_REQUEST, 0xa16)
DEFINE_PACKET_HEADER(ZC_DYNAMICNPC_CREATE_RESULT, 0xa17)
DEFINE_PACKET_HEADER(CZ_REQ_APPLY_BARGAIN_SALE_ITEM2, 0xa3d)
DEFINE_PACKET_HEADER(CZ_REQ_STYLE_CHANGE, 0xa46)