summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/battle.c6
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: