18#ifndef TRINITY_SMARTSCRIPT_H
19#define TRINITY_SMARTSCRIPT_H
63 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, std::string_view targetParamString,
uint32 phaseMask);
70 void OnUpdate(
const uint32 diff);
71 void OnMoveInLineOfSight(
Unit* who);
73 Unit* DoSelectLowestHpFriendly(
float range,
uint32 MinHPDiff)
const;
74 Unit* DoSelectLowestHpPercentFriendly(
float range,
uint32 minHpPct,
uint32 maxHpPct)
const;
75 void DoFindFriendlyCC(std::vector<Creature*>& creatures,
float range)
const;
76 void DoFindFriendlyMissingBuff(std::vector<Creature*>& creatures,
float range,
uint32 spellid)
const;
77 Unit* DoFindClosestFriendlyInRange(
float range,
bool playerOnly)
const;
79 bool IsSmart(
Creature* c,
bool silent =
false)
const;
80 bool IsSmart(
GameObject* g,
bool silent =
false)
const;
81 bool IsSmart(
bool silent =
false)
const;
83 void ClearTargetList(
uint32 id);
95 void ResetBaseObject();
98 Unit* GetLastInvoker(
Unit* invoker =
nullptr)
const;
109 bool IsInPhase(
uint32 p)
const;
147 static constexpr uint32 MAX_NESTED_EVENTS = 10;
151 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
SmartScript(SmartScript const &other)
AreaTriggerEntry const * trigger
SmartScript & operator=(SmartScript const &other)
AreaTrigger * areaTrigger
std::unordered_map< uint32, uint32 > CounterMap
uint32 mNestedEventsCounter
SmartScript & operator=(SmartScript &&other) noexcept
SmartScript(SmartScript &&other) noexcept
std::shared_ptr< Scripting::v2::ActionBase > mTimedActionWaitEvent
bool isProcessingTimedActionList
SmartAIEventList mTimedActionList
ObjectVectorMap _storedTargets
bool mEventSortingRequired
ObjectGuid mTimedActionListInvoker
void SetPathId(uint32 id)
std::vector< uint32 > mRemIDs