From adff3c3846b3f65a58dbb50a1cac188b7c8a888e Mon Sep 17 00:00:00 2001 From: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> Date: Sat, 17 Aug 2024 19:29:21 -0400 Subject: [PATCH] fix(Core/Spells): Revert ownership and follow logic adjustment for guardian summons. (#19664) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "fix(Core/Spells): Adjust ownership and follow logic for guardian summ…" This reverts commit cc2ef9d6dd133c3855cb0ac4c4c61bbd768b1cdb. --- src/server/game/Spells/SpellEffects.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 0995d515f..9e1d22a08 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -5935,6 +5935,9 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* if (!caster) return; + if (caster->IsTotem()) + caster = caster->ToTotem()->GetOwner(); + // in another case summon new uint8 summonLevel = caster->GetLevel(); @@ -6048,6 +6051,14 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const* //else if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && m_targets.HasDst()) // ((Minion*)summon)->SetFollowAngle(m_caster->GetAngle(summon)); + // xinef: move this here, some auras are added in initstatsforlevel! + if (!summon->IsInCombat() && !summon->IsTrigger()) + { + // summon->AI()->EnterEvadeMode(); + summon->GetMotionMaster()->Clear(false); + summon->GetMotionMaster()->MoveFollow(caster, PET_FOLLOW_DIST, summon->GetFollowAngle(), MOTION_SLOT_ACTIVE); + } + if (properties && properties->Category == SUMMON_CATEGORY_ALLY) summon->SetFaction(caster->GetFaction());