Prechádzať zdrojové kódy

Fixed bodystyle for unsupported jobs (#4792)

Adds missing checks for Super Novice Expanded, Star Emperor and Soul Reaper.

Enables bodystyles saving by default, since all sprites have been released officially long enough.

Adjusted the mismatching default value for max_body_style.

Fixes #4787

Thanks to @reunite-ro
Lemongrass3110 5 rokov pred
rodič
commit
f79cac8509
4 zmenil súbory, kde vykonal 4 pridanie a 8 odobranie
  1. 1 3
      conf/battle/client.conf
  2. 1 1
      src/map/atcommand.cpp
  3. 2 2
      src/map/battle.cpp
  4. 0 2
      src/map/pc.cpp

+ 1 - 3
conf/battle/client.conf

@@ -71,9 +71,7 @@ wedding_modifydisplay: no
 save_clothcolor: yes
 
 // Save body styles. (Note 1)
-// Note: Don't turn this on unless you know what you are doing.
-// Sprites are not released officially.
-save_body_style: no
+save_body_style: yes
 
 // Do not display cloth colors for the wedding class?
 // Note: Both save_clothcolor and wedding_modifydisplay have to be enabled

+ 1 - 1
src/map/atcommand.cpp

@@ -1830,7 +1830,7 @@ ACMD_FUNC(bodystyle)
 
 	memset(atcmd_output, '\0', sizeof(atcmd_output));
 
-	if (!(sd->class_&JOBL_THIRD)) {
+	if (!(sd->class_ & JOBL_THIRD) || (sd->class_ & MAPID_THIRDMASK) == MAPID_SUPER_NOVICE_E || (sd->class_ & MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || (sd->class_ & MAPID_THIRDMASK) == MAPID_SOUL_REAPER) {
 		clif_displaymessage(fd, msg_txt(sd,740));	// This job has no alternate body styles.
 		return -1;
 	}

+ 2 - 2
src/map/battle.cpp

@@ -8827,8 +8827,8 @@ static const struct _battle_data {
 	{ "feature.roulette",                   &battle_config.feature_roulette,                1,      0,      1,              },
 	{ "monster_hp_bars_info",               &battle_config.monster_hp_bars_info,            1,      0,      1,              },
 	{ "min_body_style",                     &battle_config.min_body_style,                  0,      0,      SHRT_MAX,       },
-	{ "max_body_style",                     &battle_config.max_body_style,                  4,      0,      SHRT_MAX,       },
-	{ "save_body_style",                    &battle_config.save_body_style,                 0,      0,      1,              },
+	{ "max_body_style",                     &battle_config.max_body_style,                  1,      0,      SHRT_MAX,       },
+	{ "save_body_style",                    &battle_config.save_body_style,                 1,      0,      1,              },
 	{ "monster_eye_range_bonus",            &battle_config.mob_eye_range_bonus,             0,      0,      10,             },
 	{ "monster_stuck_warning",              &battle_config.mob_stuck_warning,               0,      0,      1,              },
 	{ "skill_eightpath_algorithm",          &battle_config.skill_eightpath_algorithm,       1,      0,      1,              },

+ 0 - 2
src/map/pc.cpp

@@ -878,8 +878,6 @@ void pc_makesavestatus(struct map_session_data *sd) {
 	if(!battle_config.save_clothcolor)
 		sd->status.clothes_color = 0;
 
-	// Since this is currently not officially released,
-	// its best to have a forced option to not save body styles.
 	if(!battle_config.save_body_style)
 		sd->status.body = 0;