diff options
author | Haru <haru@dotalux.com> | 2013-11-27 03:21:45 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2013-12-03 16:28:08 +0100 |
commit | 6f55c00e72ca6db130a84fe92218f73a777428f4 (patch) | |
tree | e3f25d1ad5b3dbb06371941fc9fd8cb66a5411a9 /src/map/unit.c | |
parent | 470ab15023f09dc823e8ce8ac818e0bbe8a95aef (diff) | |
download | hercules-6f55c00e72ca6db130a84fe92218f73a777428f4.tar.gz hercules-6f55c00e72ca6db130a84fe92218f73a777428f4.tar.bz2 hercules-6f55c00e72ca6db130a84fe92218f73a777428f4.tar.xz hercules-6f55c00e72ca6db130a84fe92218f73a777428f4.zip |
Questlog fixes
- Improved memory usage of the quest log system. (saves up to 75kB per
online character). Fixes issue #133.
- Fixed various issues with quest entries disappearing from characters
without an apparent reason, or monster kill counters getting stuck -
the issues were caused by a de-synchronization between the two
parallel questlog arrays in map_session_data.
- Added some code documentation.
- Thanks to Ind.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 872ad1f8b..28dd68e7d 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -2393,6 +2393,11 @@ int unit_free(struct block_list *bl, clr_type clrtype) { aFree(sd->queues); sd->queues = NULL; } + if( sd->quest_log != NULL ) { + aFree(sd->quest_log); + sd->quest_log = NULL; + sd->num_quests = sd->avail_quests = 0; + } for( k = 0; k < sd->hdatac; k++ ) { if( sd->hdata[k]->flag.free ) { |