mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
fix(Core/Pets): Properly cast spells on friendly target if not in LoS… (#9570)
* fix(Core/Pets): Properly cast spells on friendly target if not in LoS or out of range. Fixes #7790
This commit is contained in:
@@ -511,13 +511,18 @@ void Pet::Update(uint32 diff)
|
||||
}
|
||||
else
|
||||
{
|
||||
GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
||||
GetCharmInfo()->SetIsCommandAttack(false);
|
||||
GetCharmInfo()->SetIsAtStay(false);
|
||||
GetCharmInfo()->SetIsReturning(true);
|
||||
GetCharmInfo()->SetIsCommandFollow(true);
|
||||
GetCharmInfo()->SetIsFollowing(false);
|
||||
GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, GetFollowAngle());
|
||||
if (IsAIEnabled)
|
||||
AI()->PetStopAttack();
|
||||
else
|
||||
{
|
||||
GetCharmInfo()->SetCommandState(COMMAND_FOLLOW);
|
||||
GetCharmInfo()->SetIsCommandAttack(false);
|
||||
GetCharmInfo()->SetIsAtStay(false);
|
||||
GetCharmInfo()->SetIsReturning(true);
|
||||
GetCharmInfo()->SetIsCommandFollow(true);
|
||||
GetCharmInfo()->SetIsFollowing(false);
|
||||
GetMotionMaster()->MoveFollow(charmer, PET_FOLLOW_DIST, GetFollowAngle());
|
||||
}
|
||||
}
|
||||
|
||||
m_tempoldTarget = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user