diff options
author | shennetsind <ind@henn.et> | 2015-02-13 11:21:44 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-02-13 11:21:44 -0200 |
commit | 868a2b4ab50431e0d0a48927b40156d5a83d9d46 (patch) | |
tree | 76d555000b29adc5276b377390bfd4dbf7cf8031 /src/map/status.c | |
parent | 00ca143b9f76620b7f68559bbdb4458e6936b639 (diff) | |
download | hercules-868a2b4ab50431e0d0a48927b40156d5a83d9d46.tar.gz hercules-868a2b4ab50431e0d0a48927b40156d5a83d9d46.tar.bz2 hercules-868a2b4ab50431e0d0a48927b40156d5a83d9d46.tar.xz hercules-868a2b4ab50431e0d0a48927b40156d5a83d9d46.zip |
Fixed alchemist marine sphere causing double deletion on renewal
Special Thanks to Haruna, Michieru.
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/map/status.c b/src/map/status.c index 296bbe1f3..2595e8cf1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1258,11 +1258,11 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, } switch (target->type) { - case BL_PC: pc->damage((TBL_PC*)target,src,hp,sp); break; - case BL_MOB: mob->damage((TBL_MOB*)target, src, hp); break; - case BL_HOM: homun->damaged((TBL_HOM*)target); break; - case BL_MER: mercenary->heal((TBL_MER*)target,hp,sp); break; - case BL_ELEM: elemental->heal((TBL_ELEM*)target,hp,sp); break; + case BL_PC: pc->damage((TBL_PC*)target,src,hp,sp); break; + case BL_MOB: mob->damage((TBL_MOB*)target, src, hp); break; + case BL_HOM: homun->damaged((TBL_HOM*)target); break; + case BL_MER: mercenary->heal((TBL_MER*)target,hp,sp); break; + case BL_ELEM: elemental->heal((TBL_ELEM*)target,hp,sp); break; } if( src && target->type == BL_PC && (((TBL_PC*)target)->disguise) > 0 ) {// stop walking when attacked in disguise to prevent walk-delay bug @@ -1283,14 +1283,14 @@ int status_damage(struct block_list *src,struct block_list *target,int64 in_hp, //&2: Also remove object from map. //&4: Also delete object from memory. switch (target->type) { - case BL_PC: flag = pc->dead((TBL_PC*)target,src); break; - case BL_MOB: flag = mob->dead((TBL_MOB*)target, src, (flag&4) ? 3 : 0); break; - case BL_HOM: flag = homun->dead((TBL_HOM*)target); break; - case BL_MER: flag = mercenary->dead((TBL_MER*)target); break; - case BL_ELEM: flag = elemental->dead((TBL_ELEM*)target); break; - default: //Unhandled case, do nothing to object. - flag = 0; - break; + case BL_PC: flag = pc->dead((TBL_PC*)target,src); break; + case BL_MOB: flag = mob->dead((TBL_MOB*)target, src, (flag&4) ? 3 : 0); break; + case BL_HOM: flag = homun->dead((TBL_HOM*)target); break; + case BL_MER: flag = mercenary->dead((TBL_MER*)target); break; + case BL_ELEM: flag = elemental->dead((TBL_ELEM*)target); break; + default: //Unhandled case, do nothing to object. + flag = 0; + break; } if(!flag) //Death canceled. |