From 4743f12857d36994061b55477b2cec9b7e08aa3f Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sun, 16 Feb 2020 06:16:05 +0100 Subject: Apply code style to pet_hungry_val() function --- src/map/pet.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/map/pet.c b/src/map/pet.c index d112edfc1..810230a71 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -60,17 +60,25 @@ struct pet_interface *pet; #define MIN_PETTHINKTIME 100 +/** + * Gets a pet's hunger value, depending it's hunger level. + * This value is only used in clif_parse_LoadEndAck() when calling clif_pet_emotion(). + * + * @param pd The pet. + * @return The pet's hunger value. + * + **/ static int pet_hungry_val(struct pet_data *pd) { nullpo_ret(pd); - if(pd->pet.hungry > PET_HUNGER_SATISFIED) + if (pd->pet.hungry > PET_HUNGER_SATISFIED) return 4; - else if(pd->pet.hungry > PET_HUNGER_NEUTRAL) + else if (pd->pet.hungry > PET_HUNGER_NEUTRAL) return 3; - else if(pd->pet.hungry > PET_HUNGER_HUNGRY) + else if (pd->pet.hungry > PET_HUNGER_HUNGRY) return 2; - else if(pd->pet.hungry > PET_HUNGER_VERY_HUNGRY) + else if (pd->pet.hungry > PET_HUNGER_VERY_HUNGRY) return 1; else return 0; -- cgit v1.2.3-70-g09d2