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/common/mmo.h | |
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/common/mmo.h')
-rw-r--r-- | src/common/mmo.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/common/mmo.h b/src/common/mmo.h index 5816b467c..47257265f 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -119,7 +119,6 @@ #define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan] #define MAX_GUILDLEVEL 50 #define MAX_GUARDIANS 8 // Local max per castle. [Skotlex] -#define MAX_QUEST_DB 2670 // Max quests that the server will load #define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest #define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95] @@ -202,14 +201,19 @@ enum item_types { }; -// Questlog system [Kevin] [Inkfish] -typedef enum quest_state { Q_INACTIVE, Q_ACTIVE, Q_COMPLETE } quest_state; +// Questlog states +enum quest_state { + Q_INACTIVE, ///< Inactive quest (the user can toggle between active and inactive quests) + Q_ACTIVE, ///< Active quest + Q_COMPLETE, ///< Completed quest +}; +/// Questlog entry struct quest { - int quest_id; - unsigned int time; - int count[MAX_QUEST_OBJECTIVES]; - quest_state state; + int quest_id; ///< Quest ID + unsigned int time; ///< Expiration time + int count[MAX_QUEST_OBJECTIVES]; ///< Kill counters of each quest objective + enum quest_state state; ///< Current quest state }; struct item { |