summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 2961646..916ee78 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -13,6 +13,7 @@
#include "../../../map/itemdb.h"
#include "../../../map/map.h"
#include "../../../map/npc.h"
+#include "../../../map/pc.h"
#include "../../../map/status.h"
#include "map/data/npcd.h"
@@ -52,3 +53,18 @@ void estatus_read_job_db_sub(int *idxPtr,
if (itemdb->lookup_const(jdb, "MoveSpeed", &i32))
class_move_speed[idx] = i32;
}
+
+int estatus_calc_pc_(int retVal,
+ struct map_session_data *sd,
+ enum e_status_calc_opt *opt __attribute__ ((unused)))
+{
+ if (!sd)
+ return retVal;
+
+ if (!sd->state.permanent_speed)
+ {
+ const int idx = pc->class2idx(sd->status.class_);
+ sd->base_status.speed = class_move_speed[idx];
+ }
+ return retVal;
+}