summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-21 06:21:44 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-08-21 06:21:44 +0000
commitad8b21eed7219a457340278ed39642578d48b2eb (patch)
treef6efe58eafbe1ecdb554f888feb8f40bdd6fc1b9 /src
parent8f8f101effc1c7e73af479a5474e59a6ebf3d0d3 (diff)
downloadhercules-ad8b21eed7219a457340278ed39642578d48b2eb.tar.gz
hercules-ad8b21eed7219a457340278ed39642578d48b2eb.tar.bz2
hercules-ad8b21eed7219a457340278ed39642578d48b2eb.tar.xz
hercules-ad8b21eed7219a457340278ed39642578d48b2eb.zip
Added bMagicHPGainValue and bMagicSPGainValue.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14018 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/map.h2
-rw-r--r--src/map/pc.c8
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c18
-rw-r--r--src/map/status.c2
5 files changed, 25 insertions, 7 deletions
diff --git a/src/map/map.h b/src/map/map.h
index a5a9ac03d..101be46cf 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -322,7 +322,7 @@ enum _sp {
SP_SP_GAIN_RACE, SP_SUBRACE2, SP_UNBREAKABLE_SHOES, // 2031-2033
SP_UNSTRIPABLE_WEAPON,SP_UNSTRIPABLE_ARMOR,SP_UNSTRIPABLE_HELM,SP_UNSTRIPABLE_SHIELD, // 2034-2037
SP_INTRAVISION, SP_ADD_MONSTER_DROP_ITEMGROUP, SP_SP_LOSS_RATE, // 2038-2040
- SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE //2041
+ SP_ADD_SKILL_BLOW, SP_SP_VANISH_RATE, SP_MAGIC_SP_GAIN_VALUE, SP_MAGIC_HP_GAIN_VALUE //2041-2044
};
enum _look {
diff --git a/src/map/pc.c b/src/map/pc.c
index 17a8917cd..acd583ca1 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2225,6 +2225,14 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(!sd->state.lr_flag)
sd->hp_gain_value += val;
break;
+ case SP_MAGIC_SP_GAIN_VALUE:
+ if(!sd->state.lr_flag)
+ sd->magic_sp_gain_value += val;
+ break;
+ case SP_MAGIC_HP_GAIN_VALUE:
+ if(!sd->state.lr_flag)
+ sd->magic_hp_gain_value += val;
+ break;
case SP_ADD_HEAL_RATE:
if(sd->state.lr_flag != 2)
sd->add_heal_rate += val;
diff --git a/src/map/pc.h b/src/map/pc.h
index c219c8f45..c1102d514 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -275,7 +275,7 @@ struct map_session_data {
short splash_range, splash_add_range;
short add_steal_rate;
short add_heal_rate, add_heal2_rate;
- short sp_gain_value, hp_gain_value;
+ short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value;
short sp_vanish_rate;
short sp_vanish_per;
unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest]
diff --git a/src/map/skill.c b/src/map/skill.c
index 9d8c3d6c2..1ed612dee 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1234,13 +1234,21 @@ int skill_counter_additional_effect (struct block_list* src, struct block_list *
status_heal(src, 0, status_get_lv(bl)*(95+15*rate)/100, 2);
}
- if( sd && status_isdead(bl) && attack_type&BF_WEAPON )
+ if( sd && status_isdead(bl) )
{
int sp = 0, hp = 0;
- sp += sd->sp_gain_value;
- sp += sd->sp_gain_race[status_get_race(bl)];
- sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS];
- hp += sd->hp_gain_value;
+ if( attack_type&BF_WEAPON )
+ {
+ sp += sd->sp_gain_value;
+ sp += sd->sp_gain_race[status_get_race(bl)];
+ sp += sd->sp_gain_race[is_boss(bl)?RC_BOSS:RC_NONBOSS];
+ hp += sd->hp_gain_value;
+ }
+ if( attack_type&BF_MAGIC )
+ {
+ sp += sd->magic_sp_gain_value;
+ hp += sd->magic_hp_gain_value;
+ }
if( hp || sp )
status_heal(src, hp, sp, battle_config.show_hp_sp_gain?2:0);
}
diff --git a/src/map/status.c b/src/map/status.c
index 857a0a7a7..7479b726c 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1823,6 +1823,8 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
+ sizeof(sd->add_heal2_rate)
+ sizeof(sd->hp_gain_value)
+ sizeof(sd->sp_gain_value)
+ + sizeof(sd->magic_hp_gain_value)
+ + sizeof(sd->magic_sp_gain_value)
+ sizeof(sd->sp_vanish_rate)
+ sizeof(sd->sp_vanish_per)
+ sizeof(sd->unbreakable)