From 69e30e1de648a546d1faf3d058dfb88e2181d413 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 11 Jul 2006 00:51:01 +0000 Subject: - 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 --- Changelog-Trunk.txt | 2 ++ src/map/battle.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 7be3420c6..43061be97 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/07/10 + * Fixed cart-termination crashing the server if you used level 16 of it. + [Skotlex] * Fixed check_connect_login_server check in char-sql server. Fixes char-server not reconnecting to the login server. [Skotlex] * Login-sql server will no longer change an account's state to "7" when 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: -- cgit v1.2.3-70-g09d2