|
@@ -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();
|
|
|
}
|