From 5a466da96cd1134c444632b1dd9b4cb334704aa9 Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Tue, 1 Aug 2023 15:28:13 -0400 Subject: [PATCH] [Feature] Add Support for Drakkin Heritage Illusions (#3521) # Notes - Fixes an issue where Drakkin illusions that used different Drakkin Heritages were not properly applying the Drakkin Heritage due to not sending the Face Appearance. --- zone/spell_effects.cpp | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 0a3e3a67b..9b3116942 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -10245,7 +10245,7 @@ void Mob::ApplySpellEffectIllusion(int32 spell_id, Mob *caster, int buffslot, in gender_id ); - if (base != RACE_ELEMENTAL_75) { + if (base != RACE_ELEMENTAL_75 && base != RACE_DRAKKIN_522) { if (max > 0) { if (limit == 0) { SendIllusionPacket( @@ -10285,7 +10285,7 @@ void Mob::ApplySpellEffectIllusion(int32 spell_id, Mob *caster, int buffslot, in } ); } - } else { + } else if (base == RACE_ELEMENTAL_75){ SendIllusionPacket( AppearanceStruct{ .gender_id = static_cast(gender_id), @@ -10293,6 +10293,28 @@ void Mob::ApplySpellEffectIllusion(int32 spell_id, Mob *caster, int buffslot, in .texture = static_cast(limit), } ); + } else if (base == RACE_DRAKKIN_522) { + FaceChange_Struct f{ + .haircolor = GetHairColor(), + .beardcolor = GetBeardColor(), + .eyecolor1 = GetEyeColor1(), + .eyecolor2 = GetEyeColor2(), + .hairstyle = GetHairStyle(), + .beard = GetBeard(), + .face = GetLuclinFace(), + .drakkin_heritage = static_cast(limit), + .drakkin_tattoo = GetDrakkinTattoo(), + .drakkin_details = GetDrakkinDetails(), + }; + + SendIllusionPacket( + AppearanceStruct{ + .gender_id = static_cast(gender_id), + .race_id = static_cast(base), + } + ); + + SetFaceAppearance(f); } SendAppearancePacket(AT_Size, race_size);