mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
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:
@@ -24,6 +24,10 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ChatLink.h"
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
#endif
|
||||
|
||||
bool ChatHandler::load_command_table = true;
|
||||
|
||||
std::vector<ChatCommand> const& ChatHandler::getCommandTable()
|
||||
@@ -272,6 +276,10 @@ bool ChatHandler::ExecuteCommandInTable(std::vector<ChatCommand> const& table, c
|
||||
{
|
||||
if (!ExecuteCommandInTable(table[i].ChildCommands, text, fullcmd.c_str()))
|
||||
{
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnCommand(GetSession() ? GetSession()->GetPlayer() : NULL, oldtext))
|
||||
return true;
|
||||
#endif
|
||||
if (text[0] != '\0')
|
||||
SendSysMessage(LANG_NO_SUBCMD);
|
||||
else
|
||||
@@ -421,6 +429,10 @@ bool ChatHandler::ParseCommands(char const* text)
|
||||
|
||||
if (!ExecuteCommandInTable(getCommandTable(), text, fullcmd))
|
||||
{
|
||||
#ifdef ELUNA
|
||||
if (!sEluna->OnCommand(GetSession() ? GetSession()->GetPlayer() : NULL, text))
|
||||
return true;
|
||||
#endif
|
||||
if (m_session && AccountMgr::IsPlayerAccount(m_session->GetSecurity()))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user