mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
feat: add OnError event
This commit is contained in:
@@ -579,6 +579,7 @@ int Eluna::StackTrace(lua_State *_L)
|
|||||||
|
|
||||||
// dirty stack?
|
// dirty stack?
|
||||||
// Stack: errmsg, debug, tracemsg
|
// Stack: errmsg, debug, tracemsg
|
||||||
|
sEluna->OnError(std::string(lua_tostring(_L, -1)));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "LFG.h"
|
#include "LFG.h"
|
||||||
#include "ElunaUtility.h"
|
#include "ElunaUtility.h"
|
||||||
#include "HttpManager.h"
|
#include "HttpManager.h"
|
||||||
|
#include "EventEmitter.h"
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
@@ -241,6 +242,7 @@ public:
|
|||||||
EventMgr* eventMgr;
|
EventMgr* eventMgr;
|
||||||
HttpManager httpManager;
|
HttpManager httpManager;
|
||||||
QueryCallbackProcessor queryProcessor;
|
QueryCallbackProcessor queryProcessor;
|
||||||
|
EventEmitter<void(std::string)> OnError;
|
||||||
|
|
||||||
BindingMap< EventKey<Hooks::ServerEvents> >* ServerEventBindings;
|
BindingMap< EventKey<Hooks::ServerEvents> >* ServerEventBindings;
|
||||||
BindingMap< EventKey<Hooks::PlayerEvents> >* PlayerEventBindings;
|
BindingMap< EventKey<Hooks::PlayerEvents> >* PlayerEventBindings;
|
||||||
|
|||||||
Reference in New Issue
Block a user