summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 05:15:10 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 05:15:10 +0000
commit1b41357533c38140578f2e255e411c360b37afa2 (patch)
tree79f27e11092c44e56718a299ab82631b6715350a /src
parent30b5d44d52d1f6715c44e6f266a756a59acb2c59 (diff)
downloadhercules-1b41357533c38140578f2e255e411c360b37afa2.tar.gz
hercules-1b41357533c38140578f2e255e411c360b37afa2.tar.bz2
hercules-1b41357533c38140578f2e255e411c360b37afa2.tar.xz
hercules-1b41357533c38140578f2e255e411c360b37afa2.zip
Added finding_ore_rate
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@746 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c10
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/mob.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 2ff50cfff..ef05f16a8 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -5301,7 +5301,7 @@ static const struct {
{ "max_cloth_color", &battle_config.max_cloth_color }, // added by [MouseJstr]
{ "castrate_dex_scale", &battle_config.castrate_dex_scale }, // 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]
{ "mobs_level_up", &battle_config.mobs_level_up}, // [Valaris]
{ "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]
{ "motd_type", &battle_config.motd_type}, // [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
#ifndef TXT_ONLY
@@ -5567,10 +5568,8 @@ void battle_set_defaults() {
battle_config.skill_range_leniency = 1;
battle_config.motd_type = 0;
battle_config.allow_atcommand_when_mute = 0;
-
-
+ battle_config.finding_ore_rate = 100;
battle_config.castrate_dex_scale = 150;
-
battle_config.area_size = 14;
//SQL-only options start
@@ -5703,6 +5702,9 @@ void battle_validate_conf() {
else if (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
battle_config.vending_max_value = 10000000;
diff --git a/src/map/battle.h b/src/map/battle.h
index fb3d3e4e2..bd22b9341 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -355,6 +355,7 @@ extern struct Battle_Config {
int skill_range_leniency; // [celest]
int motd_type; // [celest]
int allow_atcommand_when_mute; // [celest]
+ int finding_ore_rate; // orn
#ifndef TXT_ONLY /* SQL-only options */
int mail_system; // [Valaris]
diff --git a/src/map/mob.c b/src/map/mob.c
index 1b2792df6..f65e27bc0 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2483,7 +2483,7 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
#endif
// 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;
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));