summaryrefslogtreecommitdiff
path: root/src/emap/data
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-09 21:03:52 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-09 21:03:52 +0300
commitcdab2778ae73dcad36fbeac8d827732440a321e3 (patch)
treeaa2d0b4c53a66f61956e973cad49edc25f2acadb /src/emap/data
parent3a59570a1c21f4b5903842b0ba8639e79aae7174 (diff)
downloadevol-hercules-cdab2778ae73dcad36fbeac8d827732440a321e3.tar.gz
evol-hercules-cdab2778ae73dcad36fbeac8d827732440a321e3.tar.bz2
evol-hercules-cdab2778ae73dcad36fbeac8d827732440a321e3.tar.xz
evol-hercules-cdab2778ae73dcad36fbeac8d827732440a321e3.zip
Add array and functions for skill extended data.
Diffstat (limited to 'src/emap/data')
-rw-r--r--src/emap/data/skilld.c38
-rw-r--r--src/emap/data/skilld.h13
2 files changed, 51 insertions, 0 deletions
diff --git a/src/emap/data/skilld.c b/src/emap/data/skilld.c
new file mode 100644
index 0000000..ce39993
--- /dev/null
+++ b/src/emap/data/skilld.c
@@ -0,0 +1,38 @@
+// 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/nullpo.h"
+#include "common/socket.h"
+#include "common/strlib.h"
+#include "map/skill.h"
+
+#include "emap/data/skilld.h"
+#include "emap/struct/skilldext.h"
+
+struct SkilldExt skilld_arr[MAX_SKILL_DB];
+
+struct SkilldExt *skilld_init(void)
+{
+ for (int f = 0; f < MAX_SKILL_DB; f ++)
+ {
+ for (int d = 0; d < SKILLD_MAXMISCEFFECTS; d ++)
+ {
+ skilld_arr[f].miscEffects[d] = -1;
+ }
+ }
+}
+
+struct SkilldExt *skilld_get(const int skill_idx)
+{
+ Assert_retr(NULL, skill_idx >= 0 && skill_idx < MAX_SKILL_DB);
+ return &skilld_arr[skill_idx];
+}
diff --git a/src/emap/data/skilld.h b/src/emap/data/skilld.h
new file mode 100644
index 0000000..0039c47
--- /dev/null
+++ b/src/emap/data/skilld.h
@@ -0,0 +1,13 @@
+// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
+// Copyright (c) 2014 - 2015 Evol developers
+
+#ifndef EVOL_MAP_SKILLD
+#define EVOL_MAP_SKILLD
+
+struct SkilldExt;
+
+struct SkilldExt *skilld_init(void);
+
+struct SkilldExt *skilld_get(const int skill_idx);
+
+#endif // EVOL_MAP_SKILLD