mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
pet related
This commit is contained in:
parent
d4f2569f91
commit
d85b562629
@ -35,6 +35,8 @@ bool FollowAction::Execute(Event event)
|
|||||||
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
||||||
pet->GetCharmInfo()->SetIsFollowing(true);
|
pet->GetCharmInfo()->SetIsFollowing(true);
|
||||||
pet->AttackStop();
|
pet->AttackStop();
|
||||||
|
pet->GetCharmInfo()->IsReturning();
|
||||||
|
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//if (moved)
|
//if (moved)
|
||||||
|
|||||||
@ -1237,6 +1237,8 @@ bool FleeWithPetAction::Execute(Event event)
|
|||||||
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
||||||
pet->GetCharmInfo()->SetIsFollowing(true);
|
pet->GetCharmInfo()->SetIsFollowing(true);
|
||||||
pet->AttackStop();
|
pet->AttackStop();
|
||||||
|
pet->GetCharmInfo()->IsReturning();
|
||||||
|
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,11 +18,11 @@ bool MediumManaTrigger::IsActive()
|
|||||||
|
|
||||||
bool NoPetTrigger::IsActive()
|
bool NoPetTrigger::IsActive()
|
||||||
{
|
{
|
||||||
return !AI_VALUE(Unit*, "pet target") && !AI_VALUE2(bool, "mounted", "self target");
|
return !AI_VALUE(Unit*, "pet target") && !bot->GetGuardianPet() && !AI_VALUE2(bool, "mounted", "self target");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HasPetTrigger::IsActive() {
|
bool HasPetTrigger::IsActive() {
|
||||||
return AI_VALUE(Unit*, "pet target") && !AI_VALUE2(bool, "mounted", "self target");;
|
return (AI_VALUE(Unit*, "pet target") || bot->GetGuardianPet()) && !AI_VALUE2(bool, "mounted", "self target");;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HighManaTrigger::IsActive()
|
bool HighManaTrigger::IsActive()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user