fix(Core/Pets): Manual using pet spell should not reset attack command. (#9635)

Fixes #9632
This commit is contained in:
UltraNix
2022-01-16 20:44:21 +01:00
committed by GitHub
parent d3956f3142
commit 19b68ffb57
4 changed files with 13 additions and 11 deletions

View File

@@ -727,6 +727,8 @@ void Pet::Update(uint32 diff)
GetMotionMaster()->Clear(false);
GetMotionMaster()->MoveIdle();
bool oldCmdAttack = GetCharmInfo()->IsCommandAttack();
GetCharmInfo()->SetIsCommandAttack(false);
GetCharmInfo()->SetIsAtStay(true);
GetCharmInfo()->SetIsCommandFollow(false);
@@ -734,6 +736,8 @@ void Pet::Update(uint32 diff)
GetCharmInfo()->SetIsReturning(false);
GetCharmInfo()->SaveStayPosition(true);
GetCharmInfo()->SetIsCommandAttack(oldCmdAttack);
AddSpellCooldown(tempspell, 0, spellInfo->IsCooldownStartedOnEvent() ? infinityCooldownDelay : 0);
CastSpell(tempspellTarget, tempspell, false);