summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/status.c11
2 files changed, 6 insertions, 6 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 05bcc3df0..c22424f9b 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,7 @@ 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/05/30
+ * Fixed underflow issues when calculating dmotion. [Skotlex]
* Fixed Absorb Spirit Spheres [Skotlex]
* Added battle_config min_chat_delay (default 0, battle/client.conf)
specifies in ms what is the min delay between player sent chats
diff --git a/src/map/status.c b/src/map/status.c
index 6ad8bfa14..068e7a733 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -1937,9 +1937,9 @@ int status_calc_pc(struct map_session_data* sd,int first)
// ----- DMOTION -----
-//
- status->dmotion = 800-status->agi*4;
- if(status->dmotion<400) status->dmotion = 400;
+//
+ i = 800-status->agi*4;
+ status->dmotion = cap_value(i, 400, 800);
// ----- HP MAX CALCULATION -----
@@ -2360,12 +2360,11 @@ void status_calc_bl_sub_pc(struct map_session_data *sd, unsigned long flag)
if(flag&(SCB_AGI|SCB_DSPD)) {
//Even though people insist this is too slow, packet data reports this is the actual real equation.
- status->dmotion = 800-status->agi*4;
- if(status->dmotion<400) status->dmotion = 400;
+ skill = 800-status->agi*4;
+ status->dmotion = cap_value(skill, 400, 800);
if(battle_config.pc_damage_delay_rate != 100)
status->dmotion = status->dmotion*battle_config.pc_damage_delay_rate/100;
-
status->dmotion = status_calc_dmotion(&sd->bl, &sd->sc, b_status->dmotion);
}