diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-02-16 06:16:05 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2020-04-05 21:26:11 +0200 |
commit | 4743f12857d36994061b55477b2cec9b7e08aa3f (patch) | |
tree | 3061c38158ea14a8c3943d4070c08adad3649035 /src/map | |
parent | f2d400db6af94a90c34bb0d3927ad44899dfd6a8 (diff) | |
download | hercules-4743f12857d36994061b55477b2cec9b7e08aa3f.tar.gz hercules-4743f12857d36994061b55477b2cec9b7e08aa3f.tar.bz2 hercules-4743f12857d36994061b55477b2cec9b7e08aa3f.tar.xz hercules-4743f12857d36994061b55477b2cec9b7e08aa3f.zip |
Apply code style to pet_hungry_val() function
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pet.c | 16 |
1 files changed, 12 insertions, 4 deletions
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; |