summaryrefslogtreecommitdiff
path: root/src/map/npc.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-14 18:58:21 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-14 18:58:21 +0300
commitbe0300584a90945ae4f45d6775ffa2068887cb37 (patch)
treeb38c07f9aa0848c914f18b78dbd52b486795be96 /src/map/npc.h
parente2c12c429814d9c42eb2874cf639f709aa3e5ea4 (diff)
parent8be9ef957862e249a3a2e4f810be2cada31a4e94 (diff)
downloadhercules-be0300584a90945ae4f45d6775ffa2068887cb37.tar.gz
hercules-be0300584a90945ae4f45d6775ffa2068887cb37.tar.bz2
hercules-be0300584a90945ae4f45d6775ffa2068887cb37.tar.xz
hercules-be0300584a90945ae4f45d6775ffa2068887cb37.zip
Merge pull request #820 from HerculesWS/instancewarning
Fix a warning when loading instance duplicates (#812)
Diffstat (limited to 'src/map/npc.h')
-rw-r--r--src/map/npc.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/npc.h b/src/map/npc.h
index bf3d1494d..de403fe76 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -70,7 +70,7 @@ struct npc_data {
unsigned short stat_point;
struct npc_parse *chatdb;
- char* path;/* path dir */
+ const char *path; ///< Source path reference
enum npc_subtype subtype;
int src_id;
union {
@@ -111,6 +111,7 @@ struct npc_data {
enum actor_classes {
WARP_CLASS = 45,
HIDDEN_WARP_CLASS = 139,
+ MOB_TOMB = 565,
WARP_DEBUG_CLASS = 722,
FLAG_CLASS = 722,
INVISIBLE_CLASS = 32767,
@@ -225,10 +226,12 @@ struct npc_interface {
void (*clearsrcfile) (void);
void (*addsrcfile) (const char *name);
void (*delsrcfile) (const char *name);
+ const char *(*retainpathreference) (const char *filepath);
+ void (*releasepathreference) (const char *filepath);
void (*parsename) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath);
int (*parseview) (const char *w4, const char *start, const char *buffer, const char *filepath);
bool (*viewisid) (const char *viewid);
- struct npc_data* (*create_npc) (int m, int x, int y);
+ struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_);
struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y);
const char* (*parse_warp) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
const char* (*parse_shop) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int *retval);
@@ -236,6 +239,11 @@ struct npc_interface {
void (*convertlabel_db) (struct npc_label_list *label_list, const char *filepath);
const char* (*skip_script) (const char *start, const char *buffer, const char *filepath, int *retval);
const char* (*parse_script) (char *w1, char *w2, char *w3, char *w4, const char *start, const char *buffer, const char *filepath, int options, int *retval);
+ void (*add_to_location) (struct npc_data *nd);
+ bool (*duplicate_script_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
+ bool (*duplicate_shop_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
+ bool (*duplicate_warp_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
+ bool (*duplicate_sub) (struct npc_data *nd, const struct npc_data *snd, int xs, int ys, int options);
const char* (*parse_duplicate) (char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath, int options, int *retval);
int (*duplicate4instance) (struct npc_data *snd, int16 m);
void (*setcells) (struct npc_data *nd);