summaryrefslogtreecommitdiff
path: root/src/map/unit.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/unit.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/unit.c')
-rw-r--r--src/map/unit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 56ddb5917..015f755bb 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -898,7 +898,7 @@ static int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int eas
} else
npc->untouch_areanpc(sd, bl->m, bl->x, bl->y);
- 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)
{ // Check if pet needs to be teleported. [Skotlex]
int flag = 0;
struct block_list* pbl = &sd->pd->bl;
@@ -2722,7 +2722,7 @@ static int unit_remove_map(struct block_list *bl, enum clr_type clrtype, const c
case BL_PET:
{
struct pet_data *pd = BL_UCAST(BL_PET, bl);
- if( pd->pet.intimate <= 0 && !(pd->msd && !pd->msd->state.active) ) {
+ if (pd->pet.intimate <= PET_INTIMACY_NONE && !(pd->msd && !pd->msd->state.active)) {
//If logging out, this is deleted on unit->free
clif->clearunit_area(bl,clrtype);
map->delblock(bl);
@@ -2936,7 +2936,7 @@ static int unit_free(struct block_list *bl, enum clr_type clrtype)
aFree (pd->loot);
pd->loot = NULL;
}
- if (pd->pet.intimate > 0) {
+ if (pd->pet.intimate > PET_INTIMACY_NONE) {
intif->save_petdata(pd->pet.account_id,&pd->pet);
} else {
//Remove pet.