mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
feat(Core/SAI): SetData now has invoker (#19296)
* cherry-pick commit (cfc77fd843) * cherry-pick commit (beb333738d) * Move IsSmart function from headerfile Co-authored-by: Treeston <14020072+Treeston@users.noreply.github.com> Co-authored-by: Shauren <shauren.trinity@gmail.com>
This commit is contained in:
@@ -23,6 +23,17 @@
|
||||
#include "Unit.h"
|
||||
#include <list>
|
||||
|
||||
#define CAST_AI(a, b) (dynamic_cast<a*>(b))
|
||||
#define ENSURE_AI(a,b) (EnsureAI<a>(b))
|
||||
|
||||
template<class T, class U>
|
||||
T* EnsureAI(U* ai)
|
||||
{
|
||||
T* cast_ai = dynamic_cast<T*>(ai);
|
||||
ASSERT(cast_ai);
|
||||
return cast_ai;
|
||||
}
|
||||
|
||||
class Player;
|
||||
class Quest;
|
||||
class Unit;
|
||||
|
||||
Reference in New Issue
Block a user