Core/AI: Implemented functionality for _isCombatMovementAllowed in ScriptedAI, only when AttackStart is called.
This commit is contained in:
1 parent
118c1d8c2c
commit
124b5ed6e7
2 files changed
+16
-1
No files matched your search
@@ -136,6 +136,9 @@ struct ScriptedAI : public CreatureAI
|
||||
//Called at creature aggro either by MoveInLOS or Attack Start
|
||||
void EnterCombat(Unit* /*victim*/) {}
|
||||
|
||||
// Called before EnterCombat even before the creature is in combat.
|
||||
void AttackStart(Unit* /*target*/);
|
||||
|
||||
// *************
|
||||
//AI Helper Functions
|
||||
// *************
|
||||
@@ -191,7 +194,11 @@ struct ScriptedAI : public CreatureAI
|
||||
|
||||
void SetEquipmentSlots(bool loadDefault, int32 mainHand = EQUIP_NO_CHANGE, int32 offHand = EQUIP_NO_CHANGE, int32 ranged = EQUIP_NO_CHANGE);
|
||||
|
||||
//Generally used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims
|
||||
// Used to control if MoveChase() is to be used or not in AttackStart(). Some creatures does not chase victims
|
||||
// NOTE: If you use SetCombatMovement while the creature is in combat, it will do NOTHING - This only affects AttackStart
|
||||
// You should make the necessary to make it happen so.
|
||||
// Remember that if you modified _isCombatMovementAllowed (e.g: using SetCombatMovement) it will not be reset at Reset().
|
||||
// It will keep the last value you set.
|
||||
void SetCombatMovement(bool allowMovement);
|
||||
bool IsCombatMovementAllowed() const { return _isCombatMovementAllowed; }
|
||||
|
||||
|
||||
Reference in new issue
Block a user