summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-02-13 08:29:47 +0100
committerHaru <haru@dotalux.com>2020-04-05 21:20:35 +0200
commit09e291009156002e83566afe7a10b6509f5463f5 (patch)
treefd1d323198764c61892f9da7962e1442e2a86a1b /src/map/pc.c
parent554e54afebf3eed9d6293a7891c66320af2586a0 (diff)
downloadhercules-09e291009156002e83566afe7a10b6509f5463f5.tar.gz
hercules-09e291009156002e83566afe7a10b6509f5463f5.tar.bz2
hercules-09e291009156002e83566afe7a10b6509f5463f5.tar.xz
hercules-09e291009156002e83566afe7a10b6509f5463f5.zip
Add enum for pet intimacy levels and use its constants
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 6dba997ef..33deb780b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5920,7 +5920,7 @@ static int pc_setpos(struct map_session_data *sd, unsigned short map_index, int
sd->regen.state.gc = 1;
}
- if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 ) {
+ if (sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > PET_INTIMACY_NONE) {
sd->pd->bl.m = m;
sd->pd->bl.x = sd->pd->ud.to_x = x;
sd->pd->bl.y = sd->pd->ud.to_y = y;
@@ -8046,8 +8046,8 @@ static int pc_dead(struct map_session_data *sd, struct block_list *src)
struct pet_data *pd = sd->pd;
if( !map->list[sd->bl.m].flag.noexppenalty ) {
pet->set_intimate(pd, pd->pet.intimate - pd->petDB->die);
- if( pd->pet.intimate < 0 )
- pd->pet.intimate = 0;
+ if (pd->pet.intimate < PET_INTIMACY_NONE)
+ pd->pet.intimate = PET_INTIMACY_NONE;
clif->send_petdata(sd,sd->pd,1,pd->pet.intimate);
}
if( sd->pd->target_id ) // Unlock all targets...