From 604962fd2a7e69c812708d0cb9cfe4130e595ea2 Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Mon, 22 Jun 2020 05:58:12 +0200 Subject: Add pc_has_pet() macro --- src/map/pc.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/map/pc.h b/src/map/pc.h index f2e911af3..49ffcf3b0 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -727,6 +727,9 @@ END_ZEROED_BLOCK; /// Rune Knight Dragon #define pc_isridingdragon(sd) ( (sd)->sc.option&OPTION_DRAGON ) +// Check if character has a pet. +#define pc_has_pet(sd) ( (sd)->status.pet_id != 0 && (sd)->pd != NULL && (sd)->pd->pet.intimate > PET_INTIMACY_NONE ) + #define pc_stop_walking(sd, type) (unit->stop_walking(&(sd)->bl, (type))) #define pc_stop_attack(sd) (unit->stop_attack(&(sd)->bl)) -- cgit v1.2.3-60-g2f50