summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-04-05 23:10:48 +0200
committerGitHub <noreply@github.com>2020-04-05 23:10:48 +0200
commitc7ad2580c502dfed6d4fe34907758cd93ddfded3 (patch)
tree6fe8bab9014587acbc09bf0750afabee840c6199 /src/map/unit.c
parentb996ad73974b282a15db217fcbac5f284be3fdd5 (diff)
parentfb0e6a0172124df95ce32d6ad0b3b4cb85747f6d (diff)
downloadhercules-c7ad2580c502dfed6d4fe34907758cd93ddfded3.tar.gz
hercules-c7ad2580c502dfed6d4fe34907758cd93ddfded3.tar.bz2
hercules-c7ad2580c502dfed6d4fe34907758cd93ddfded3.tar.xz
hercules-c7ad2580c502dfed6d4fe34907758cd93ddfded3.zip
Merge pull request #2600 from Kenpachi2k13/issue#2434
Preparation for upcoming pet DB update.
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.