Added finding_ore_rate

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@746 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
celest 2004-12-23 05:15:10 +00:00
parent 092e907286
commit 0d6e124f1d
5 changed files with 12 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Date Added Date Added
12/22 12/22
* Added finding_ore_rate to battle_athena.conf, thanks to orn [celest]
* Changed how party exp is passed out to eliminate players * Changed how party exp is passed out to eliminate players
current in a chat window or those who havn't moved or attacked current in a chat window or those who havn't moved or attacked
in 2 minutes [MouseJstr] in 2 minutes [MouseJstr]

View File

@ -827,5 +827,8 @@ disp_hpmeter: no
// 0 - Disabled // 0 - Disabled
bone_drop: 0 bone_drop: 0
// The rate of monsters dropping ores by the skill Ore Discovery (Default is 100)
finding_ore_rate: 100
import: conf/import/battle_conf.txt import: conf/import/battle_conf.txt

View File

@ -5301,7 +5301,7 @@ static const struct {
{ "max_cloth_color", &battle_config.max_cloth_color }, // added by [MouseJstr] { "max_cloth_color", &battle_config.max_cloth_color }, // added by [MouseJstr]
{ "castrate_dex_scale", &battle_config.castrate_dex_scale }, // added by [MouseJstr] { "castrate_dex_scale", &battle_config.castrate_dex_scale }, // added by [MouseJstr]
{ "area_size", &battle_config.area_size }, // added by [MouseJstr] { "area_size", &battle_config.area_size }, // added by [MouseJstr]
{ "muting_players", &battle_config.muting_players}, // added by [Apple] { "muting_players", &battle_config.muting_players}, // added by [Apple]
{ "zeny_from_mobs", &battle_config.zeny_from_mobs}, // [Valaris] { "zeny_from_mobs", &battle_config.zeny_from_mobs}, // [Valaris]
{ "mobs_level_up", &battle_config.mobs_level_up}, // [Valaris] { "mobs_level_up", &battle_config.mobs_level_up}, // [Valaris]
{ "pk_min_level", &battle_config.pk_min_level}, // [celest] { "pk_min_level", &battle_config.pk_min_level}, // [celest]
@ -5311,6 +5311,7 @@ static const struct {
{ "skill_range_leniency", &battle_config.skill_range_leniency}, // [celest] { "skill_range_leniency", &battle_config.skill_range_leniency}, // [celest]
{ "motd_type", &battle_config.motd_type}, // [celest] { "motd_type", &battle_config.motd_type}, // [celest]
{ "allow_atcommand_when_mute", &battle_config.allow_atcommand_when_mute}, // [celest] { "allow_atcommand_when_mute", &battle_config.allow_atcommand_when_mute}, // [celest]
{ "finding_ore_rate", &battle_config.finding_ore_rate}, // [celest]
//SQL-only options start //SQL-only options start
#ifndef TXT_ONLY #ifndef TXT_ONLY
@ -5567,10 +5568,8 @@ void battle_set_defaults() {
battle_config.skill_range_leniency = 1; battle_config.skill_range_leniency = 1;
battle_config.motd_type = 0; battle_config.motd_type = 0;
battle_config.allow_atcommand_when_mute = 0; battle_config.allow_atcommand_when_mute = 0;
battle_config.finding_ore_rate = 100;
battle_config.castrate_dex_scale = 150; battle_config.castrate_dex_scale = 150;
battle_config.area_size = 14; battle_config.area_size = 14;
//SQL-only options start //SQL-only options start
@ -5703,6 +5702,9 @@ void battle_validate_conf() {
else if (battle_config.motd_type > 1) else if (battle_config.motd_type > 1)
battle_config.motd_type = 1; battle_config.motd_type = 1;
if (battle_config.finding_ore_rate < 0)
battle_config.finding_ore_rate = 0;
if (battle_config.vending_max_value > 10000000 || battle_config.vending_max_value<=0) // Lupus & Kobra_k88 if (battle_config.vending_max_value > 10000000 || battle_config.vending_max_value<=0) // Lupus & Kobra_k88
battle_config.vending_max_value = 10000000; battle_config.vending_max_value = 10000000;

View File

@ -355,6 +355,7 @@ extern struct Battle_Config {
int skill_range_leniency; // [celest] int skill_range_leniency; // [celest]
int motd_type; // [celest] int motd_type; // [celest]
int allow_atcommand_when_mute; // [celest] int allow_atcommand_when_mute; // [celest]
int finding_ore_rate; // orn
#ifndef TXT_ONLY /* SQL-only options */ #ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris] int mail_system; // [Valaris]

View File

@ -2483,7 +2483,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
#endif #endif
// Ore Discovery [Celest] // Ore Discovery [Celest]
if (pc_checkskill(sd,BS_FINDINGORE)>0 && 1 >= rand()%1000) { if (pc_checkskill(sd,BS_FINDINGORE)>0 && battle_config.finding_ore_rate/100 >= rand()%1000) {
struct delay_item_drop *ditem; struct delay_item_drop *ditem;
int itemid[17] = { 714, 756, 757, 969, 984, 985, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1002 }; int itemid[17] = { 714, 756, 757, 969, 984, 985, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1002 };
ditem=(struct delay_item_drop *)aCalloc(1,sizeof(struct delay_item_drop)); ditem=(struct delay_item_drop *)aCalloc(1,sizeof(struct delay_item_drop));