summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-24 13:59:59 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-24 13:59:59 +0000
commit5ac133e3b8736d62e57efc3dd42e3db6816605ad (patch)
tree0d5322821e580a676b170d1db5caebbbda221ffc /src/map/status.c
parentbf2d6424f40123d3a70bcaa6864756cc7a72c46a (diff)
downloadhercules-5ac133e3b8736d62e57efc3dd42e3db6816605ad.tar.gz
hercules-5ac133e3b8736d62e57efc3dd42e3db6816605ad.tar.bz2
hercules-5ac133e3b8736d62e57efc3dd42e3db6816605ad.tar.xz
hercules-5ac133e3b8736d62e57efc3dd42e3db6816605ad.zip
Fixed bugreport:1551 poison and edp poison now give proper exp to caster vs mobs.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16142 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2da269239..343f7cbf7 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6825,11 +6825,15 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_DPOISON:
//Lose 10/15% of your life as long as it doesn't brings life below 25%
- if (status->hp > status->max_hp>>2)
- {
+ if (status->hp > status->max_hp>>2) {
int diff = status->max_hp*(bl->type==BL_PC?10:15)/100;
if (status->hp - diff < status->max_hp>>2)
diff = status->hp - (status->max_hp>>2);
+ if( val2 && bl->type == BL_MOB ) {
+ struct block_list* src = map_id2bl(val2);
+ if( src )
+ mob_log_damage((TBL_MOB*)bl,src,diff);
+ }
status_zap(bl, diff, 0);
}
// fall through
@@ -9151,6 +9155,11 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
case SC_DPOISON:
if (--(sce->val3) > 0) {
if (!sc->data[SC_SLOWPOISON]) {
+ if( sce->val2 && bl->type == BL_MOB ) {
+ struct block_list* src = map_id2bl(sce->val2);
+ if( src )
+ mob_log_damage((TBL_MOB*)bl,src,sce->val4);
+ }
map_freeblock_lock();
status_zap(bl, sce->val4, 0);
if (sc->data[type]) { // Check if the status still last ( can be dead since then ).