diff options
Diffstat (limited to 'src/map/party.c')
-rw-r--r-- | src/map/party.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/map/party.c b/src/map/party.c index db285a4b4..f7e7d431c 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -103,16 +103,7 @@ int party_db_final(DBKey key, DBData *data, va_list ap) { if (p->instance) aFree(p->instance); - if (p->hdata) { - int i; - for (i = 0; i < p->hdatac; i++) { - if (p->hdata[i]->flag.free) { - aFree(p->hdata[i]->data); - } - aFree(p->hdata[i]); - } - aFree(p->hdata); - } + HPM->data_store_destroy(&p->hdata); } return 0; } @@ -608,16 +599,8 @@ int party_broken(int party_id) if( p->instance ) aFree(p->instance); - if( p->hdata ) - { - for( j = 0; j < p->hdatac; j++ ) { - if( p->hdata[j]->flag.free ) { - aFree(p->hdata[j]->data); - } - aFree(p->hdata[j]); - } - aFree(p->hdata); - } + HPM->data_store_destroy(&p->hdata); + idb_remove(party->db,party_id); return 0; } |