diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-04-14 01:24:40 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-04-14 01:24:40 +0200 |
commit | 135f244143cb4a1b167d0480ca897857465845e4 (patch) | |
tree | 11c55f01719c7bdeb5301337105dc9609be6ba71 /src | |
parent | 4d231501a516b94eb380bdf9c6c3bcb37dd32ecb (diff) | |
download | hercules-135f244143cb4a1b167d0480ca897857465845e4.tar.gz hercules-135f244143cb4a1b167d0480ca897857465845e4.tar.bz2 hercules-135f244143cb4a1b167d0480ca897857465845e4.tar.xz hercules-135f244143cb4a1b167d0480ca897857465845e4.zip |
Apply code style to pet_ai_sub_foreachclient()
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pet.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 68d2f3b58..13ee3a74f 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -1128,12 +1128,22 @@ static int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, int return 0; } +/** + * Calls pet_ai_sub_hard() for a character's pet if conditions are fulfilled. + * + * @param sd The character. + * @param ap Additional arguments. In this case only the time stamp of pet AI timer execution. + * @return Always 0. + * + **/ static int pet_ai_sub_foreachclient(struct map_session_data *sd, va_list ap) { - int64 tick = va_arg(ap,int64); nullpo_ret(sd); + + int64 tick = va_arg(ap, int64); + if (sd->bl.prev != NULL && sd->status.pet_id != 0 && sd->pd != NULL && sd->pd->bl.prev != NULL) - pet->ai_sub_hard(sd->pd,sd,tick); + pet->ai_sub_hard(sd->pd, sd, tick); return 0; } |