mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 07:36:23 +00:00
fix(Core/Pets): Manual using pet spell should not reset attack command. (#9635)
Fixes #9632
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -19652,7 +19652,7 @@ void Unit::PetSpellFail(const SpellInfo* spellInfo, Unit* target, uint32 result)
|
||||
{
|
||||
AttackStop();
|
||||
charmInfo->SetIsAtStay(false);
|
||||
charmInfo->SetIsCommandAttack(!ToCreature()->HasReactState(REACT_PASSIVE));
|
||||
charmInfo->SetIsCommandAttack(true);
|
||||
charmInfo->SetIsReturning(false);
|
||||
charmInfo->SetIsFollowing(false);
|
||||
|
||||
@@ -19662,7 +19662,7 @@ void Unit::PetSpellFail(const SpellInfo* spellInfo, Unit* target, uint32 result)
|
||||
{
|
||||
AttackStop();
|
||||
charmInfo->SetIsAtStay(false);
|
||||
charmInfo->SetIsCommandAttack(!ToCreature()->HasReactState(REACT_PASSIVE));
|
||||
charmInfo->SetIsCommandAttack(true);
|
||||
charmInfo->SetIsReturning(false);
|
||||
charmInfo->SetIsFollowing(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user