diff options
author | Haru <haru@dotalux.com> | 2015-12-05 21:13:23 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-12-05 21:13:23 +0100 |
commit | 1eecc1573a82bdcb48799179d156f37dbffba4a8 (patch) | |
tree | 6314b6a9ba6fb187f76028428a826c0833935da1 /src/map | |
parent | 81e02574f1d73807903bb611351581d7f9dc80e6 (diff) | |
download | hercules-1eecc1573a82bdcb48799179d156f37dbffba4a8.tar.gz hercules-1eecc1573a82bdcb48799179d156f37dbffba4a8.tar.bz2 hercules-1eecc1573a82bdcb48799179d156f37dbffba4a8.tar.xz hercules-1eecc1573a82bdcb48799179d156f37dbffba4a8.zip |
Fixed a client crash when a MVP Tombstone is created
- Follow-up to 57f09704
- Fixes #901, thanks to zackdreaver
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/npc.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 21970a42f..8a7998931 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2565,10 +2565,6 @@ bool npc_viewisid(const char * viewid) /** * Creates a new NPC. * - * @remark - * When creating a npc with subtype TOMB, no ID is assigned. The caller - * must assign the dead mob ID after the NPC is created. - * * @param subtype The NPC subtype. * @param m The map id. * @param x The x coordinate on map. @@ -2584,9 +2580,7 @@ struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, u CREATE(nd, struct npc_data, 1); nd->subtype = subtype; nd->bl.type = BL_NPC; - if (subtype != TOMB) { - nd->bl.id = npc->get_new_npc_id(); - } + nd->bl.id = npc->get_new_npc_id(); nd->bl.prev = nd->bl.next = NULL; nd->bl.m = m; nd->bl.x = x; |