diff options
author | shennetsind <ind@henn.et> | 2014-01-19 02:58:36 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-01-19 02:58:36 -0200 |
commit | acc992ac2838f6380ebf2b2f8a514e86c2b750d9 (patch) | |
tree | 9d06366b015de60c71280f92c48fadb024e04a0f /src/map/instance.c | |
parent | c32a22c52b75ae8c3bc2064110318f4ad1d6954a (diff) | |
download | hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.tar.gz hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.tar.bz2 hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.tar.xz hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.zip |
HPM Custom Data Struct Expansion: map/instance/party/guild
As requested by the community in http://hercules.ws/board/topic/3832-hpm-custom-data-struct-for-instance-data-guild-data-and-party-data/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/instance.c')
-rw-r--r-- | src/map/instance.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/instance.c b/src/map/instance.c index 7c092e6cb..a111751d0 100644 --- a/src/map/instance.c +++ b/src/map/instance.c @@ -11,6 +11,7 @@ #include "../common/strlib.h" #include "../common/utils.h" #include "../common/db.h" +#include "../common/HPM.h" #include "clif.h" #include "instance.h" @@ -568,6 +569,18 @@ void instance_destroy(int instance_id) { instance->list[instance_id].map = NULL; instance->list[instance_id].state = INSTANCE_FREE; instance->list[instance_id].num_map = 0; + + for( j = 0; j < instance->list[instance_id].hdatac; j++ ) { + if( instance->list[instance_id].hdata[j]->flag.free ) { + aFree(instance->list[instance_id].hdata[j]->data); + } + aFree(instance->list[instance_id].hdata[j]); + } + if( instance->list[instance_id].hdata ) + aFree(instance->list[instance_id].hdata); + + instance->list[instance_id].hdata = NULL; + instance->list[instance_id].hdatac = 0; } /*-------------------------------------- |