mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
feat(Core/SmartScripts): SMART_EVENT_FLAG_WHILE_CHARMED (#10286)
This commit is contained in:
committed by
GitHub
parent
6aebf22cb2
commit
9fa3436cbe
@@ -63,7 +63,7 @@ void FollowerAI::AttackStart(Unit* who)
|
||||
//This part provides assistance to a player that are attacked by who, even if out of normal aggro range
|
||||
//It will cause me to attack who that are attacking _any_ player (which has been confirmed may happen also on offi)
|
||||
//The flag (type_flag) is unconfirmed, but used here for further research and is a good candidate.
|
||||
bool FollowerAI::AssistPlayerInCombat(Unit* who)
|
||||
bool FollowerAI::AssistPlayerInCombatAgainst(Unit* who)
|
||||
{
|
||||
if (!who || !who->GetVictim())
|
||||
return false;
|
||||
@@ -96,7 +96,7 @@ void FollowerAI::MoveInLineOfSight(Unit* who)
|
||||
return;
|
||||
|
||||
if (!me->HasUnitState(UNIT_STATE_STUNNED) && who->isTargetableForAttack(true, me) && who->isInAccessiblePlaceFor(me))
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombat(who))
|
||||
if (HasFollowState(STATE_FOLLOW_INPROGRESS) && AssistPlayerInCombatAgainst(who))
|
||||
return;
|
||||
|
||||
if (me->CanStartAttack(who))
|
||||
|
||||
Reference in New Issue
Block a user