mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
refactor(Core/SmartScripts): Change invoker to be WorldObject (#19408)
* refactor(Core/SmartScripts): Change invoker to be WorldObject * avoid dangling else * womp womp * check for null * null check * Update SmartScript.cpp * Avarishd broke it for sure * remove redundant check * reduce more redundant code * who doesnt love redundancy
This commit is contained in:
@@ -70,7 +70,7 @@ public:
|
||||
void StopFollow(bool complete);
|
||||
void MoveAway(float distance);
|
||||
|
||||
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
|
||||
void SetScript9(SmartScriptHolder& e, uint32 entry, WorldObject* invoker);
|
||||
SmartScript* GetScript() { return &mScript; }
|
||||
bool IsEscortInvokerInRange();
|
||||
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
|
||||
// Used in scripts to share variables
|
||||
void SetData(uint32 id, uint32 value) override { SetData(id, value, nullptr); }
|
||||
void SetData(uint32 id, uint32 value, Unit* invoker);
|
||||
void SetData(uint32 id, uint32 value, WorldObject* invoker);
|
||||
|
||||
// Used in scripts to share variables
|
||||
void SetGUID(ObjectGuid guid, int32 id = 0) override;
|
||||
@@ -274,8 +274,8 @@ public:
|
||||
bool QuestReward(Player* player, Quest const* quest, uint32 opt) override;
|
||||
void Destroyed(Player* player, uint32 eventId) override;
|
||||
void SetData(uint32 id, uint32 value) override { SetData(id, value, nullptr); }
|
||||
void SetData(uint32 id, uint32 value, Unit* invoker);
|
||||
void SetScript9(SmartScriptHolder& e, uint32 entry, Unit* invoker);
|
||||
void SetData(uint32 id, uint32 value, WorldObject* invoker);
|
||||
void SetScript9(SmartScriptHolder& e, uint32 entry, WorldObject* invoker);
|
||||
void OnGameEvent(bool start, uint16 eventId) override;
|
||||
void OnStateChanged(uint32 state, Unit* unit) override;
|
||||
void EventInform(uint32 eventId) override;
|
||||
|
||||
Reference in New Issue
Block a user