From c42b3ee258e734c4e93808e13dac397f284a7569 Mon Sep 17 00:00:00 2001 From: Saqra1 <161769195+Saqra1@users.noreply.github.com> Date: Wed, 11 Sep 2024 09:18:13 -0500 Subject: [PATCH] fix(Core/Pet): Control Infernal without enslave (#19784) Check SummonProperties Category(Control) too to decide the type of controls a Guardian should have. Don't enslave Warlock's Infernal --- .../game/Entities/Creature/TemporarySummon.cpp | 2 +- src/server/game/Spells/SpellEffects.cpp | 17 ----------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/server/game/Entities/Creature/TemporarySummon.cpp b/src/server/game/Entities/Creature/TemporarySummon.cpp index 86ea77673..9513d1fc9 100644 --- a/src/server/game/Entities/Creature/TemporarySummon.cpp +++ b/src/server/game/Entities/Creature/TemporarySummon.cpp @@ -419,7 +419,7 @@ std::string Minion::GetDebugInfo() const Guardian::Guardian(SummonPropertiesEntry const* properties, ObjectGuid owner, bool isWorldObject) : Minion(properties, owner, isWorldObject) { m_unitTypeMask |= UNIT_MASK_GUARDIAN; - if (properties && properties->Type == SUMMON_TYPE_PET) + if (properties && (properties->Type == SUMMON_TYPE_PET || properties->Category == SUMMON_CATEGORY_PET)) { m_unitTypeMask |= UNIT_MASK_CONTROLABLE_GUARDIAN; InitCharmInfo(); diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index aab419f79..5c16b3090 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -6064,23 +6064,6 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* ExecuteLogEffectSummonObject(i, summon); } - - // Summon infernal, cast enslave demon - // xinef: have to do it here because in Pet init stats infernal is not in world, imo this should be changed... - if (summon) - { - switch (m_spellInfo->Id) - { - // Inferno, Warlock summon spell - case 1122: - caster->AddAura(61191, summon); - break; - // Ritual of Doom, Warlock summon spell - case 60478: - caster->AddAura(SPELL_RITUAL_ENSLAVEMENT, summon); - break; - } - } } void Spell::EffectRenamePet(SpellEffIndex /*effIndex*/)