summaryrefslogtreecommitdiff
path: root/src/map/data
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-29 01:07:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-29 01:07:45 +0300
commit2fbf69ebe75abceb55a66b62bfd4220d3833108d (patch)
tree831447a229257b7a04b62e905d535d38dee2027d /src/map/data
parent99875f9bf3b221ff507e507eeb9f50f4313c32b7 (diff)
downloadevol-hercules-2fbf69ebe75abceb55a66b62bfd4220d3833108d.tar.gz
evol-hercules-2fbf69ebe75abceb55a66b62bfd4220d3833108d.tar.bz2
evol-hercules-2fbf69ebe75abceb55a66b62bfd4220d3833108d.tar.xz
evol-hercules-2fbf69ebe75abceb55a66b62bfd4220d3833108d.zip
Set default npc gender to 3 (no gender).
Diffstat (limited to 'src/map/data')
-rw-r--r--src/map/data/npcd.c9
-rw-r--r--src/map/data/npcd.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/map/data/npcd.c b/src/map/data/npcd.c
index 8d770e7..29e48a7 100644
--- a/src/map/data/npcd.c
+++ b/src/map/data/npcd.c
@@ -10,27 +10,28 @@
#include "../../../common/mmo.h"
#include "../../../common/socket.h"
#include "../../../common/strlib.h"
+#include "../../../map/npc.h"
#include "map/data/npcd.h"
#include "map/struct/npcdext.h"
-struct NpcdExt *mapd_get(npc_data *nd)
+struct NpcdExt *npcd_get(struct npc_data *nd)
{
struct NpcdExt *data = getFromNPCD(nd, 0);
if (!data)
{
- data = mapd_create();
+ data = npcd_create();
addToNPCD(nd, data, 0, true);
}
return data;
}
-struct NpcdExt *mapd_create(void)
+struct NpcdExt *npcd_create(void)
{
struct NpcdExt *data = NULL;
CREATE(data, struct NpcdExt, 1);
if (!data)
return NULL;
-// data->x = y;
+ data->init = false;
return data;
}
diff --git a/src/map/data/npcd.h b/src/map/data/npcd.h
index dacd861..986e793 100644
--- a/src/map/data/npcd.h
+++ b/src/map/data/npcd.h
@@ -6,7 +6,7 @@
struct NpcdExt;
-struct NpcdExt *npcd_get(int fd);
+struct NpcdExt *npcd_get(struct npc_data *nd);
struct NpcdExt *npcd_create(void);
#endif // EVOL_MAP_NPCD