summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/mob.c10
-rw-r--r--src/map/status.c26
3 files changed, 21 insertions, 21 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index c88e08495..d5f523208 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -263,7 +263,7 @@ int battle_delay_damage(int64 tick, int amotion, struct block_list *src, struct
if (d_tbl && sc && check_distance_bl(target, d_tbl, sc->data[SC_DEVOTION]->val3) && damage > 0 && skill_id != PA_PRESSURE && skill_id != CR_REFLECTSHIELD)
damage = 0;
-
+
if ( !battle_config.delay_battle_damage || amotion <= 1 ) {
map->freeblock_lock();
status_fix_damage(src, target, damage, ddelay); // We have to separate here between reflect damage and others [icescope]
@@ -3160,9 +3160,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
}
if( bl->type == BL_MOB && !status->isdead(bl) && src != bl) {
- if (damage > 0 )
+ if ( damage > 0 )
mob->skill_event((TBL_MOB*)bl,src,timer->gettick(),flag);
- if (skill_id)
+ if (skill_id)
mob->skill_event((TBL_MOB*)bl,src,timer->gettick(),MSC_SKILLUSED|(skill_id<<16));
}
if( sd ) {
diff --git a/src/map/mob.c b/src/map/mob.c
index d8898619c..a94650438 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2074,11 +2074,6 @@ void mob_damage(struct mob_data *md, struct block_list *src, int damage) {
}
}
#endif
-
- if( md->special_state.ai == 2 ) {//LOne WOlf explained that ANYONE can trigger the marine countdown skill. [Skotlex]
- md->state.alchemist = 1;
- mob->skill_use(md, timer->gettick(), MSC_ALCHEMIST);
- }
}
/*==========================================
@@ -3307,6 +3302,11 @@ int mobskill_event(struct mob_data *md, struct block_list *src, int64 tick, int
if(md->bl.prev == NULL || md->status.hp <= 0)
return 0;
+ if( md->special_state.ai == 2 ) {//LOne WOlf explained that ANYONE can trigger the marine countdown skill. [Skotlex]
+ md->state.alchemist = 1;
+ return mob->skill_use(md, timer->gettick(), MSC_ALCHEMIST);
+ }
+
target_id = md->target_id;
if (!target_id || battle_config.mob_changetarget_byskill)
md->target_id = src->id;
diff --git a/src/map/status.c b/src/map/status.c
index d5c49c07c..33287e472 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.