mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/Spells): Adjust ownership and follow logic for guardian summons. (#19599)
* Init. * Remove totem ownership transfer.
This commit is contained in:
@@ -5938,9 +5938,6 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
|||||||
if (!caster)
|
if (!caster)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (caster->IsTotem())
|
|
||||||
caster = caster->ToTotem()->GetOwner();
|
|
||||||
|
|
||||||
// in another case summon new
|
// in another case summon new
|
||||||
uint8 summonLevel = caster->GetLevel();
|
uint8 summonLevel = caster->GetLevel();
|
||||||
|
|
||||||
@@ -6054,14 +6051,6 @@ void Spell::SummonGuardian(uint32 i, uint32 entry, SummonPropertiesEntry const*
|
|||||||
//else if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && m_targets.HasDst())
|
//else if (summon->HasUnitTypeMask(UNIT_MASK_MINION) && m_targets.HasDst())
|
||||||
// ((Minion*)summon)->SetFollowAngle(m_caster->GetAngle(summon));
|
// ((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)
|
if (properties && properties->Category == SUMMON_CATEGORY_ALLY)
|
||||||
summon->SetFaction(caster->GetFaction());
|
summon->SetFaction(caster->GetFaction());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user