diff options
-rw-r--r-- | conf/map/battle/client.conf | 7 | ||||
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 15 |
4 files changed, 20 insertions, 4 deletions
diff --git a/conf/map/battle/client.conf b/conf/map/battle/client.conf index 722019fa7..f080e8375 100644 --- a/conf/map/battle/client.conf +++ b/conf/map/battle/client.conf @@ -228,3 +228,10 @@ display_rate_messages: 0x1 // // Default: 0x1F1 (Official behavior.) display_config_messages: 0x1F1 + +// When to display the overweight messages? +// 0x0 - Never display overweight messages. +// 0x1 - Display overweight messages upon login. (Default.) +// 0x2 - Display overweight messages upon map change. (Default.) +// Default: 0x3 (Official behavior.) +display_overweight_messages: 0x3 diff --git a/src/map/battle.c b/src/map/battle.c index e8d8e581f..0ef9c66e8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7434,6 +7434,7 @@ static const struct battle_data { { "drop_connection_on_quit", &battle_config.drop_connection_on_quit, 0, 0, 1, }, { "display_rate_messages", &battle_config.display_rate_messages, 1, 0, 7, }, { "display_config_messages", &battle_config.display_config_messages, 0x1F1, 0, 0x1F7, }, + { "display_overweight_messages", &battle_config.display_overweight_messages, 3, 0, 3, }, { "features/enable_refinery_ui", &battle_config.enable_refinery_ui, 1, 0, 1, }, { "features/replace_refine_npcs", &battle_config.replace_refine_npcs, 1, 0, 1, }, { "batk_min_limit", &battle_config.batk_min, 0, 0, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index ceb94321e..19cfd2748 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -593,6 +593,7 @@ struct Battle_Config { int drop_connection_on_quit; int display_rate_messages; int display_config_messages; + int display_overweight_messages; int enable_refinery_ui; int replace_refine_npcs; diff --git a/src/map/clif.c b/src/map/clif.c index f7f22f7b0..517b03add 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10787,10 +10787,6 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) // Check for and delete unavailable/disabled items. pc->checkitem(sd); - // Send the character's weight to the client. - clif->updatestatus(sd, SP_WEIGHT); - clif->updatestatus(sd, SP_MAXWEIGHT); - // Send character's guild info to the client. Call this before clif->spawn() to show guild emblems correctly. if (sd->status.guild_id != 0) guild->send_memberinfoshort(sd, 1); @@ -10819,6 +10815,17 @@ static void clif_parse_LoadEndAck(int fd, struct map_session_data *sd) map->addblock(&sd->bl); // Add the character to the map. clif->spawn(&sd->bl); // Spawn character client side. + if (((battle_config.display_overweight_messages & 0x1) != 0 && sd->state.connect_new != 0) + || ((battle_config.display_overweight_messages & 0x2) != 0 && sd->state.connect_new == 0 && sd->state.changemap != 0)) { + // Send the character's weight to the client. (With displaying overweight messages.) + clif->updatestatus(sd, SP_MAXWEIGHT); + clif->updatestatus(sd, SP_WEIGHT); + } else { + // Send the character's weight to the client. (Without displaying overweight messages.) + clif->updatestatus(sd, SP_WEIGHT); + clif->updatestatus(sd, SP_MAXWEIGHT); + } + struct party_data *p = NULL; if (sd->status.party_id != 0) |