diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-12 14:44:02 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-12 14:44:02 +0000 |
commit | 801d77413950958dc17b209437242d9b7c96ee72 (patch) | |
tree | f557fa788537f1db9a0eaeb291241c453026b03a /src/map | |
parent | ef4c97fcbdd1ed0ddac2a9b8e8d2a10ed0120fe1 (diff) | |
download | hercules-801d77413950958dc17b209437242d9b7c96ee72.tar.gz hercules-801d77413950958dc17b209437242d9b7c96ee72.tar.bz2 hercules-801d77413950958dc17b209437242d9b7c96ee72.tar.xz hercules-801d77413950958dc17b209437242d9b7c96ee72.zip |
- status_damage will no longer fail when the target is not on a map AND the flag is 2 (charge rather than damage). Fixes SP-draining status changes ending suddenly when in-between maps.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7635 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/status.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c index b3a77dadf..fc0fe1ada 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -523,8 +523,11 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s status = status_get_status_data(target); - if (status == &dummy_status || !status->hp || !target->prev) - return 0; //Invalid targets: no damage, dead, not on a map. + if (status == &dummy_status || !status->hp) + return 0; //Invalid targets: no damage or dead + + if (!target->prev && !(flag&2)) + return 0; //Cannot damage a bl not on a map, except when "charging" hp/sp sc = status_get_sc(target); |