From 09d5c20572424e7a92dff5cf560001278c6ffaa0 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 30 Oct 2017 01:59:04 +0100 Subject: Reduce confusion between skill IDs and skill DB indexes (part 2) Remove MAX_SKILL in favor of MAX_SKILL_DB, when referring to the maximum skill DB index. This is opposed to MAX_SKILL_ID, the maximum skill ID. Signed-off-by: Haru --- src/common/mmo.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/mmo.h b/src/common/mmo.h index 52f68b719..6a0e75ca5 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -139,8 +139,8 @@ #endif #define MAX_FAME 1000000000 #define MAX_CART 100 -#ifndef MAX_SKILL -#define MAX_SKILL 1510 +#ifndef MAX_SKILL_DB +#define MAX_SKILL_DB 1510 ///< Maximum number of skills in the skill DB (compacted array size) #endif #ifndef MAX_SKILL_ID #define MAX_SKILL_ID 10015 // [Ind/Hercules] max used skill ID @@ -635,7 +635,7 @@ struct mmo_charstatus { struct point last_point,save_point,memo_point[MAX_MEMOPOINTS]; struct item inventory[MAX_INVENTORY],cart[MAX_CART]; - struct s_skill skill[MAX_SKILL]; + struct s_skill skill[MAX_SKILL_DB]; struct s_friend friends[MAX_FRIENDS]; //New friend system [Skotlex] #ifdef HOTKEY_SAVING @@ -1203,4 +1203,8 @@ enum hz_char_ask_name_answer { #error MAX_SLOTS it too small #endif +#ifdef MAX_SKILL +#error MAX_SKILL has been replaced by MAX_SKILL_DB. Please update your custom definitions. +#endif + #endif /* COMMON_MMO_H */ -- cgit v1.2.3-70-g09d2