summaryrefslogtreecommitdiff
path: root/src/emap/data
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-10-12 18:16:54 +0300
committerAndrei Karas <akaras@inbox.ru>2015-10-12 18:16:54 +0300
commite5e70b5d5afe465f7ee9e168a1747b8984beeee0 (patch)
treeacd0fccd8119fbd1d9759aa117f06bd72786f8c5 /src/emap/data
parent8487d3de9cf9e1775d4cdb17a83cf48d4d732064 (diff)
downloadevol-hercules-e5e70b5d5afe465f7ee9e168a1747b8984beeee0.tar.gz
evol-hercules-e5e70b5d5afe465f7ee9e168a1747b8984beeee0.tar.bz2
evol-hercules-e5e70b5d5afe465f7ee9e168a1747b8984beeee0.tar.xz
evol-hercules-e5e70b5d5afe465f7ee9e168a1747b8984beeee0.zip
Using 'WalkMask' in monsters moving.
Diffstat (limited to 'src/emap/data')
-rw-r--r--src/emap/data/mobd.c11
-rw-r--r--src/emap/data/mobd.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/emap/data/mobd.c b/src/emap/data/mobd.c
index c0dc9ca..cb55e05 100644
--- a/src/emap/data/mobd.c
+++ b/src/emap/data/mobd.c
@@ -20,6 +20,9 @@
struct MobdExt *mobd_get(struct mob_db *md)
{
+ if (!md)
+ return NULL;
+
struct MobdExt *data = getFromMOBDB(md, 0);
if (!data)
{
@@ -29,6 +32,14 @@ struct MobdExt *mobd_get(struct mob_db *md)
return data;
}
+struct MobdExt *mobd_get_by_mob(TBL_MOB *md)
+{
+ if (!mob)
+ return NULL;
+
+ return mobd_get(mob->db_data[md->class_]);
+}
+
struct MobdExt *mobd_create(void)
{
struct MobdExt *data = NULL;
diff --git a/src/emap/data/mobd.h b/src/emap/data/mobd.h
index 0e93890..d887c8f 100644
--- a/src/emap/data/mobd.h
+++ b/src/emap/data/mobd.h
@@ -5,8 +5,10 @@
#define EVOL_MAP_MOBD
struct MobdExt;
+struct mob_db;
struct MobdExt *mobd_get(struct mob_db *md);
+struct MobdExt *mobd_get_by_mob(TBL_MOB *md);
struct MobdExt *mobd_create(void);
#endif // EVOL_MAP_MOBD