浏览代码

Threshold for blacksmith refine fame points (#4409)

* Made refine threshold for giving Blacksmith ranking point configurable. Fixes #4408
Jittapan Pluemsumran 5 年之前
父节点
当前提交
3a7b832906
共有 4 个文件被更改,包括 5 次插入1 次删除
  1. 2 0
      conf/battle/player.conf
  2. 1 0
      src/map/battle.cpp
  3. 1 0
      src/map/battle.hpp
  4. 1 1
      src/map/script.cpp

+ 2 - 0
conf/battle/player.conf

@@ -247,6 +247,8 @@ fame_refine_lv2: 25
 fame_refine_lv3: 1000
 // Success to forge a lv3 weapon with 3 additional ingredients
 fame_forge: 10
+// Refine threshold for giving point for refining forged weapon to +10
+blacksmith_fame_refine_threshold: 10
 // Success to prepare 'n' Condensed Potions in a row
 fame_pharmacy_3: 1
 fame_pharmacy_5: 3

+ 1 - 0
src/map/battle.cpp

@@ -8561,6 +8561,7 @@ static const struct _battle_data {
 	{ "min_shop_sell",                      &battle_config.min_shop_sell,                   0,      0,      INT_MAX,        },
 	{ "feature.equipswitch",                &battle_config.feature_equipswitch,             1,      0,      1,              },
 	{ "pet_walk_speed",                     &battle_config.pet_walk_speed,                  1,      1,      3,              },
+	{ "blacksmith_fame_refine_threshold",   &battle_config.blacksmith_fame_refine_threshold,10,     1,      MAX_REFINE,     },
 
 #include "../custom/battle_config_init.inc"
 };

+ 1 - 0
src/map/battle.hpp

@@ -658,6 +658,7 @@ struct Battle_Config
 	int min_shop_sell;
 	int feature_equipswitch;
 	int pet_walk_speed;
+	int blacksmith_fame_refine_threshold;
 
 #include "../custom/battle_config_struct.inc"
 };

+ 1 - 1
src/map/script.cpp

@@ -9085,7 +9085,7 @@ BUILDIN_FUNC(successrefitem) {
 		pc_equipitem(sd,i,ep);
 		clif_misceffect(&sd->bl,3);
 		achievement_update_objective(sd, AG_REFINE_SUCCESS, 2, sd->inventory_data[i]->wlv, sd->inventory.u.items_inventory[i].refine);
-		if (sd->inventory.u.items_inventory[i].refine == MAX_REFINE &&
+		if (sd->inventory.u.items_inventory[i].refine == battle_config.blacksmith_fame_refine_threshold &&
 			sd->inventory.u.items_inventory[i].card[0] == CARD0_FORGE &&
 			sd->status.char_id == (int)MakeDWord(sd->inventory.u.items_inventory[i].card[2],sd->inventory.u.items_inventory[i].card[3]))
 		{ // Fame point system [DracoRPG]