summaryrefslogtreecommitdiff
path: root/src/emap/horse.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-19 19:56:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-19 19:56:32 +0300
commit9c4e88cfd0687a2e01522c58f932d3f40d468d6b (patch)
tree3a59ddefb0a0b5851d95f500b998a3b4f43526af /src/emap/horse.c
parent73defa73651a5e6f7683dc90ab465d19496b8cca (diff)
downloadevol-hercules-9c4e88cfd0687a2e01522c58f932d3f40d468d6b.tar.gz
evol-hercules-9c4e88cfd0687a2e01522c58f932d3f40d468d6b.tar.bz2
evol-hercules-9c4e88cfd0687a2e01522c58f932d3f40d468d6b.tar.xz
evol-hercules-9c4e88cfd0687a2e01522c58f932d3f40d468d6b.zip
Add fixed bonuses for new mounts.
Diffstat (limited to 'src/emap/horse.c')
-rw-r--r--src/emap/horse.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/emap/horse.c b/src/emap/horse.c
new file mode 100644
index 0000000..f56926f
--- /dev/null
+++ b/src/emap/horse.c
@@ -0,0 +1,46 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2014 - 2015 Evol developers
+
+#include "common/hercules.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "common/HPMi.h"
+#include "common/memmgr.h"
+#include "common/mmo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/map.h"
+#include "map/pc.h"
+
+#include "emap/data/session.h"
+#include "emap/struct/sessionext.h"
+
+void horse_add_bonus(TBL_PC *sd)
+{
+ struct SessionExt *data = session_get_bysd(sd);
+ if (!data || data->mount == 0)
+ return;
+
+ struct status_data *bstatus = &sd->base_status;
+
+ bstatus->aspd_rate += 50 - 10 * pc->checkskill(sd, KN_CAVALIERMASTERY);
+
+ if (pc->checkskill(sd, KN_RIDING) > 0)
+ sd->max_weight += 10000;
+}
+
+unsigned short horse_add_speed_bonus(TBL_PC *sd, unsigned short val)
+{
+ if (sd)
+ {
+ struct SessionExt *data = session_get_bysd(sd);
+ if (!data || data->mount == 0)
+ return val;
+
+ val -= 25;
+ }
+ return val;
+}