summaryrefslogtreecommitdiff
path: root/src/map/party.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/party.c')
-rw-r--r--src/map/party.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/src/map/party.c b/src/map/party.c
index db285a4b4..4735dfc42 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -103,16 +103,8 @@ 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);
+ p->hdata = NULL;
}
return 0;
}
@@ -608,16 +600,9 @@ 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);
+ p->hdata = NULL;
+
idb_remove(party->db,party_id);
return 0;
}