mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Small bug fixes with encounters, also added eq.load_encounter_with_data(encounter_name, data_string) and unload as well. Allows you to send a message via the encounter system load
This commit is contained in:
+7
-1
@@ -601,6 +601,12 @@ int LuaParser::_EventEncounter(std::string package_name, QuestEventID evt, std::
|
||||
lua_pushstring(L, encounter_name.c_str());
|
||||
lua_setfield(L, -2, "name");
|
||||
|
||||
if(extra_pointers) {
|
||||
std::string *str = EQEmu::any_cast<std::string*>(extra_pointers->at(0));
|
||||
lua_pushstring(L, str->c_str());
|
||||
lua_setfield(L, -2, "data");
|
||||
}
|
||||
|
||||
quest_manager.StartQuest(nullptr, nullptr, nullptr);
|
||||
if(lua_pcall(L, 1, 1, 0)) {
|
||||
std::string error = lua_tostring(L, -1);
|
||||
@@ -839,7 +845,7 @@ void LuaParser::ReloadQuests() {
|
||||
if(f) {
|
||||
fclose(f);
|
||||
|
||||
if(luaL_dofile(L, "quests/global/script_init.lua")) {
|
||||
if(luaL_dofile(L, path.c_str())) {
|
||||
std::string error = lua_tostring(L, -1);
|
||||
AddError(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user