18 #ifndef TRINITY_SMARTAI_H
19 #define TRINITY_SMARTAI_H
52 void StartPath(
bool run =
false,
uint32 path = 0,
bool repeat =
false,
Unit* invoker =
NULL);
53 bool LoadPath(
uint32 entry);
54 void PausePath(
uint32 delay,
bool forced =
false);
55 void StopPath(
uint32 DespawnTime = 0,
uint32 quest = 0,
bool fail =
false);
56 void EndPath(
bool fail =
false);
63 void SetCombatMove(
bool on);
65 void SetFollow(
Unit* target,
float dist = 0.0f,
float angle = 0.0f,
uint32 credit = 0,
uint32 end = 0,
uint32 creditType = 0);
70 bool IsEscortInvokerInRange();
82 void EnterEvadeMode(EvadeReason why = EVADE_REASON_OTHER)
override;
133 void UpdateAIWhileCharmed(
const uint32 diff);
166 void MovepointReached(
uint32 id);
169 void SetRun(
bool run =
true);
171 void SetFly(
bool fly =
true);
173 void SetSwim(
bool swim =
true);
191 mDespawnState = t ? 1 : 0;
206 void ReturnToLastOOCPos();
207 void UpdatePath(
const uint32 diff);
224 bool AssistPlayerInCombat(
Unit* who);
228 void UpdateDespawn(
const uint32 diff);
241 void Reset()
override;
virtual void SetData(uint32, uint32)
Definition: UnitAI.h:140
virtual void PassengerBoarded(Unit *, int8, bool)
== Fields =======================================
Definition: CreatureAI.h:183
virtual bool QuestAccept(Player *, Quest const *)
Definition: GameObjectAI.h:53
Definition: SmartAI.h:233
virtual void sGossipSelect(Player *, uint32, uint32)
Definition: UnitAI.h:254
virtual ObjectGuid GetGUID(int32=0) const
Definition: UnitAI.h:142
virtual void sQuestReward(Player *, Quest const *, uint32)
Definition: UnitAI.h:258
int8_t int8
Definition: Define.h:148
virtual void OnStateChanged(uint32, Unit *)
Definition: GameObjectAI.h:62
void RemoveEscortState(uint32 uiEscortState)
Definition: SmartAI.h:61
uint32 mFollowCredit
Definition: SmartAI.h:200
virtual void OnGameEvent(bool, uint16)
Definition: GameObjectAI.h:61
virtual void sOnGameEvent(bool, uint16)
Definition: UnitAI.h:260
Definition: QuestDef.h:279
float mFollowAngle
Definition: SmartAI.h:204
virtual void SpellHitTarget(Unit *, SpellInfo const *)
Definition: CreatureAI.h:133
Definition: SpellInfo.h:326
uint32 mInvincibilityHpLevel
Definition: SmartAI.h:223
bool mForcedPaused
Definition: SmartAI.h:222
virtual bool GossipSelect(Player *, uint32, uint32)
Definition: GameObjectAI.h:51
virtual void ReceiveEmote(Player *, uint32)
Definition: CreatureAI.h:153
virtual void EnterEvadeMode(EvadeReason why=EVADE_REASON_OTHER)
Definition: CreatureAI.cpp:168
bool mCanRepeatPath
Definition: SmartAI.h:218
virtual void IsSummonedBy(Unit *)
Definition: CreatureAI.h:124
virtual bool GossipSelectCode(Player *, uint32, uint32, char const *)
Definition: GameObjectAI.h:52
void OnCharmed(bool apply) override
Definition: CreatureAI.cpp:32
SmartScript * GetScript()
Definition: SmartAI.h:242
uint32 mCurrentWPID
Definition: SmartAI.h:211
uint32 mEscortQuestID
Definition: SmartAI.h:186
virtual void JustRespawned()
Definition: CreatureAI.h:140
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 mDespawnTime
Definition: SmartAI.h:226
uint32 mFollowArrivedTimer
Definition: SmartAI.h:199
virtual void SetData(uint32, uint32)
Definition: GameObjectAI.h:60
~SmartAI()
Definition: SmartAI.h:48
virtual void UpdateAI(uint32 diff)=0
Definition: Creature.h:467
bool mCanAutoAttack
Definition: SmartAI.h:220
void AddSC_SmartScripts()
Registers scripts required by the SAI scripting system.
Definition: SmartAI.cpp:926
SmartScript mScript
Definition: SmartAI.h:208
void StartDespawn()
Definition: SmartAI.h:193
void apply(T *val)
Definition: ByteConverter.h:41
uint32 mWPPauseTimer
Definition: SmartAI.h:214
virtual void SetGUID(ObjectGuid, int32=0)
Definition: UnitAI.h:141
Definition: GameObjectAI.h:29
virtual void DamageTaken(Unit *, uint32 &)
Definition: UnitAI.h:228
SmartScript mScript
Definition: SmartAI.h:258
virtual bool CanAIAttack(Unit const *) const
Definition: UnitAI.h:126
Definition: SmartScriptMgr.h:31
virtual void sGossipSelectCode(Player *, uint32, uint32, char const *)
Definition: UnitAI.h:255
virtual void UpdateAI(uint32)
Definition: GameObjectAI.h:37
ObjectGuid mFollowGuid
Definition: SmartAI.h:202
SmartEscortState
Definition: SmartAI.h:31
virtual void InitializeAI()
Definition: UnitAI.h:130
virtual void EnterCombat(Unit *)
Definition: CreatureAI.h:114
uint32 mDespawnState
Definition: SmartAI.h:227
virtual bool sOnDummyEffect(Unit *, uint32, SpellEffIndex)
Definition: UnitAI.h:259
virtual bool GossipHello(Player *)
Definition: GameObjectAI.h:50
uint32 mFollowArrivedEntry
Definition: SmartAI.h:201
virtual bool QuestReward(Player *, Quest const *, uint32)
Definition: GameObjectAI.h:54
WayPoint * mLastWP
Definition: SmartAI.h:215
virtual void SpellHit(Unit *, SpellInfo const *)
Definition: CreatureAI.h:130
Position mLastOOCPos
Definition: SmartAI.h:216
bool CanCombatMove()
Definition: SmartAI.h:64
virtual void sQuestAccept(Player *, Quest const *)
Definition: UnitAI.h:256
DamageEffectType
Definition: Unit.h:660
virtual void KilledUnit(Unit *)
Definition: CreatureAI.h:120
bool HasEscortState(uint32 uiEscortState) const
Definition: SmartAI.h:59
virtual void Destroyed(Player *, uint32)
Definition: GameObjectAI.h:56
SpellEffIndex
Definition: SharedDefines.h:26
int32_t int32
Definition: Define.h:146
Definition: CreatureAI.h:68
void SetDespawnTime(uint32 t)
Definition: SmartAI.h:188
virtual void JustDied(Unit *)
Definition: CreatureAI.h:117
uint32 mEscortState
Definition: SmartAI.h:210
uint32_t uint32
Definition: Define.h:150
bool mJustReset
Definition: SmartAI.h:230
uint32 mFollowCreditType
Definition: SmartAI.h:198
std::unordered_map< uint32, WayPoint * > WPPath
Definition: SmartScriptMgr.h:1389
uint16_t uint16
Definition: Define.h:151
static int Permissible(GameObject const *go)
Definition: GameObjectAI.cpp:22
Definition: GameObject.h:880
virtual void DoAction(int32)
Definition: UnitAI.h:138
SmartEscortVars
Definition: SmartAI.h:39
float mFollowDist
Definition: SmartAI.h:203
Definition: inftrees.h:24
virtual void InitializeAI()
Definition: GameObjectAI.h:39
virtual void OnSpellClick(Unit *, bool &)
Definition: CreatureAI.h:185
#define TC_GAME_API
Definition: Define.h:134
virtual void DamageDealt(Unit *, uint32 &, DamageEffectType)
Definition: UnitAI.h:223
virtual void JustReachedHome()
Definition: CreatureAI.h:148
Definition: Position.h:27
virtual void MoveInLineOfSight(Unit *)
Definition: CreatureAI.cpp:128
uint32 GetWPCount() const
Definition: SmartAI.h:217
bool mCanCombatMove
Definition: SmartAI.h:221
SmartScript * GetScript()
Definition: SmartAI.h:69
const FieldDescriptor value
Definition: descriptor.h:1522
bool mWPReached
Definition: SmartAI.h:213
Definition: ObjectGuid.h:189
Definition: SmartScriptMgr.h:1361
uint32_t uint32
Definition: g3dmath.h:168
virtual void Reset()
Definition: GameObjectAI.h:41
virtual void HealReceived(Unit *, uint32 &)
Definition: UnitAI.h:231
virtual uint32 GetData(uint32) const
Definition: UnitAI.h:139
Definition: FactoryHolder.h:52
virtual void CorpseRemoved(uint32 &)
== Triggered Actions Requested ==================
Definition: CreatureAI.h:176
WPPath * mWayPoints
Definition: SmartAI.h:209
virtual void EventInform(uint32)
Definition: GameObjectAI.h:63
uint32 mEscortInvokerCheckTimer
Definition: SmartAI.h:229
void SetInvincibilityHpLevel(uint32 level)
Definition: SmartAI.h:175
virtual void SummonedCreatureDespawn(Creature *)
Definition: CreatureAI.h:126
virtual void AttackStart(Unit *)
Definition: UnitAI.cpp:29
virtual void MovementInform(uint32, uint32)
Definition: CreatureAI.h:143
~SmartGameObjectAI()
Definition: SmartAI.h:237
Definition: SmartScript.h:31
void SetAutoAttack(bool on)
Definition: SmartAI.h:62
Data
Definition: molten_core.h:69
virtual void JustSummoned(Creature *)
Definition: CreatureAI.h:123
void AddEscortState(uint32 uiEscortState)
Definition: SmartAI.h:60
bool mRun
Definition: SmartAI.h:219
SmartGameObjectAI(GameObject *g)
Definition: SmartAI.h:236
uint32 mLastWPIDReached
Definition: SmartAI.h:212
virtual void sGossipHello(Player *)
Definition: UnitAI.h:253