diff options
author | shennetsind <notind@gmail.com> | 2013-08-08 11:19:02 -0700 |
---|---|---|
committer | shennetsind <notind@gmail.com> | 2013-08-08 11:19:02 -0700 |
commit | 1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f (patch) | |
tree | cbfd9f0847cb5b9e65cd77ab4e8861f34165c67d /src/map/unit.c | |
parent | defac0ef9714121a872ab48c3f6c4ddd177ae509 (diff) | |
parent | 04db720ee56ad8ddddf4255575c5d60e2c214a13 (diff) | |
download | hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.gz hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.bz2 hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.xz hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.zip |
Merge pull request #83 from HerculesWS/HPMUpdateR2
Hercules Plugin Manager Update
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 9becb128e..41d661169 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -8,6 +8,7 @@ #include "../common/db.h" #include "../common/malloc.h" #include "../common/random.h" +#include "../common/HPM.h" #include "map.h" #include "path.h" @@ -2330,6 +2331,7 @@ int unit_free(struct block_list *bl, clr_type clrtype) { struct map_session_data *sd = (struct map_session_data*)bl; int i; + unsigned int k; if( iStatus->isdead(bl) ) pc->setrestartvalue(sd,2); @@ -2397,6 +2399,15 @@ int unit_free(struct block_list *bl, clr_type clrtype) aFree(sd->queues); sd->queues = NULL; } + + for( k = 0; k < sd->hdatac; k++ ) { + if( sd->hdata[k]->flag.free ) { + aFree(sd->hdata[k]->data); + aFree(sd->hdata[k]); + } + } + if( sd->hdata ) + aFree(sd->hdata); break; } case BL_PET: |