diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 65dd1bde7..47b14a898 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -8023,6 +8023,23 @@ XS(XS__getspell) { } } +XS(XS__getldonthemename); +XS(XS__getldonthemename) { + dXSARGS; + if (items != 1) + Perl_croak(aTHX_ "Usage: quest::getldonthemename(uint32 theme_id)"); + { + dXSTARG; + uint32 theme_id = (uint32) SvUV(ST(0)); + std::string theme_name = quest_manager.getldonthemename(theme_id); + + sv_setpv(TARG, theme_name.c_str()); + XSprePUSH; + PUSHTARG; + XSRETURN(1); + } +} + XS(XS__getfactionname); XS(XS__getfactionname) { dXSARGS; @@ -8034,7 +8051,7 @@ XS(XS__getfactionname) { std::string faction_name = quest_manager.getfactionname(faction_id); sv_setpv(TARG, faction_name.c_str()); - XSprePUSH; + XSprePUSH; PUSHTARG; XSRETURN(1); } @@ -8372,7 +8389,8 @@ EXTERN_C XS(boot_quest) { newXS(strcpy(buf, "getitemname"), XS__getitemname, file); newXS(strcpy(buf, "getItemName"), XS_qc_getItemName, file); newXS(strcpy(buf, "getitemstat"), XS__getitemstat, file); - newXS(strcpy(buf, "getlanguagename"), XS__getlanguagename, file); + newXS(strcpy(buf, "getlanguagename"), XS__getlanguagename, file); + newXS(strcpy(buf, "getldonthemename"), XS__getldonthemename, file); newXS(strcpy(buf, "getnpcnamebyid"), XS__getnpcnamebyid, file); newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file); newXS(strcpy(buf, "getcharnamebyid"), XS__getcharnamebyid, file); diff --git a/zone/lua_general.cpp b/zone/lua_general.cpp index f0213f0b4..d3a5916d0 100644 --- a/zone/lua_general.cpp +++ b/zone/lua_general.cpp @@ -3351,6 +3351,10 @@ Lua_Spell lua_get_spell(uint32 spell_id) { return Lua_Spell(spell_id); } +std::string lua_get_ldon_theme_name(uint32 theme_id) { + return quest_manager.getldonthemename(theme_id); +} + std::string lua_get_faction_name(int faction_id) { return quest_manager.getfactionname(faction_id); } @@ -3806,6 +3810,7 @@ luabind::scope lua_register_general() { luabind::def("is_npc_spawned", &lua_is_npc_spawned), luabind::def("count_spawned_npcs", &lua_count_spawned_npcs), luabind::def("get_spell", &lua_get_spell), + luabind::def("get_ldon_theme_name", &lua_get_ldon_theme_name), luabind::def("get_faction_name", &lua_get_faction_name), luabind::def("get_language_name", &lua_get_language_name), luabind::def("get_body_type_name", &lua_get_body_type_name), diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index c8242117b..7a4d722a7 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -1036,6 +1036,10 @@ std::string QuestManager::getskillname(int skill_id) { return EQ::skills::GetSkillName(static_cast(skill_id)); } +std::string QuestManager::getldonthemename(uint32 theme_id) { + return EQ::constants::GetLDoNThemeName(theme_id); +} + std::string QuestManager::getfactionname(int faction_id) { return content_db.GetFactionName(faction_id); } diff --git a/zone/questmgr.h b/zone/questmgr.h index 1836ae289..c03633c89 100644 --- a/zone/questmgr.h +++ b/zone/questmgr.h @@ -115,6 +115,7 @@ public: std::string getracename(uint16 race_id); std::string getspellname(uint32 spell_id); std::string getskillname(int skill_id); + std::string getldonthemename(uint32 theme_id); std::string getfactionname(int faction_id); std::string getlanguagename(int language_id); std::string getbodytypename(uint32 bodytype_id);