summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-19 11:32:41 +0000
committertoms <toms@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-19 11:32:41 +0000
commit59fcf9c26e7c9d5cf65b60d0fb148b5214143711 (patch)
tree58925b6bc69b15dfbce7f90b1a8c96651ea0f1b9 /src
parent41fcb2ac66e37cad97e9ec485bd4d11f8397e53b (diff)
downloadhercules-59fcf9c26e7c9d5cf65b60d0fb148b5214143711.tar.gz
hercules-59fcf9c26e7c9d5cf65b60d0fb148b5214143711.tar.bz2
hercules-59fcf9c26e7c9d5cf65b60d0fb148b5214143711.tar.xz
hercules-59fcf9c26e7c9d5cf65b60d0fb148b5214143711.zip
Added homunculus_friendly_rate battle config
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8361 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/mercenary.c3
3 files changed, 6 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 0376a2ac3..f4a28b534 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3738,6 +3738,7 @@ static const struct battle_data_short {
{ "override_mob_names", &battle_config.override_mob_names },
{ "min_chat_delay", &battle_config.min_chat_delay },
{ "homunculus_show_growth", &battle_config.homunculus_show_growth }, //[orn]
+ { "homunculus_friendly_rate", &battle_config.homunculus_friendly_rate },
};
static const struct battle_data_int {
@@ -4171,6 +4172,7 @@ void battle_set_defaults() {
battle_config.min_chat_delay = 0;
battle_config.hvan_explosion_intimate = 45000; //[orn]
battle_config.homunculus_show_growth = 0; //[orn]
+ battle_config.homunculus_friendly_rate = 100;
}
void battle_validate_conf() {
diff --git a/src/map/battle.h b/src/map/battle.h
index e78713583..588317f2a 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -437,7 +437,7 @@ extern struct Battle_Config {
unsigned short min_chat_delay; //Minimum time between client messages. [Skotlex]
unsigned int hvan_explosion_intimate ; // fix [albator]
unsigned short homunculus_show_growth ; //[orn]
-
+ unsigned short homunculus_friendly_rate;
} battle_config;
void do_init_battle(void);
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 118bda037..472ac285c 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -393,6 +393,9 @@ int merc_hom_gainexp(struct homun_data *hd,int exp)
// Return then new value
int merc_hom_increase_intimacy(struct homun_data * hd, unsigned int value)
{
+ if (battle_config.homunculus_friendly_rate != 100)
+ value = (value * battle_config.homunculus_friendly_rate) / 100;
+
if (hd->master->homunculus.intimacy + value <= 100000)
hd->master->homunculus.intimacy += value;
else