summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-04-08 18:39:33 +0200
committerHaru <haru@dotalux.com>2018-11-14 18:44:17 +0100
commitcd634fbcefaa36bb9d05b0be071f8f23d408ea26 (patch)
treeee77b7469d8525bd6472a3d0931accfbee0ec7a9 /src/map/pc.c
parent86b70dc7ea0a6d3aee6d99a0f802668fc9a0eb75 (diff)
downloadhercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.tar.gz
hercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.tar.bz2
hercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.tar.xz
hercules-cd634fbcefaa36bb9d05b0be071f8f23d408ea26.zip
Use an enum as flag for status->heal() and related functions
This introduces the `enum status_heal_flag`. No functional changes are made. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b8a6912ee..ba2edf0f4 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -399,7 +399,7 @@ static int pc_banding(struct map_session_data *sd, uint16 skill_lv)
for( j = 0; j < i; j++ ) {
bsd = map->id2sd(b_sd[j]);
if( bsd != NULL ) {
- status->set_hp(&bsd->bl,hp,0); // Set hp
+ status->set_hp(&bsd->bl, hp, STATUS_HEAL_DEFAULT); // Set hp
if( (sc = status->get_sc(&bsd->bl)) != NULL && sc->data[SC_BANDING] ) {
sc->data[SC_BANDING]->val2 = c; // Set the counter. It doesn't count your self.
status_calc_bl(&bsd->bl, status->sc2scb_flag(SC_BANDING)); // Set atk and def.
@@ -524,9 +524,9 @@ static int pc_setrestartvalue(struct map_session_data *sd, int type)
if (type&1) {
//Normal resurrection
st->hp = 1; //Otherwise status->heal may fail if dead.
- status->heal(&sd->bl, bst->hp, 0, 1);
+ status->heal(&sd->bl, bst->hp, 0, STATUS_HEAL_FORCED);
if( st->sp < bst->sp )
- status->set_sp(&sd->bl, bst->sp, 1);
+ status->set_sp(&sd->bl, bst->sp, STATUS_HEAL_FORCED);
} else { //Just for saving on the char-server (with values as if respawned)
sd->status.hp = bst->hp;
sd->status.sp = (st->sp < bst->sp) ? bst->sp : st->sp;
@@ -8827,7 +8827,7 @@ static int pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp)
}
}
- return status->heal(&sd->bl, hp, sp, 1);
+ return status->heal(&sd->bl, hp, sp, STATUS_HEAL_FORCED);
}
/*==========================================
@@ -10878,7 +10878,7 @@ static void pc_regen(struct map_session_data *sd, unsigned int diff_tick)
}
if (hp > 0 || sp > 0)
- status->heal(&sd->bl, hp, sp, 0);
+ status->heal(&sd->bl, hp, sp, STATUS_HEAL_DEFAULT);
return;
}