Skip to content

Commit

Permalink
fix(Core/Spells): Revert ownership and follow logic adjustment for gu…
Browse files Browse the repository at this point in the history
…ardian summons. (azerothcore#19664)

Revert "fix(Core/Spells): Adjust ownership and follow logic for guardian summ…"

This reverts commit cc2ef9d.
  • Loading branch information
heyitsbench authored Aug 17, 2024
1 parent a691ad3 commit adff3c3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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());

Expand Down

0 comments on commit adff3c3

Please sign in to comment.