diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index a0c14a058..85de5301b 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2321,16 +2321,8 @@ int npc_unload(struct npc_data* nd, bool single) nd->ud = NULL; } - if (nd->hdata) { - unsigned int i; - for (i = 0; i < nd->hdatac; i++) { - if (nd->hdata[i]->flag.free) { - aFree(nd->hdata[i]->data); - } - aFree(nd->hdata[i]); - } - aFree(nd->hdata); - } + HPM->data_store_destroy(nd->hdata); + nd->hdata = NULL; aFree(nd); |