pet related

This commit is contained in:
Yunfan Li
2023-05-30 01:06:23 +08:00
parent d4f2569f91
commit d85b562629
3 changed files with 6 additions and 2 deletions

View File

@@ -35,6 +35,8 @@ bool FollowAction::Execute(Event event)
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
pet->GetCharmInfo()->SetIsFollowing(true);
pet->AttackStop();
pet->GetCharmInfo()->IsReturning();
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
}
}
//if (moved)

View File

@@ -1237,6 +1237,8 @@ bool FleeWithPetAction::Execute(Event event)
pet->GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
pet->GetCharmInfo()->SetIsFollowing(true);
pet->AttackStop();
pet->GetCharmInfo()->IsReturning();
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
}
}

View File

@@ -18,11 +18,11 @@ bool MediumManaTrigger::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() {
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()