mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
set pet react state to defensive during attack
This commit is contained in:
parent
01d4121ff8
commit
63573b5c7e
@ -104,13 +104,15 @@ bool AttackAction::Attack(Unit* target, bool with_pet /*true*/)
|
||||
|
||||
if (Pet* pet = bot->GetPet())
|
||||
{
|
||||
pet->SetReactState(REACT_PASSIVE);
|
||||
|
||||
if (with_pet) {
|
||||
pet->SetReactState(REACT_DEFENSIVE);
|
||||
pet->SetTarget(target->GetGUID());
|
||||
pet->GetCharmInfo()->SetCommandState(COMMAND_ATTACK);
|
||||
pet->GetCharmInfo()->SetIsCommandAttack(true);
|
||||
pet->AI()->AttackStart(target);
|
||||
} else {
|
||||
pet->SetReactState(REACT_PASSIVE);
|
||||
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
||||
pet->GetCharmInfo()->SetIsCommandFollow(true);
|
||||
pet->GetCharmInfo()->IsReturning();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user