feat(Core/SmartScripts): SMART_EVENT_FLAG_WHILE_CHARMED (#10286)

This commit is contained in:
IntelligentQuantum
2022-04-23 18:56:42 +04:30
committed by GitHub
parent 6aebf22cb2
commit 9fa3436cbe
10 changed files with 186 additions and 56 deletions

View File

@@ -47,6 +47,9 @@ public:
~SmartAI() override {};
explicit SmartAI(Creature* c);
// Check whether we are currently permitted to make the creature take action
bool IsAIControlled() const;
// Start moving to the desired MovePoint
void StartPath(bool run = false, uint32 path = 0, bool repeat = false, Unit* invoker = nullptr);
bool LoadPath(uint32 entry);
@@ -133,9 +136,6 @@ public:
// called when the corpse of this creature gets removed
void CorpseRemoved(uint32& respawnDelay) override;
// Called at World update tick if creature is charmed
void UpdateAIWhileCharmed(const uint32 diff);
// Called when a Player/Creature enters the creature (vehicle)
void PassengerBoarded(Unit* who, int8 seatId, bool apply) override;
@@ -205,6 +205,7 @@ public:
void SetForcedCombatMove(float dist);
private:
bool mIsCharmed;
uint32 mFollowCreditType;
uint32 mFollowArrivedTimer;
uint32 mFollowCredit;
@@ -234,7 +235,7 @@ private:
bool mForcedPaused;
uint32 mInvincibilityHpLevel;
bool AssistPlayerInCombat(Unit* who);
bool AssistPlayerInCombatAgainst(Unit* who);
uint32 mDespawnTime;
uint32 mDespawnState;