From 9b6610e12b484d9bb4b295a5fc609a3eed7f9940 Mon Sep 17 00:00:00 2001 From: ultramage Date: Wed, 22 Jun 2011 20:11:48 +0000 Subject: Added enum e_skill_flag to represent the values of struct s_skill's complicated 'flag' field. Reordered the enum values so SKILL_FLAG_REPLACED_LV_0 goes last and arithmetic can be done on it safely (for storing skill level values). This also adds support for skill levels higher than 10. Fixed several places where SKILL_FLAG_TEMPORARY was not handled properly, and instead was considered as one of the saved skill level values (resulting in skill level -1). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14861 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/mmo.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/common') diff --git a/src/common/mmo.h b/src/common/mmo.h index c45cec9a0..e5e7709bc 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -207,8 +207,19 @@ struct point { short x,y; }; +enum e_skill_flag +{ + SKILL_FLAG_PERMANENT, + SKILL_FLAG_TEMPORARY, + SKILL_FLAG_PLAGIARIZED, + SKILL_FLAG_REPLACED_LV_0, // temporary skill overshadowing permanent skill of level 'N - SKILL_FLAG_REPLACED_LV_0' + //... +}; + struct s_skill { - unsigned short id,lv,flag; + unsigned short id; + unsigned short lv; + unsigned short flag; // see enum e_skill_flag }; struct global_reg { -- cgit v1.2.3-60-g2f50