summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/battle.c6
-rw-r--r--src/map/unit.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 46e930ebf..025339fe1 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -400,7 +400,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
if( sc->data[SC_WEAPONBLOCKING] && flag&(BF_SHORT|BF_WEAPON) && rand()%100 < sc->data[SC_WEAPONBLOCKING]->val2 )
{
clif_skill_nodamage(bl,src,GC_WEAPONBLOCKING,1,1);
- d->dmg_lv = ATK_NONE;
+ d->dmg_lv = ATK_BLOCK;
sc_start2(bl,SC_COMBO,100,GC_WEAPONBLOCKING,src->id,2000);
return 0;
}
@@ -3794,7 +3794,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
clif_damage(src, target, tick, sstatus->amotion, 1, 0, 1, 0, 0); //Display MISS.
status_change_end(target, SC_AUTOCOUNTER, INVALID_TIMER);
skill_attack(BF_WEAPON,target,target,src,KN_AUTOCOUNTER,skilllv,tick,0);
- return ATK_NONE;
+ return ATK_BLOCK;
}
}
@@ -3808,7 +3808,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
clif_damage(src, target, tick, sstatus->amotion, 1, 0, 1, 0, 0); //Display MISS.
clif_bladestop(target, src->id, 1);
sc_start4(target, SC_BLADESTOP, 100, skilllv, 0, 0, src->id, duration);
- return ATK_NONE;
+ return ATK_BLOCK;
}
}
diff --git a/src/map/unit.c b/src/map/unit.c
index 5e0d5527f..e4376b01d 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1759,7 +1759,13 @@ static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int t
if(sd && sd->status.pet_id > 0 && sd->pd && battle_config.pet_attack_support)
pet_target_check(sd,target,0);
map_freeblock_unlock();
-
+ /**
+ * Applied when you're unable to attack (e.g. out of ammo)
+ * We should stop here otherwise timer keeps on and this happens endlessly
+ **/
+ if( ud->attacktarget_lv == ATK_NONE )
+ return 1;
+
ud->attackabletime = tick + sstatus->adelay;
// You can't move if you can't attack neither.
if (src->type&battle_config.attack_walk_delay)