Ver código fonte

Expanded VIP Gemstone configuration (fixes #1975)
* Expanded the VIP Gemstone configuration so it has the following options:
- 0 = Disabled
- 1 = Behave like Mistress Card
- 2 = Remove all gemstone requirements (default)

aleos 8 anos atrás
pai
commit
251c40061b
3 arquivos alterados com 12 adições e 6 exclusões
  1. 5 3
      conf/battle/player.conf
  2. 1 1
      src/map/battle.c
  3. 6 2
      src/map/status.c

+ 5 - 3
conf/battle/player.conf

@@ -213,10 +213,12 @@ vip_bm_increase: 2
 // Default: 50
 vip_drop_increase: 50
 
-// Gemstone requirement. Setting to false will disable.
+// Gemstone requirement.
 // Can the VIP Group ignore Gemstone requirement for skills?
-// Default: yes
-vip_gemstone: yes
+// 0 = Disable
+// 1 = Behave like Mistress Card
+// 2 = Remove all gemstone requirements (default)
+vip_gemstone: 2
 
 // Will display rate information (EXP, Drop, and Death penalty message)? (Note 1)
 vip_disp_rate: yes

+ 1 - 1
src/map/battle.c

@@ -8329,7 +8329,7 @@ static const struct _battle_data {
 	{ "vip_zeny_penalty",                   &battle_config.vip_zeny_penalty,                0,      0,      INT_MAX,        },
 	{ "vip_bm_increase",                    &battle_config.vip_bm_increase,                 0,      0,      INT_MAX,        },
 	{ "vip_drop_increase",                  &battle_config.vip_drop_increase,               0,      0,      INT_MAX,        },
-	{ "vip_gemstone",                       &battle_config.vip_gemstone,                    0,      0,      1,              },
+	{ "vip_gemstone",                       &battle_config.vip_gemstone,                    0,      0,      2,              },
 	{ "vip_disp_rate",                      &battle_config.vip_disp_rate,                   1,      0,      1,              },
 	{ "mon_trans_disable_in_gvg",           &battle_config.mon_trans_disable_in_gvg,        0,      0,      1,              },
 	{ "homunculus_S_growth_level",          &battle_config.hom_S_growth_level,             99,      0,      MAX_LEVEL,      },

+ 6 - 2
src/map/status.c

@@ -3332,8 +3332,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
 	memset(&sd->special_state,0,sizeof(sd->special_state));
 
 	// Magic Stone requirement avoidance for VIP.
-	if (pc_isvip(sd) && battle_config.vip_gemstone)
-		sd->special_state.no_gemstone = 2;
+	if (pc_isvip(sd)) {
+		if (battle_config.vip_gemstone == 1)
+			sd->special_state.no_gemstone = 1;
+		else if (battle_config.vip_gemstone == 2)
+			sd->special_state.no_gemstone = 2;
+	}
 
 	if (!sd->state.permanent_speed) {
 		memset(&base_status->max_hp, 0, sizeof(struct status_data)-(sizeof(base_status->hp)+sizeof(base_status->sp)));