summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 00:51:01 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-11 00:51:01 +0000
commit69e30e1de648a546d1faf3d058dfb88e2181d413 (patch)
tree12c1325530ba0eaa682d1429be6622a08c72748d /src/map
parent58af0db03f21591ac753d7edad30fe1b494dc0ec (diff)
downloadhercules-69e30e1de648a546d1faf3d058dfb88e2181d413.tar.gz
hercules-69e30e1de648a546d1faf3d058dfb88e2181d413.tar.bz2
hercules-69e30e1de648a546d1faf3d058dfb88e2181d413.tar.xz
hercules-69e30e1de648a546d1faf3d058dfb88e2181d413.zip
- Fixed cart-termination crashing the server if you used level 16 of it.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7606 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index e83b1846b..c143fc470 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1421,10 +1421,12 @@ static struct Damage battle_calc_weapon_attack(
skillratio += 30*skill_lv;
break;
case WS_CARTTERMINATION:
+ i = (10 * (16 - skill_lv));
+ if (i < 1) i = 1;
if(sd && sd->cart_weight > 0)
- skillratio += sd->cart_weight / (10 * (16 - skill_lv)) - 100;
+ skillratio += sd->cart_weight / i - 100;
else if (!sd)
- skillratio += battle_config.max_cart_weight / (10 * (16 - skill_lv));
+ skillratio += battle_config.max_cart_weight / i - 100;
flag.cardfix = 0;
break;
case TK_DOWNKICK: