Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Eluna Class Reference

#include <LuaEngine.h>

Collaboration diagram for Eluna:

Classes

struct  ElunaBind
struct  ObjectDistanceOrderPred
struct  ObjectGUIDCheck
class  WorldObjectInRangeCheck

Public Types

typedef std::map< int, int > ElunaBindingMap
typedef std::unordered_map< uint32, ElunaBindingMapElunaEntryMap

Public Member Functions

void BeginCall (int fReference)
CorpseCHECK_CORPSE (lua_State *L, int narg)
CreatureCHECK_CREATURE (lua_State *L, int narg)
GameObjectCHECK_GAMEOBJECT (lua_State *L, int narg)
ItemCHECK_ITEM (lua_State *L, int narg)
int64 CHECK_LONG (lua_State *L, int narg)
ObjectCHECK_OBJECT (lua_State *L, int narg)
WorldPacketCHECK_PACKET (lua_State *L, int narg)
PlayerCHECK_PLAYER (lua_State *L, int narg)
QuestCHECK_QUEST (lua_State *L, int narg)
SpellCHECK_SPELL (lua_State *L, int narg)
uint64 CHECK_ULONG (lua_State *L, int narg)
UnitCHECK_UNIT (lua_State *L, int narg)
VehicleCHECK_VEHICLE (lua_State *L, int narg)
WorldObjectCHECK_WORLDOBJECT (lua_State *L, int narg)
 Eluna ()
void EndCall (uint8 res)
bool ExecuteCall (uint8 params, uint8 res)
void Initialize ()
void LoadDirectory (const char *directory, LoadedScripts *scr)
void Push (lua_State *)
void Push (lua_State *, bool)
void Push (lua_State *, const char *)
void Push (lua_State *, double)
void Push (lua_State *, float)
void Push (lua_State *, int32)
void Push (lua_State *, int64)
void Push (lua_State *, std::string)
void Push (lua_State *, uint32)
void Push (lua_State *, uint64)
void Push (lua_State *, WorldObject const *obj)
void Push (lua_State *L, Object const *obj)
void Push (lua_State *L, Pet const *pet)
template<typename T>
void Push (lua_State *L, T const *ptr)
template<typename T, typename std::enable_if< std::is_enum< T >::value, int >::type = 0>
void Push (lua_State *L, T value)
void Push (lua_State *L, TempSummon const *summon)
void Push (lua_State *L, Unit const *unit)
void Register (uint8 reg, uint32 id, uint32 evt, int func)
 ~Eluna ()

Static Public Member Functions

static Elunainstance ()
static void report (lua_State *)

Public Attributes

ElunaBindCreatureEventBindings
ElunaBindCreatureGossipBindings
ElunaBindGameObjectEventBindings
ElunaBindGameObjectGossipBindings
std::map< int, std::vector< int > > GroupEventBindings
std::map< int, std::vector< int > > GuildEventBindings
ElunaBindItemEventBindings
ElunaBindItemGossipBindings
lua_State * L
EventMgr m_EventMgr
std::map< int, std::vector< int > > PlayerEventBindings
ElunaBindplayerGossipBindings
std::map< int, std::vector< int > > ServerEventBindings
std::map< int, std::vector< int > > VehicleEventBindings

Friends

class ScriptMgr

Detailed Description

Definition at line 379 of file LuaEngine.h.

Member Typedef Documentation

◆ ElunaBindingMap

typedef std::map<int, int> Eluna::ElunaBindingMap

Definition at line 387 of file LuaEngine.h.

◆ ElunaEntryMap

typedef std::unordered_map<uint32, ElunaBindingMap> Eluna::ElunaEntryMap

Definition at line 388 of file LuaEngine.h.

Constructor & Destructor Documentation

◆ Eluna()

◆ ~Eluna()

Member Function Documentation

◆ BeginCall()

void Eluna::BeginCall ( int fReference)

Definition at line 264 of file LuaEngine.cpp.

References L.

◆ CHECK_CORPSE()

Corpse * Eluna::CHECK_CORPSE ( lua_State * L,
int narg )

Definition at line 407 of file LuaEngine.cpp.

References CHECK_WORLDOBJECT(), L, and Object::ToCorpse().

◆ CHECK_CREATURE()

Creature * Eluna::CHECK_CREATURE ( lua_State * L,
int narg )

Definition at line 391 of file LuaEngine.cpp.

References CHECK_WORLDOBJECT(), L, and Object::ToCreature().

◆ CHECK_GAMEOBJECT()

GameObject * Eluna::CHECK_GAMEOBJECT ( lua_State * L,
int narg )

Definition at line 399 of file LuaEngine.cpp.

References CHECK_WORLDOBJECT(), L, and Object::ToGameObject().

◆ CHECK_ITEM()

Item * Eluna::CHECK_ITEM ( lua_State * L,
int narg )

Definition at line 447 of file LuaEngine.cpp.

References ElunaTemplate< T >::check(), and L.

◆ CHECK_LONG()

int64 Eluna::CHECK_LONG ( lua_State * L,
int narg )

Definition at line 441 of file LuaEngine.cpp.

References L.

◆ CHECK_OBJECT()

Object * Eluna::CHECK_OBJECT ( lua_State * L,
int narg )

Definition at line 365 of file LuaEngine.cpp.

References ElunaTemplate< T >::check(), and L.

◆ CHECK_PACKET()

WorldPacket * Eluna::CHECK_PACKET ( lua_State * L,
int narg )

Definition at line 420 of file LuaEngine.cpp.

References ElunaTemplate< T >::check(), and L.

◆ CHECK_PLAYER()

Player * Eluna::CHECK_PLAYER ( lua_State * L,
int narg )

Definition at line 383 of file LuaEngine.cpp.

References CHECK_WORLDOBJECT(), L, and Object::ToPlayer().

◆ CHECK_QUEST()

Quest * Eluna::CHECK_QUEST ( lua_State * L,
int narg )

Definition at line 425 of file LuaEngine.cpp.

References ElunaTemplate< T >::check(), and L.

◆ CHECK_SPELL()

Spell * Eluna::CHECK_SPELL ( lua_State * L,
int narg )

Definition at line 430 of file LuaEngine.cpp.

References ElunaTemplate< T >::check(), and L.

◆ CHECK_ULONG()

uint64 Eluna::CHECK_ULONG ( lua_State * L,
int narg )

Definition at line 435 of file LuaEngine.cpp.

References L.

◆ CHECK_UNIT()

Unit * Eluna::CHECK_UNIT ( lua_State * L,
int narg )

Definition at line 375 of file LuaEngine.cpp.

References CHECK_WORLDOBJECT(), L, and Object::ToUnit().

◆ CHECK_VEHICLE()

Vehicle * Eluna::CHECK_VEHICLE ( lua_State * L,
int narg )

Definition at line 415 of file LuaEngine.cpp.

References ElunaTemplate< T >::check(), and L.

◆ CHECK_WORLDOBJECT()

WorldObject * Eluna::CHECK_WORLDOBJECT ( lua_State * L,
int narg )

◆ EndCall()

void Eluna::EndCall ( uint8 res)

Definition at line 298 of file LuaEngine.cpp.

References L.

◆ ExecuteCall()

bool Eluna::ExecuteCall ( uint8 params,
uint8 res )

Definition at line 270 of file LuaEngine.cpp.

References L, and report().

◆ Initialize()

void Eluna::Initialize ( )

Definition at line 243 of file LuaEngine.cpp.

References StartEluna(), and TC_LOG_ERROR.

◆ instance()

Eluna * Eluna::instance ( )
static

Definition at line 142 of file LuaEngine.cpp.

References Eluna(), and instance().

Referenced by instance().

◆ LoadDirectory()

void Eluna::LoadDirectory ( const char * directory,
LoadedScripts * scr )

Definition at line 149 of file LuaEngine.cpp.

References LoadDirectory(), and TC_LOG_ERROR.

Referenced by LoadDirectory().

◆ Push() [1/17]

void Eluna::Push ( lua_State * L)

Definition at line 308 of file LuaEngine.cpp.

References L.

Referenced by Push(), Push(), Push(), Push(), Push(), and Push().

◆ Push() [2/17]

void Eluna::Push ( lua_State * L,
bool b )

Definition at line 350 of file LuaEngine.cpp.

References L.

◆ Push() [3/17]

void Eluna::Push ( lua_State * L,
const char * str )

Definition at line 360 of file LuaEngine.cpp.

References L.

◆ Push() [4/17]

void Eluna::Push ( lua_State * L,
double d )

Definition at line 340 of file LuaEngine.cpp.

References L.

◆ Push() [5/17]

void Eluna::Push ( lua_State * L,
float f )

Definition at line 345 of file LuaEngine.cpp.

References L.

◆ Push() [6/17]

void Eluna::Push ( lua_State * L,
int32 i )

Definition at line 335 of file LuaEngine.cpp.

References L.

◆ Push() [7/17]

void Eluna::Push ( lua_State * L,
int64 l )

Definition at line 320 of file LuaEngine.cpp.

References L, and sEluna.

◆ Push() [8/17]

void Eluna::Push ( lua_State * L,
std::string str )

Definition at line 355 of file LuaEngine.cpp.

References L.

◆ Push() [9/17]

void Eluna::Push ( lua_State * L,
uint32 u )

Definition at line 330 of file LuaEngine.cpp.

References L.

◆ Push() [10/17]

void Eluna::Push ( lua_State * L,
uint64 l )

Definition at line 313 of file LuaEngine.cpp.

References L, and sEluna.

◆ Push() [11/17]

◆ Push() [12/17]

◆ Push() [13/17]

void Eluna::Push ( lua_State * L,
Pet const * pet )
inline

Definition at line 431 of file LuaEngine.h.

References L, Push(), and Object::ToCreature().

◆ Push() [14/17]

template<typename T>
void Eluna::Push ( lua_State * L,
T const * ptr )
inline

Definition at line 426 of file LuaEngine.h.

References L, and ElunaTemplate< T >::push().

◆ Push() [15/17]

template<typename T, typename std::enable_if< std::is_enum< T >::value, int >::type = 0>
void Eluna::Push ( lua_State * L,
T value )
inline

Definition at line 422 of file LuaEngine.h.

References L, and Push().

◆ Push() [16/17]

void Eluna::Push ( lua_State * L,
TempSummon const * summon )
inline

Definition at line 436 of file LuaEngine.h.

References L, Push(), and Object::ToCreature().

◆ Push() [17/17]

void Eluna::Push ( lua_State * L,
Unit const * unit )
inline

◆ Register()

◆ report()

void Eluna::report ( lua_State * L)
static

Definition at line 253 of file LuaEngine.cpp.

References L.

Referenced by ExecuteCall().

◆ ScriptMgr

friend class ScriptMgr
friend

Definition at line 382 of file LuaEngine.h.

References Eluna(), and ScriptMgr.

Referenced by ScriptMgr.

Member Data Documentation

◆ CreatureEventBindings

ElunaBind* Eluna::CreatureEventBindings

Definition at line 395 of file LuaEngine.h.

Referenced by Eluna(), and ~Eluna().

◆ CreatureGossipBindings

ElunaBind* Eluna::CreatureGossipBindings

Definition at line 396 of file LuaEngine.h.

Referenced by Eluna(), and ~Eluna().

◆ GameObjectEventBindings

ElunaBind* Eluna::GameObjectEventBindings

Definition at line 397 of file LuaEngine.h.

Referenced by Eluna(), and ~Eluna().

◆ GameObjectGossipBindings

ElunaBind* Eluna::GameObjectGossipBindings

Definition at line 398 of file LuaEngine.h.

Referenced by Eluna(), and ~Eluna().

◆ GroupEventBindings

std::map<int, std::vector<int> > Eluna::GroupEventBindings

Definition at line 394 of file LuaEngine.h.

Referenced by Eluna(), Register(), and ~Eluna().

◆ GuildEventBindings

std::map<int, std::vector<int> > Eluna::GuildEventBindings

Definition at line 393 of file LuaEngine.h.

Referenced by Eluna(), Register(), and ~Eluna().

◆ ItemEventBindings

ElunaBind* Eluna::ItemEventBindings

Definition at line 399 of file LuaEngine.h.

Referenced by Eluna(), and ~Eluna().

◆ ItemGossipBindings

ElunaBind* Eluna::ItemGossipBindings

Definition at line 400 of file LuaEngine.h.

Referenced by Eluna(), and ~Eluna().

◆ L

◆ m_EventMgr

EventMgr Eluna::m_EventMgr

Definition at line 385 of file LuaEngine.h.

◆ PlayerEventBindings

std::map<int, std::vector<int> > Eluna::PlayerEventBindings

Definition at line 391 of file LuaEngine.h.

Referenced by Eluna(), Register(), and ~Eluna().

◆ playerGossipBindings

ElunaBind* Eluna::playerGossipBindings

Definition at line 401 of file LuaEngine.h.

Referenced by Eluna(), and ~Eluna().

◆ ServerEventBindings

std::map<int, std::vector<int> > Eluna::ServerEventBindings

Definition at line 390 of file LuaEngine.h.

Referenced by Eluna(), Register(), and ~Eluna().

◆ VehicleEventBindings

std::map<int, std::vector<int> > Eluna::VehicleEventBindings

Definition at line 392 of file LuaEngine.h.

Referenced by Eluna(), Register(), and ~Eluna().


The documentation for this class was generated from the following files: