summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-02-07 03:13:48 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-02-07 03:13:48 +0000
commit321fad2e5e3ceff3f624d124565b22ca9868db9f (patch)
tree46db720621919e0507f653b7c7b747030464e0d6 /src/map
parent2ba08eae75f05d5a81494c7e3b98286796635cb3 (diff)
downloadhercules-321fad2e5e3ceff3f624d124565b22ca9868db9f.tar.gz
hercules-321fad2e5e3ceff3f624d124565b22ca9868db9f.tar.bz2
hercules-321fad2e5e3ceff3f624d124565b22ca9868db9f.tar.xz
hercules-321fad2e5e3ceff3f624d124565b22ca9868db9f.zip
Bleeding doesn't kill non-player characters.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14241 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/status.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2017a12fc..16eec43c1 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6990,13 +6990,15 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr data)
case SC_BLEEDING:
if (--(sce->val4) >= 0) {
- int flag;
+ int flag, hp = rand()%600 + 200;
map_freeblock_lock();
- status_fix_damage(NULL, bl, rand()%600 + 200, 0);
+ status_fix_damage(NULL, bl, sd||hp<status->hp?hp:status->hp-1, 0);
flag = !sc->data[type];
map_freeblock_unlock();
- if (flag) return 0; //SC already ended.
- sc_timer_next(10000 + tick, status_change_timer, bl->id, data);
+ if( !flag ) {
+ if( status->hp == 1 ) break;
+ sc_timer_next(10000 + tick, status_change_timer, bl->id, data);
+ }
return 0;
}
break;