summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-16 12:40:08 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-16 12:42:54 +0300
commit33b41fe00a47510ed6b84e04fc9e9a222b053130 (patch)
tree24c58e9efef5d75ff5ec5aabfb1bad9d30b1bd85 /src/map/status.c
parent6ecadc26c798322d8a88b9fb2d4a93349bc19d07 (diff)
downloadevol-hercules-33b41fe00a47510ed6b84e04fc9e9a222b053130.tar.gz
evol-hercules-33b41fe00a47510ed6b84e04fc9e9a222b053130.tar.bz2
evol-hercules-33b41fe00a47510ed6b84e04fc9e9a222b053130.tar.xz
evol-hercules-33b41fe00a47510ed6b84e04fc9e9a222b053130.zip
Apply WalkSpeed attribute from job_db.conf.
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;
+}