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/map/chrif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index 8edeb9efb..252bb3aaf 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -872,7 +872,7 @@ int chrif_changedsex(int fd) if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER) { // remove specifical skills of Bard classes for(i = 315; i <= 322; i++) { - if (sd->status.skill[i].id > 0 && !sd->status.skill[i].flag) { + if (sd->status.skill[i].id > 0 && sd->status.skill[i].flag == SKILL_FLAG_PERMANENT) { sd->status.skill_point += sd->status.skill[i].lv; sd->status.skill[i].id = 0; sd->status.skill[i].lv = 0; @@ -880,7 +880,7 @@ int chrif_changedsex(int fd) } // remove specifical skills of Dancer classes for(i = 323; i <= 330; i++) { - if (sd->status.skill[i].id > 0 && !sd->status.skill[i].flag) { + if (sd->status.skill[i].id > 0 && sd->status.skill[i].flag == SKILL_FLAG_PERMANENT) { sd->status.skill_point += sd->status.skill[i].lv; sd->status.skill[i].id = 0; sd->status.skill[i].lv = 0; -- cgit v1.2.3-60-g2f50