diff --git a/src/map/pc.cpp b/src/map/pc.cpp index a99705383b..4f4290e4af 100755 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -9680,8 +9680,6 @@ int pc_dead(map_session_data *sd,struct block_list *src) struct pet_data *pd = sd->pd; if( !mapdata->flag[MF_NOEXPPENALTY] ) { pet_set_intimate(pd, pd->pet.intimate + pd->get_pet_db()->die); - if( pd->pet.intimate <= PET_INTIMATE_NONE ) - pet_set_intimate(pd, PET_INTIMATE_NONE); clif_send_petdata(sd,sd->pd,1,pd->pet.intimate); } if( sd->pd->target_id ) // Unlock all targets... diff --git a/src/map/pet.cpp b/src/map/pet.cpp index bf3d6977cf..6d1c595036 100644 --- a/src/map/pet.cpp +++ b/src/map/pet.cpp @@ -629,13 +629,13 @@ int16 pet_get_card3_intimacy( int intimacy ){ /** * Set the value of the pet's intimacy. * @param pd : pet requesting - * @param value : new intimacy value + * @param value : new intimacy value. Will be bounded by PET_INTIMATE_NONE and PET_INTIMATE_MAX */ void pet_set_intimate(struct pet_data *pd, int value) { nullpo_retv(pd); - pd->pet.intimate = min(value, PET_INTIMATE_MAX); + pd->pet.intimate = cap_value(value, PET_INTIMATE_NONE, PET_INTIMATE_MAX); map_session_data *sd = pd->master; @@ -863,7 +863,6 @@ static TIMER_FUNC(pet_hungry){ pet_set_intimate(pd, pd->pet.intimate + pet_db_ptr->hungry_intimacy_dec); if( pd->pet.intimate <= PET_INTIMATE_NONE ) { - pet_set_intimate(pd, PET_INTIMATE_NONE); pd->status.speed = pd->get_pet_walk_speed(); } @@ -1620,7 +1619,6 @@ int pet_food(map_session_data *sd, struct pet_data *pd) if (pd->pet.hungry > PET_HUNGRY_SATISFIED) { pet_set_intimate(pd, pd->pet.intimate + pet_db_ptr->r_full); if (pd->pet.intimate <= PET_INTIMATE_NONE) { - pet_set_intimate(pd, PET_INTIMATE_NONE); pet_stop_attack(pd); pd->status.speed = pd->get_pet_walk_speed(); }