From 0aa3c94ed5ea258ebe491adacb217b5035f6646f Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Mon, 4 Jan 2021 16:37:49 +0100 Subject: [PATCH] Added boss icons for pets (#5674) Fixes #5622 Thanks to @eppc0330 --- src/map/clif.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 1602c2e0a6..701e3b9f3e 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -1169,7 +1169,14 @@ static void clif_set_unit_idle( struct block_list* bl, bool walking, send_target p.maxHP = -1; p.HP = -1; } - p.isBoss = ( bl->type == BL_MOB ) ? ( (mob_data*)bl )->get_bosstype() : BOSSTYPE_NONE; + + if( bl->type == BL_MOB ){ + p.isBoss = ( (mob_data*)bl )->get_bosstype(); + }else if( bl->type == BL_PET ){ + p.isBoss = ( (pet_data*)bl )->db->get_bosstype(); + }else{ + p.isBoss = BOSSTYPE_NONE; + } #endif #if PACKETVER >= 20150513 p.body = vd->body_style; @@ -1304,7 +1311,13 @@ static void clif_spawn_unit( struct block_list *bl, enum send_target target ){ p.HP = -1; } - p.isBoss = ( bl->type == BL_MOB ) ? ( (mob_data*)bl )->get_bosstype() : BOSSTYPE_NONE; + if( bl->type == BL_MOB ){ + p.isBoss = ( (mob_data*)bl )->get_bosstype(); + }else if( bl->type == BL_PET ){ + p.isBoss = ( (pet_data*)bl )->db->get_bosstype(); + }else{ + p.isBoss = BOSSTYPE_NONE; + } #endif #if PACKETVER >= 20150513 p.body = vd->body_style; @@ -1406,7 +1419,13 @@ static void clif_set_unit_walking( struct block_list *bl, struct map_session_dat p.HP = -1; } - p.isBoss = ( bl->type == BL_MOB ) ? ( (mob_data*)bl )->get_bosstype() : BOSSTYPE_NONE; + if( bl->type == BL_MOB ){ + p.isBoss = ( (mob_data*)bl )->get_bosstype(); + }else if( bl->type == BL_PET ){ + p.isBoss = ( (pet_data*)bl )->db->get_bosstype(); + }else{ + p.isBoss = BOSSTYPE_NONE; + } #endif #if PACKETVER >= 20150513 p.body = vd->body_style;