mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Aggresive water elemental
This commit is contained in:
@@ -5742,3 +5742,28 @@ uint32 PlayerbotAI::GetReactDelay()
|
|||||||
return base * multiplier;
|
return base * multiplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlayerbotAI::PetFollow()
|
||||||
|
{
|
||||||
|
Pet* pet = bot->GetPet();
|
||||||
|
if (!pet)
|
||||||
|
return;
|
||||||
|
pet->AttackStop();
|
||||||
|
pet->InterruptNonMeleeSpells(false);
|
||||||
|
pet->ClearInPetCombat();
|
||||||
|
pet->GetMotionMaster()->MoveFollow(bot, PET_FOLLOW_DIST, pet->GetFollowAngle());
|
||||||
|
if (pet->ToPet())
|
||||||
|
pet->ToPet()->ClearCastWhenWillAvailable();
|
||||||
|
CharmInfo* charmInfo = pet->GetCharmInfo();
|
||||||
|
if (!charmInfo)
|
||||||
|
return;
|
||||||
|
charmInfo->SetCommandState(COMMAND_FOLLOW);
|
||||||
|
|
||||||
|
charmInfo->SetIsCommandAttack(false);
|
||||||
|
charmInfo->SetIsAtStay(false);
|
||||||
|
charmInfo->SetIsReturning(true);
|
||||||
|
charmInfo->SetIsCommandFollow(true);
|
||||||
|
charmInfo->SetIsFollowing(false);
|
||||||
|
charmInfo->RemoveStayPosition();
|
||||||
|
charmInfo->SetForcedSpell(0);
|
||||||
|
charmInfo->SetForcedTargetGUID();
|
||||||
|
}
|
||||||
@@ -560,6 +560,8 @@ public:
|
|||||||
std::vector<const Quest*> GetCurrentIncompleteQuests();
|
std::vector<const Quest*> GetCurrentIncompleteQuests();
|
||||||
std::set<uint32> GetAllCurrentQuestIds();
|
std::set<uint32> GetAllCurrentQuestIds();
|
||||||
std::set<uint32> GetCurrentIncompleteQuestIds();
|
std::set<uint32> GetCurrentIncompleteQuestIds();
|
||||||
|
void PetFollow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void _fillGearScoreData(Player* player, Item* item, std::vector<uint32>* gearScore, uint32& twoHandScore, bool mixed = false);
|
static void _fillGearScoreData(Player* player, Item* item, std::vector<uint32>* gearScore, uint32& twoHandScore, bool mixed = false);
|
||||||
bool IsTellAllowed(PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL);
|
bool IsTellAllowed(PlayerbotSecurityLevel securityLevel = PLAYERBOT_SECURITY_ALLOW_ALL);
|
||||||
|
|||||||
@@ -62,6 +62,11 @@ bool FollowChatShortcutAction::Execute(Event event)
|
|||||||
true, priority);
|
true, priority);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Pet* pet = bot->GetPet())
|
||||||
|
{
|
||||||
|
botAI->PetFollow();
|
||||||
|
}
|
||||||
|
|
||||||
if (moved)
|
if (moved)
|
||||||
{
|
{
|
||||||
botAI->TellMaster("Following");
|
botAI->TellMaster("Following");
|
||||||
|
|||||||
@@ -79,9 +79,7 @@ bool SummonAction::Execute(Event event)
|
|||||||
|
|
||||||
if (Pet* pet = bot->GetPet())
|
if (Pet* pet = bot->GetPet())
|
||||||
{
|
{
|
||||||
pet->SetReactState(REACT_PASSIVE);
|
botAI->PetFollow();
|
||||||
pet->GetCharmInfo()->SetIsCommandFollow(true);
|
|
||||||
pet->GetCharmInfo()->IsReturning();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (master->GetSession()->GetSecurity() >= SEC_PLAYER)
|
if (master->GetSession()->GetSecurity() >= SEC_PLAYER)
|
||||||
|
|||||||
Reference in New Issue
Block a user