From 58aa5f00185701b698eaf6e514d89276e41d20d7 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 28 Jul 2007 19:21:40 +0000 Subject: * Removed ridiculous refine_posword config switch * TODO: remove getequipname() func, it can be fully replaced by editing a few scripts, plus it doesn't do what the docs say it should do * Fixed a silly mistake in the main script engine loop ('pos' variable) * Fixed monter -> monster typos * Compacted some script function code (fewer LoC -> faster trac :) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10923 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index 047e3229d..fa197563f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1150,10 +1150,7 @@ static struct Damage battle_calc_weapon_attack( if (sd && (skill = pc_checkskill(sd,BS_WEAPONRESEARCH)) > 0) hitrate += hitrate * ( 2 * skill ) / 100; - if (hitrate > battle_config.max_hitrate) - hitrate = battle_config.max_hitrate; - else if (hitrate < battle_config.min_hitrate) - hitrate = battle_config.min_hitrate; + hitrate = cap_value(hitrate, battle_config.min_hitrate, battle_config.max_hitrate); if(rand()%100 >= hitrate) wd.dmg_lv = ATK_FLEE; -- cgit v1.2.3-60-g2f50