Eluna implementation (#847)

* azerothcore + eluna done.

* Remove the Eluna single thread limit.

* Read Eluna Settings file.

* submodule change.

* fix(test)  Ubuntu - Cant Link Library after Compile

* The ELUNA is disabled by default.

* remove submodule luaEngine.

* some change

* fix a error

* change cmake

* fix: some onplayerchat does not have hooks.

* Eluna: Add BG event Hooks.

* fix:cmake hook AFTER_LOAD_CONF not work.

* Remove the eluna switch.

* Remove some define in the core.

* fix conf file not read in the linux.

* eluna : change bg hook parameter type

* Remove TC log function call

* change bg hook OnBGEnd parameter type.


Note: to enable Eluna, the module is required
This commit is contained in:
ayase
2018-05-23 02:22:11 +08:00
committed by Barbz
parent 0da1f8c706
commit 00777a80ae
38 changed files with 854 additions and 62 deletions

View File

@@ -18,7 +18,9 @@
#include "UnitAI.h"
#include "GameObjectAI.h"
#include "Transport.h"
#ifdef ELUNA
#include "LuaEngine.h"
#endif
#include <time.h>
bool GameEventMgr::CheckOneGameEvent(uint16 entry) const
@@ -125,6 +127,10 @@ bool GameEventMgr::StartEvent(uint16 event_id, bool overwrite)
if (data.end <= data.start)
data.end = data.start + data.length;
}
#ifdef ELUNA
if (IsActiveEvent(event_id))
sEluna->OnGameEventStart(event_id);
#endif
return false;
}
else
@@ -147,7 +153,10 @@ bool GameEventMgr::StartEvent(uint16 event_id, bool overwrite)
// or to scedule another update where the next event will be started
if (overwrite && conditions_met)
sWorld->ForceGameEventUpdate();
#ifdef ELUNA
if (IsActiveEvent(event_id))
sEluna->OnGameEventStart(event_id);
#endif
return conditions_met;
}
}
@@ -190,6 +199,10 @@ void GameEventMgr::StopEvent(uint16 event_id, bool overwrite)
CharacterDatabase.CommitTransaction(trans);
}
}
#ifdef ELUNA
if (!IsActiveEvent(event_id))
sEluna->OnGameEventStop(event_id);
#endif
}
void GameEventMgr::LoadFromDB()