18#ifndef TRINITY_SMARTSCRIPT_H
19#define TRINITY_SMARTSCRIPT_H
54 void GetWorldObjectsInDist(
ObjectVector& objects,
float dist)
const;
55 static SmartScriptHolder CreateSmartEvent(
SMART_EVENT e,
uint32 event_flags,
uint32 event_param1,
uint32 event_param2,
uint32 event_param3,
uint32 event_param4,
uint32 event_param5,
SMART_ACTION action,
uint32 action_param1,
uint32 action_param2,
uint32 action_param3,
uint32 action_param4,
uint32 action_param5,
uint32 action_param6,
uint32 action_param7,
SMARTAI_TARGETS t,
uint32 target_param1,
uint32 target_param2,
uint32 target_param3,
uint32 target_param4,
uint32 phaseMask);
67 void OnUpdate(
const uint32 diff);
68 void OnMoveInLineOfSight(
Unit* who);
70 Unit* DoSelectLowestHpFriendly(
float range,
uint32 MinHPDiff)
const;
71 Unit* DoSelectLowestHpPercentFriendly(
float range,
uint32 minHpPct,
uint32 maxHpPct)
const;
72 void DoFindFriendlyCC(std::vector<Creature*>& creatures,
float range)
const;
73 void DoFindFriendlyMissingBuff(std::vector<Creature*>& creatures,
float range,
uint32 spellid)
const;
74 Unit* DoFindClosestFriendlyInRange(
float range,
bool playerOnly)
const;
76 bool IsSmart(
Creature* c,
bool silent =
false)
const;
77 bool IsSmart(
GameObject* g,
bool silent =
false)
const;
78 bool IsSmart(
bool silent =
false)
const;
91 void ResetBaseObject();
94 Unit* GetLastInvoker(
Unit* invoker =
nullptr)
const;
105 bool IsInPhase(
uint32 p)
const;
143 static constexpr uint32 MAX_NESTED_EVENTS = 10;
147 void InstallEvents();
149 void RemoveStoredEvent(
uint32 id);
std::vector< SmartScriptHolder > SmartAIEventList
std::vector< SmartScriptHolder > SmartAIEventStoredList
std::vector< WorldObject * > ObjectVector
std::unordered_map< uint32, ObjectGuidVector > ObjectVectorMap
SmartScriptType mScriptType
SceneTemplate const * sceneTemplate
SmartAIEventStoredList mStoredEvents
bool HasAnyEventWithFlag(uint32 flag) const
SmartAIEventList mInstallEvents
AreaTriggerEntry const * trigger
AreaTrigger * areaTrigger
std::unordered_map< uint32, uint32 > CounterMap
uint32 mNestedEventsCounter
bool isProcessingTimedActionList
SmartAIEventList mTimedActionList
ObjectVectorMap _storedTargets
bool mEventSortingRequired
ObjectGuid mTimedActionListInvoker
void SetPathId(uint32 id)
std::vector< uint32 > mRemIDs