mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
set pet react state to defensive during attack
This commit is contained in:
@@ -104,13 +104,15 @@ bool AttackAction::Attack(Unit* target, bool with_pet /*true*/)
|
|||||||
|
|
||||||
if (Pet* pet = bot->GetPet())
|
if (Pet* pet = bot->GetPet())
|
||||||
{
|
{
|
||||||
pet->SetReactState(REACT_PASSIVE);
|
|
||||||
if (with_pet) {
|
if (with_pet) {
|
||||||
|
pet->SetReactState(REACT_DEFENSIVE);
|
||||||
pet->SetTarget(target->GetGUID());
|
pet->SetTarget(target->GetGUID());
|
||||||
pet->GetCharmInfo()->SetCommandState(COMMAND_ATTACK);
|
pet->GetCharmInfo()->SetCommandState(COMMAND_ATTACK);
|
||||||
pet->GetCharmInfo()->SetIsCommandAttack(true);
|
pet->GetCharmInfo()->SetIsCommandAttack(true);
|
||||||
pet->AI()->AttackStart(target);
|
pet->AI()->AttackStart(target);
|
||||||
} else {
|
} else {
|
||||||
|
pet->SetReactState(REACT_PASSIVE);
|
||||||
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
||||||
pet->GetCharmInfo()->SetIsCommandFollow(true);
|
pet->GetCharmInfo()->SetIsCommandFollow(true);
|
||||||
pet->GetCharmInfo()->IsReturning();
|
pet->GetCharmInfo()->IsReturning();
|
||||||
|
|||||||
Reference in New Issue
Block a user