Merge branch 'master' into hotfix/vanilmirth_skills

This commit is contained in:
Daegaladh 2024-09-18 12:55:34 +02:00 committed by GitHub
commit 4c5ad8d667
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 21 additions and 16 deletions

View File

@ -309,8 +309,10 @@ int chclif_parse_pincode_setnew( int fd, struct char_session_data* sd ){
if( charserv_config.pincode_config.pincode_enabled==0 || RFIFOL(fd,2) != sd->account_id ) {
set_eof(fd);
return 1;
}
else {
} else if (strnlen(sd->pincode, PINCODE_LENGTH) > 0) {
set_eof(fd);
return 1;
} else {
char newpin[PINCODE_LENGTH+1];
memset(newpin,0,PINCODE_LENGTH+1);
strncpy( newpin, RFIFOCP(fd,6), PINCODE_LENGTH );
@ -561,7 +563,7 @@ int chclif_parse_char_delete2_req(int fd, struct char_session_data* sd) {
chclif_char_delete2_ack(fd, char_id, 5, 0);
return 1;
}
// success
delete_date = time(nullptr)+(charserv_config.char_config.char_del_delay);
@ -985,7 +987,7 @@ void chclif_accessible_maps( int fd ){
}else{
p->maps[count].status = 0;
}
mapindex_getmapname_ext( accessible_map.map, p->maps[count].map );
p->packetLength += sizeof( p->maps[0] );
@ -1527,7 +1529,7 @@ void chclif_reject(int fd, uint8 errCode){
int chclif_parse_reqcaptcha(int fd){
//FIFOSD_CHECK(8)
RFIFOSKIP(fd,8);
chclif_ack_captcha(fd);
chclif_ack_captcha(fd);
return 1;
}

View File

@ -8871,13 +8871,14 @@ static void clif_guild_positioninfolist(map_session_data& sd){
for(size_t i=0;i<MAX_GUILDPOSITION;i++){
guild_position& gp = g->guild.position[i];
PACKET_ZC_POSITION_INFO_sub& position = p->posInfo[i];
p->posInfo[i].positionID = i;
p->posInfo[i].right = gp.mode;
p->posInfo[i].ranking = i;
p->posInfo[i].payRate = gp.exp_mode;
position.positionID = static_cast<decltype(position.positionID)>( i );
position.right = gp.mode;
position.ranking = static_cast<decltype(position.ranking)>( i );
position.payRate = gp.exp_mode;
p->PacketLength += static_cast<decltype(p->PacketLength)>( sizeof( p->posInfo[0] ) );
p->PacketLength += static_cast<decltype(p->PacketLength)>( sizeof( position ) );
}
clif_send(p,p->PacketLength,&sd.bl,SELF);

View File

@ -4998,15 +4998,17 @@ struct PACKET_ZC_POSITION_ID_NAME_INFO {
} __attribute__((packed));
DEFINE_PACKET_HEADER(ZC_POSITION_ID_NAME_INFO, 0x0166);
struct PACKET_ZC_POSITION_INFO_sub {
int positionID;
int right;
int ranking;
int payRate;
} __attribute__((packed));
struct PACKET_ZC_POSITION_INFO {
int16 PacketType;
int16 PacketLength;
struct {
int positionID;
int right;
int ranking;
int payRate;
} posInfo[MAX_GUILDPOSITION];
struct PACKET_ZC_POSITION_INFO_sub posInfo[];
} __attribute__((packed));
DEFINE_PACKET_HEADER(ZC_POSITION_INFO, 0x0160);