summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-11-28 23:33:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-11-28 23:33:52 +0300
commit674092152236dca6784081e5e93540069b54549e (patch)
tree3bf5030577d349b22f803158f20cdbb4426f913a /src/map/mob.c
parent489c589e3e0f9344ee2af40c04bbdcca30ab7696 (diff)
downloadhercules-674092152236dca6784081e5e93540069b54549e.tar.gz
hercules-674092152236dca6784081e5e93540069b54549e.tar.bz2
hercules-674092152236dca6784081e5e93540069b54549e.tar.xz
hercules-674092152236dca6784081e5e93540069b54549e.zip
Add function for create npc.
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index cb22f71c0..629653c8d 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -141,14 +141,9 @@ void mvptomb_create(struct mob_data *md, char *killer, time_t time)
if ( md->tomb_nid )
mob->mvptomb_destroy(md);
- CREATE(nd, struct npc_data, 1);
-
- nd->bl.id = md->tomb_nid = npc->get_new_npc_id();
-
+ nd = npc->create_npc(md->bl.m, md->bl.x, md->bl.y);
+ md->tomb_nid = nd->bl.id;
nd->dir = md->ud.dir;
- nd->bl.m = md->bl.m;
- nd->bl.x = md->bl.x;
- nd->bl.y = md->bl.y;
nd->bl.type = BL_NPC;
safestrncpy(nd->name, msg_txt(856), sizeof(nd->name)); // "Tomb"