diff --git a/src/map/chrif.c b/src/map/chrif.c index d371ca31f2..314ba7a1e9 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -844,12 +844,12 @@ int chrif_req_login_operation(int aid, const char* character_name, unsigned shor int chrif_changesex(struct map_session_data *sd) { chrif_check(-1); - WFIFOHEAD(char_fd,36); + WFIFOHEAD(char_fd,44); WFIFOW(char_fd,0) = 0x2b0e; WFIFOL(char_fd,2) = sd->status.account_id; safestrncpy((char*)WFIFOP(char_fd,6), sd->status.name, NAME_LENGTH); WFIFOW(char_fd,30) = 5; - WFIFOSET(char_fd,36); + WFIFOSET(char_fd,44); clif_displaymessage(sd->fd, msg_txt(sd,408)); //"Need disconnection to perform change-sex request..." @@ -894,16 +894,14 @@ static void chrif_ack_login_req(int aid, const char* player_name, uint16 type, u snprintf(action,25,"???"); switch( answer ) { - case 0 : if(battle_config.feature_banking) sprintf(output, msg_txt(sd,424), action, NAME_LENGTH, player_name); else output[0] = '\0'; break; //%s has been asked to %s the player '%.*s'. + case 0 : sprintf(output, msg_txt(sd,424), action, NAME_LENGTH, player_name); break; //%s has been asked to %s the player '%.*s'. case 1 : sprintf(output, msg_txt(sd,425), NAME_LENGTH, player_name); break; case 2 : sprintf(output, msg_txt(sd,426), action, NAME_LENGTH, player_name); break; case 3 : sprintf(output, msg_txt(sd,427), action, NAME_LENGTH, player_name); break; - case 4 : if(battle_config.feature_banking) sprintf(output, msg_txt(sd,424), action, NAME_LENGTH, player_name); else output[0] = '\0'; break; + case 4 : sprintf(output, msg_txt(sd,424), action, NAME_LENGTH, player_name); break; default: output[0] = '\0'; break; } - - if (output) - clif_displaymessage(sd->fd, output); + clif_displaymessage(sd->fd, output); } /*========================================== diff --git a/src/map/npc.c b/src/map/npc.c index f2f75d0d2e..83131b3042 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1771,7 +1771,8 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list) nullpo_retr(1, sd); nullpo_retr(1, item_list); - if( ( nd = npc_checknear(sd, map_id2bl(sd->npc_shopid)) ) == NULL || nd->subtype != SHOP && nd->subtype != ITEMSHOP && nd->subtype != POINTSHOP ) + if( ( nd = npc_checknear(sd, map_id2bl(sd->npc_shopid)) ) == NULL + || ( nd->subtype != SHOP && nd->subtype != ITEMSHOP && nd->subtype != POINTSHOP ) ) { return 1; } diff --git a/src/map/pc.c b/src/map/pc.c index ec8845b252..9e13cddd43 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1276,7 +1276,8 @@ int pc_reg_received(struct map_session_data *sd) chrif_skillcooldown_request(sd->status.account_id, sd->status.char_id); chrif_bsdata_request(sd->status.char_id); sd->storage_size = MIN_STORAGE; //default to min - chrif_req_login_operation(sd->status.account_id, sd->status.name, 7, 0, 1, 0); //request Bank data + if(battle_config.feature_banking) + chrif_req_login_operation(sd->status.account_id, sd->status.name, 7, 0, 1, 0); //request Bank data #ifdef VIP_ENABLE sd->vip.time = 0; sd->vip.enabled = 0; diff --git a/src/map/script.c b/src/map/script.c index 98a3014230..14d281ce63 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8847,6 +8847,7 @@ BUILDIN_FUNC(guildchangegm) /*========================================== * Spawn a monster : + * *monster "",,,"",,{,"",,}; @mapn,x,y : location @str : monster name @class_ : mob_id @@ -8867,6 +8868,7 @@ BUILDIN_FUNC(monster) struct map_session_data* sd; int16 m; + int i; if (script_hasdata(st, 8)) { event = script_getstr(st, 8); @@ -8901,7 +8903,10 @@ BUILDIN_FUNC(monster) else m = map_mapname2mapid(mapn); - mob_once_spawn(sd, m, x, y, str, class_, amount, event, size, ai); + for(i=0; i