mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Eluna improve object variable extension
This commit is contained in:
50
HookMgr.cpp
50
HookMgr.cpp
@@ -1272,20 +1272,18 @@ void Eluna::OnUpdate(Map* map, uint32 diff)
|
||||
EVENT_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
void Eluna::OnRemove(Map* map, Creature* creature)
|
||||
void Eluna::OnRemove(GameObject* gameobject)
|
||||
{
|
||||
EVENT_BEGIN(ServerEventBindings, MAP_EVENT_ON_REMOVE_CREATURE, return);
|
||||
Push(L, map);
|
||||
Push(L, creature);
|
||||
ENTRY_EXECUTE(0);
|
||||
EVENT_BEGIN(ServerEventBindings, WORLD_EVENT_ON_DELETE_GAMEOBJECT, return);
|
||||
Push(L, gameobject);
|
||||
EVENT_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
void Eluna::OnRemove(Map* map, GameObject* gameobject)
|
||||
void Eluna::OnRemove(Creature* creature)
|
||||
{
|
||||
EVENT_BEGIN(ServerEventBindings, MAP_EVENT_ON_REMOVE_GAMEOBJECT, return);
|
||||
Push(L, map);
|
||||
Push(L, gameobject);
|
||||
ENTRY_EXECUTE(0);
|
||||
EVENT_BEGIN(ServerEventBindings, WORLD_EVENT_ON_DELETE_CREATURE, return);
|
||||
Push(L, creature);
|
||||
EVENT_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
@@ -1392,6 +1390,22 @@ void Eluna::OnSummoned(Creature* pCreature, Unit* pSummoner)
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
void Eluna::OnAddToWorld(Creature* creature)
|
||||
{
|
||||
ENTRY_BEGIN(CreatureEventBindings, creature->GetEntry(), CREATURE_EVENT_ON_ADD, return);
|
||||
Push(L, creature);
|
||||
ENTRY_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
void Eluna::OnRemoveFromWorld(Creature* creature)
|
||||
{
|
||||
ENTRY_BEGIN(CreatureEventBindings, creature->GetEntry(), CREATURE_EVENT_ON_REMOVE, return);
|
||||
Push(L, creature);
|
||||
ENTRY_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
struct ElunaCreatureAI : ScriptedAI
|
||||
{
|
||||
#ifndef TRINITY
|
||||
@@ -1845,6 +1859,22 @@ void Eluna::OnSpawn(GameObject* gameobject)
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
void Eluna::OnAddToWorld(GameObject* gameobject)
|
||||
{
|
||||
ENTRY_BEGIN(GameObjectEventBindings, gameobject->GetEntry(), GAMEOBJECT_EVENT_ON_ADD, return);
|
||||
Push(L, gameobject);
|
||||
ENTRY_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
void Eluna::OnRemoveFromWorld(GameObject* gameobject)
|
||||
{
|
||||
ENTRY_BEGIN(GameObjectEventBindings, gameobject->GetEntry(), GAMEOBJECT_EVENT_ON_REMOVE, return);
|
||||
Push(L, gameobject);
|
||||
ENTRY_EXECUTE(0);
|
||||
ENDCALL();
|
||||
}
|
||||
|
||||
CreatureAI* Eluna::GetAI(Creature* creature)
|
||||
{
|
||||
if (!CreatureEventBindings->GetBindMap(creature->GetEntry()))
|
||||
|
||||
Reference in New Issue
Block a user