summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-07-14 04:11:27 +0200
committerHaru <haru@dotalux.com>2016-07-14 04:11:27 +0200
commit6c0b298c869913105e4c4d29a6580bf68cd89f55 (patch)
tree608154d6fb2e2a220249fd711c6e23fa8cb98937 /src/map/pc.c
parentd85daf0f76485c8a3f065d79fb23dc3566aa81cd (diff)
downloadhercules-6c0b298c869913105e4c4d29a6580bf68cd89f55.tar.gz
hercules-6c0b298c869913105e4c4d29a6580bf68cd89f55.tar.bz2
hercules-6c0b298c869913105e4c4d29a6580bf68cd89f55.tar.xz
hercules-6c0b298c869913105e4c4d29a6580bf68cd89f55.zip
Changed mmo_charstatus::status_point and mmo_charstatus::skill_point to int
Fixes several -Wsign-compare issues Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 29eb5e45e..fd4101868 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1762,13 +1762,13 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
if (sd->change_level_3rd == 0) {
sd->change_level_2nd = pc->max_level[pc->class2idx(pc->mapid2jobid(sd->class_&MAPID_UPPERMASK, sd->status.sex))][1];
} else {
- sd->change_level_2nd = 1 + skill_point + (int)sd->status.skill_point // FIXME
+ sd->change_level_2nd = 1 + skill_point + sd->status.skill_point
- (sd->status.job_level - 1)
- (sd->change_level_3rd - 1)
- novice_skills;
}
} else {
- sd->change_level_2nd = 1 + skill_point + (int)sd->status.skill_point // FIXME
+ sd->change_level_2nd = 1 + skill_point + sd->status.skill_point
- (sd->status.job_level - 1)
- novice_skills;
@@ -1783,7 +1783,7 @@ int pc_calc_skilltree_normalize_job(struct map_session_data *sd)
} else if(sd->class_&JOBL_THIRD) { // limit 3rd class to 2nd class/trans job levels
// regenerate change_level_3rd
if (sd->change_level_3rd == 0) {
- sd->change_level_3rd = 1 + skill_point + (int)sd->status.skill_point // FIXME
+ sd->change_level_3rd = 1 + skill_point + sd->status.skill_point
- (sd->status.job_level - 1)
- (sd->change_level_2nd - 1)
- novice_skills;
@@ -6570,14 +6570,15 @@ int pc_checkbaselevelup(struct map_session_data *sd) {
return 0;
do {
+ int status_points = 0;
sd->status.base_exp -= next;
//Kyoki pointed out that the max overcarry exp is the exp needed for the previous level -1. [Skotlex]
if(!battle_config.multi_level_up && sd->status.base_exp > next-1)
sd->status.base_exp = next-1;
- next = pc->gets_status_point(sd->status.base_level);
+ status_points = pc->gets_status_point(sd->status.base_level);
sd->status.base_level++;
- sd->status.status_point += next;
+ sd->status.status_point += status_points;
} while ((next=pc->nextbaseexp(sd)) > 0 && sd->status.base_exp >= next);
@@ -6639,7 +6640,7 @@ int pc_checkjoblevelup(struct map_session_data *sd)
sd->status.job_exp = next-1;
sd->status.job_level++;
- sd->status.skill_point ++;
+ sd->status.skill_point++;
} while ((next=pc->nextjobexp(sd)) > 0 && sd->status.job_exp >= next);