diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-03-08 11:45:01 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-03-08 11:45:01 -0300 |
commit | 05c1c0552fe6c94d8835a58f4608d0402614ce39 (patch) | |
tree | 25c6cddf9cd1767835266171d26d86d04882fdee /src/map/unit.c | |
parent | 36b0aad136e42687ed5f5383f8d93128d73c398b (diff) | |
download | hercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.tar.gz hercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.tar.bz2 hercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.tar.xz hercules-05c1c0552fe6c94d8835a58f4608d0402614ce39.zip |
[TMW2] Hercules Ultimate Storage System
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 1e9433eaf..ba055da02 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2750,8 +2750,7 @@ static int unit_free(struct block_list *bl, enum clr_type clrtype) sd->combo_count = 0; /* [Ind/Hercules] */ if( sd->sc_display_count ) { - int i; - for(i = 0; i < sd->sc_display_count; i++) { + for (int i = 0; i < sd->sc_display_count; i++) { ers_free(pc->sc_display_ers, sd->sc_display[i]); } sd->sc_display_count = 0; @@ -2767,10 +2766,16 @@ static int unit_free(struct block_list *bl, enum clr_type clrtype) VECTOR_CLEAR(sd->channels); VECTOR_CLEAR(sd->script_queues); VECTOR_CLEAR(sd->achievement); // Achievement [Smokexyz/Hercules] - VECTOR_CLEAR(sd->storage.item); VECTOR_CLEAR(sd->hatEffectId); VECTOR_CLEAR(sd->title_ids); // Title [Dastgir/Hercules] - sd->storage.received = false; + + /* Storages */ + for (int i = 0; i < VECTOR_LENGTH(sd->storage.list); i++) { + VECTOR_CLEAR(VECTOR_INDEX(sd->storage.list, i).item); + VECTOR_INDEX(sd->storage.list, i).received = false; + } + VECTOR_CLEAR(sd->storage.list); + if( sd->quest_log != NULL ) { aFree(sd->quest_log); sd->quest_log = NULL; |