summaryrefslogtreecommitdiff
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
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
-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: