summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-10 22:02:33 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-10 22:02:33 +0000
commit234ababd8c1a9df4391c6c54f9167f625e432dc2 (patch)
tree6e7e67c85594893c8aab0730789f36e5c5d4f2ef /src/map/pc.c
parentf9e689d36895ff10c03fc3c488da28693636d454 (diff)
downloadhercules-234ababd8c1a9df4391c6c54f9167f625e432dc2.tar.gz
hercules-234ababd8c1a9df4391c6c54f9167f625e432dc2.tar.bz2
hercules-234ababd8c1a9df4391c6c54f9167f625e432dc2.tar.xz
hercules-234ababd8c1a9df4391c6c54f9167f625e432dc2.zip
- Fixed getmonsterinfo to return "null" when returning the name of a non-existing mob instead of -1.
- Extended the status_percent_damage define to include a bolean to specify whether or not the target can be killed from it. - Corrected CR_CULTIVATION to fail when the target cell has some BL_CHAR on it already. - Changed the meaning of 'flag' in status_percent_change, to enable differentiation between damage that can kill the object and damage that cannot. - Script command percentheal will no longer kill the player if the specified amount is negative (and not -100). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12051 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index d524a5766..d3281985a 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5494,22 +5494,22 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
if(hp >= 0 && sp >= 0) //Heal
return status_percent_heal(&sd->bl, hp, sp);
- if(hp <= 0 && sp <= 0) //Damage (negative rates indicate % of max rather than current)
- return status_percent_damage(NULL, &sd->bl, hp, sp);
+ if(hp <= 0 && sp <= 0) //Damage (negative rates indicate % of max rather than current), and only kill target IF the specified amount is 100%
+ return status_percent_damage(NULL, &sd->bl, hp, sp, hp==-100);
//Crossed signs
if(hp) {
if(hp > 0)
status_percent_heal(&sd->bl, hp, 0);
else
- status_percent_damage(NULL, &sd->bl, hp, 0);
+ status_percent_damage(NULL, &sd->bl, hp, 0, hp==-100);
}
if(sp) {
if(sp > 0)
status_percent_heal(&sd->bl, 0, sp);
else
- status_percent_damage(NULL, &sd->bl, 0, sp);
+ status_percent_damage(NULL, &sd->bl, 0, sp, false);
}
return 0;
}