diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-11 16:11:43 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-11 16:11:43 +0300 |
commit | 6c0f05b05e9bf09f40df3e3fe7f768f7435abcec (patch) | |
tree | 6973517e1821f128b36955fc258419131b98f7fc /src/map/party.c | |
parent | d70d9d4d19f0deae2a2aceb047872611d5047ae0 (diff) | |
parent | 845139091f0305d264800491ce25152856c20374 (diff) | |
download | hercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.tar.gz hercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.tar.bz2 hercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.tar.xz hercules-6c0f05b05e9bf09f40df3e3fe7f768f7435abcec.zip |
Merge pull request #760 from HerculesWS/738-vectors
Change several variable-size array to VECTOR (common, char)
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; } |