summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-02 14:06:22 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-02 14:06:22 +0300
commit7b9a72c59e83b6c7ad373cbe5a9de357ecee6c89 (patch)
treec727d8c69e229d616060cc5d995288a3dfe0c72c /src
parent1cff2f51e9fded09e6e090a41f60af9ea188d134 (diff)
downloadplugin-7b9a72c59e83b6c7ad373cbe5a9de357ecee6c89.tar.gz
plugin-7b9a72c59e83b6c7ad373cbe5a9de357ecee6c89.tar.bz2
plugin-7b9a72c59e83b6c7ad373cbe5a9de357ecee6c89.tar.xz
plugin-7b9a72c59e83b6c7ad373cbe5a9de357ecee6c89.zip
Dehardcode mob ai flag MD_SURVIVE_WITHOUT_MASTER and change it value.
Diffstat (limited to 'src')
-rw-r--r--src/emap/mob.c6
-rw-r--r--src/emap/mob.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/emap/mob.c b/src/emap/mob.c
index 48bfdb1..f64c789 100644
--- a/src/emap/mob.c
+++ b/src/emap/mob.c
@@ -18,6 +18,8 @@
#include "map/itemdb.h"
#include "map/mob.h"
+#include "emap/mob.h"
+
#include "emap/data/mobd.h"
#include "emap/struct/mobdext.h"
@@ -38,7 +40,7 @@ int emob_deleteslave_sub(struct block_list *bl, va_list ap)
const int id = va_arg(ap, int);
if (md->master_id > 0 && md->master_id == id)
{
- if (md->db->status.mode & 0x8000)
+ if (md->db->status.mode & MD_SURVIVE_WITHOUT_MASTER)
{
md->master_id = 0;
md->master_dist = 0;
@@ -78,7 +80,7 @@ int emob_read_db_mode_sub_post(int retVal,
struct config_setting_t *t2;
if ((t2 = libconfig->setting_get_member(t, "SurviveWithoutMaster")))
- retVal |= libconfig->setting_get_bool(t2) ? 0x8000 : 0;
+ retVal |= libconfig->setting_get_bool(t2) ? MD_SURVIVE_WITHOUT_MASTER : 0;
return retVal;
}
diff --git a/src/emap/mob.h b/src/emap/mob.h
index 04d2bda..8ac76b0 100644
--- a/src/emap/mob.h
+++ b/src/emap/mob.h
@@ -4,6 +4,8 @@
#ifndef EVOL_MAP_MOB
#define EVOL_MAP_MOB
+#define MD_SURVIVE_WITHOUT_MASTER 0x0040000
+
int emob_deleteslave_sub(struct block_list *bl, va_list ap);
void emob_read_db_additional_fields(struct mob_db *entry,
struct config_setting_t *it,