From 6f55c00e72ca6db130a84fe92218f73a777428f4 Mon Sep 17 00:00:00 2001 From: Haru Date: Wed, 27 Nov 2013 03:21:45 +0100 Subject: 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 --- src/map/pc.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/map/pc.h') diff --git a/src/map/pc.h b/src/map/pc.h index 2c802a896..5f81346d4 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -438,12 +438,11 @@ struct map_session_data { bool changed; // if true, should sync with charserver on next mailbox request } mail; - //Quest log system [Kevin] [Inkfish] - int num_quests; - int avail_quests; - int quest_index[MAX_QUEST_DB]; - struct quest quest_log[MAX_QUEST_DB]; - bool save_quest; + // Quest log system + int num_quests; ///< Number of entries in quest_log + int avail_quests; ///< Number of Q_ACTIVE and Q_INACTIVE entries in quest log (index of the first Q_COMPLETE entry) + struct quest *quest_log; ///< Quest log entries (note: Q_COMPLETE quests follow the first th enties + bool save_quest; ///< Whether the quest_log entries were modified and are waitin to be saved // temporary debug [flaviojs] const char* debug_file; -- cgit v1.2.3-70-g09d2