mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 14:41:28 +00:00
Add quest debugging to lua
This commit is contained in:
parent
cced57f56a
commit
8649ed1dcb
@ -1,5 +1,12 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 02/01/2015 ==
|
||||
demonstar55: Add quest debugging to lua
|
||||
eq.debug("Test debug level implicit 1")
|
||||
eq.debug("Test debug level explicit 1", 1)
|
||||
eq.debug("Test debug level explicit 2", 2)
|
||||
eq.debug("Test debug level explicit 3", 3)
|
||||
|
||||
== 01/31/2015 ==
|
||||
Trevius: Fixed FindGroundZ() and GetGroundZ() to once again utilize the X and Y arguments that are passed to them.
|
||||
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "questmgr.h"
|
||||
#include "qglobals.h"
|
||||
#include "../common/timer.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
|
||||
struct Events { };
|
||||
struct Factions { };
|
||||
@ -1221,7 +1222,6 @@ std::string lua_get_encounter() {
|
||||
return quest_manager.GetEncounter();
|
||||
}
|
||||
|
||||
|
||||
void lua_map_opcodes() {
|
||||
MapOpcodes();
|
||||
}
|
||||
@ -1249,6 +1249,17 @@ double lua_clock() {
|
||||
return static_cast<double>(t) / 1000.0;
|
||||
}
|
||||
|
||||
void lua_debug(std::string message) {
|
||||
Log.Out(Logs::General, Logs::QuestDebug, message);
|
||||
}
|
||||
|
||||
void lua_debug(std::string message, int level) {
|
||||
if (level < Logs::General || level > Logs::Detail)
|
||||
return;
|
||||
|
||||
Log.Out(static_cast<Logs::DebugLevel>(level), Logs::QuestDebug, message);
|
||||
}
|
||||
|
||||
#define LuaCreateNPCParse(name, c_type, default_value) do { \
|
||||
cur = table[#name]; \
|
||||
if(luabind::type(cur) != LUA_TNIL) { \
|
||||
@ -1582,7 +1593,9 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("disable_recipe", &lua_disable_recipe),
|
||||
luabind::def("clear_npctype_cache", &lua_clear_npctype_cache),
|
||||
luabind::def("clock", &lua_clock),
|
||||
luabind::def("create_npc", &lua_create_npc)
|
||||
luabind::def("create_npc", &lua_create_npc),
|
||||
luabind::def("debug", (void(*)(std::string))&lua_debug),
|
||||
luabind::def("debug", (void(*)(std::string, int))&lua_debug)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user