summaryrefslogtreecommitdiff
path: root/src/emap/data
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-09 23:06:53 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-09 23:06:53 +0300
commit47aa7431432a2d9a41b949af5c2d4d7ab4db3461 (patch)
tree1e129f1c278413b495d94b811aafa22c61280222 /src/emap/data
parentcdab2778ae73dcad36fbeac8d827732440a321e3 (diff)
downloadevol-hercules-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.tar.gz
evol-hercules-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.tar.bz2
evol-hercules-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.tar.xz
evol-hercules-47aa7431432a2d9a41b949af5c2d4d7ab4db3461.zip
Move misc effect id for mass provoke skill into skills configuration.
Diffstat (limited to 'src/emap/data')
-rw-r--r--src/emap/data/skilld.c22
-rw-r--r--src/emap/data/skilld.h9
2 files changed, 25 insertions, 6 deletions
diff --git a/src/emap/data/skilld.c b/src/emap/data/skilld.c
index ce39993..d2c355b 100644
--- a/src/emap/data/skilld.c
+++ b/src/emap/data/skilld.c
@@ -20,7 +20,7 @@
struct SkilldExt skilld_arr[MAX_SKILL_DB];
-struct SkilldExt *skilld_init(void)
+void skilld_init(void)
{
for (int f = 0; f < MAX_SKILL_DB; f ++)
{
@@ -31,8 +31,22 @@ struct SkilldExt *skilld_init(void)
}
}
-struct SkilldExt *skilld_get(const int skill_idx)
+struct SkilldExt *skilld_get(const int idx)
{
- Assert_retr(NULL, skill_idx >= 0 && skill_idx < MAX_SKILL_DB);
- return &skilld_arr[skill_idx];
+ Assert_retr(NULL, idx >= 0 && idx < MAX_SKILL_DB);
+ return &skilld_arr[idx];
+}
+
+struct SkilldExt *skilld_get_id(const int skill_id)
+{
+ Assert_retr(NULL, skill_id >= 0 && skill_id < MAX_SKILL_ID);
+ return &skilld_arr[skill->get_index(skill_id)];
+}
+
+int skilld_get_misceffect(const int skill_id,
+ const int effect_idx)
+{
+ Assert_retr(-1, skill_id >= 0 && skill_id < MAX_SKILL_ID);
+ Assert_retr(-1, effect_idx >= 0 && effect_idx < SKILLD_MAXMISCEFFECTS);
+ return skilld_arr[skill->get_index(skill_id)].miscEffects[effect_idx];
}
diff --git a/src/emap/data/skilld.h b/src/emap/data/skilld.h
index 0039c47..042f85f 100644
--- a/src/emap/data/skilld.h
+++ b/src/emap/data/skilld.h
@@ -6,8 +6,13 @@
struct SkilldExt;
-struct SkilldExt *skilld_init(void);
+void skilld_init(void);
-struct SkilldExt *skilld_get(const int skill_idx);
+struct SkilldExt *skilld_get(const int idx);
+
+struct SkilldExt *skilld_get_id(const int skill_id);
+
+int skilld_get_misceffect(const int skill_id,
+ const int effect_idx);
#endif // EVOL_MAP_SKILLD