mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-06 21:53:51 +00:00
[Quest API] Add getdeityname(deity_id) to Perl/Lua. (#1404)
- Add quest::getdeityname(deity_id) to Perl. - Add eq.get_deity_name(deity_id) to Lua. Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
parent
ed6e53be54
commit
f8a72296e6
@ -6774,6 +6774,19 @@ XS(XS__getcleannpcnamebyid) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
|
||||
XS(XS__getdeityname);
|
||||
XS(XS__getdeityname) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: quest::getdeityname(uint32 deity_id)");
|
||||
|
||||
dXSTARG;
|
||||
uint32 deity_id = (uint32) SvUV(ST(0));
|
||||
auto deity_name = quest_manager.getdeityname(deity_id);
|
||||
sv_setpv(TARG, deity_name.c_str());
|
||||
}
|
||||
|
||||
XS(XS__getinventoryslotname);
|
||||
XS(XS__getinventoryslotname) {
|
||||
dXSARGS;
|
||||
@ -7041,6 +7054,7 @@ EXTERN_C XS(boot_quest) {
|
||||
newXS(strcpy(buf, "get_spawn_condition"), XS__get_spawn_condition, file);
|
||||
newXS(strcpy(buf, "getcharnamebyid"), XS__getcharnamebyid, file);
|
||||
newXS(strcpy(buf, "getcurrencyitemid"), XS__getcurrencyitemid, file);
|
||||
newXS(strcpy(buf, "getdeityname"), XS__getdeityname, file);
|
||||
newXS(strcpy(buf, "getguildnamebyid"), XS__getguildnamebyid, file);
|
||||
newXS(strcpy(buf, "getguildidbycharid"), XS__getguildidbycharid, file);
|
||||
newXS(strcpy(buf, "getgroupidbycharid"), XS__getgroupidbycharid, file);
|
||||
|
||||
@ -2460,6 +2460,10 @@ std::string lua_get_clean_npc_name_by_id(uint32 npc_id) {
|
||||
}
|
||||
|
||||
|
||||
std::string lua_get_deity_name(uint32 deity_id) {
|
||||
return quest_manager.getdeityname(deity_id);
|
||||
}
|
||||
|
||||
std::string lua_get_inventory_slot_name(int16 slot_id) {
|
||||
return quest_manager.getinventoryslotname(slot_id);
|
||||
}
|
||||
@ -3033,9 +3037,10 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("cross_zone_add_ldon_loss_by_expedition_id", &lua_cross_zone_add_ldon_loss_by_expedition_id),
|
||||
luabind::def("cross_zone_add_ldon_points_by_expedition_id", &lua_cross_zone_add_ldon_points_by_expedition_id),
|
||||
luabind::def("cross_zone_add_ldon_win_by_expedition_id", &lua_cross_zone_add_ldon_win_by_expedition_id),
|
||||
luabind::def("get_deity_name", &lua_get_deity_name),
|
||||
luabind::def("get_inventory_slot_name", &lua_get_inventory_slot_name),
|
||||
luabind::def("rename", &lua_rename),
|
||||
|
||||
|
||||
/**
|
||||
* Expansions
|
||||
*/
|
||||
|
||||
@ -4601,6 +4601,7 @@ std::string QuestManager::gethexcolorcode(std::string color_name) {
|
||||
double QuestManager::GetAAEXPModifierByCharID(uint32 character_id, uint32 zone_id) const {
|
||||
return database.GetAAEXPModifier(character_id, zone_id);
|
||||
}
|
||||
|
||||
double QuestManager::GetEXPModifierByCharID(uint32 character_id, uint32 zone_id) const {
|
||||
return database.GetEXPModifier(character_id, zone_id);
|
||||
}
|
||||
@ -4625,6 +4626,11 @@ void QuestManager::CrossZoneLDoNUpdate(uint8 type, uint8 subtype, int identifier
|
||||
safe_delete(pack);
|
||||
}
|
||||
|
||||
std::string QuestManager::getdeityname(uint32 deity_id) {
|
||||
return EQ::deity::DeityName(static_cast<EQ::deity::DeityType>(deity_id));
|
||||
}
|
||||
|
||||
std::string QuestManager::getinventoryslotname(int16 slot_id) {
|
||||
return EQ::invslot::GetInvPossessionsSlotName(slot_id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -381,6 +381,7 @@ public:
|
||||
double GetEXPModifierByCharID(uint32 character_id, uint32 zone_id) const;
|
||||
void SetAAEXPModifierByCharID(uint32 character_id, uint32 zone_id, double aa_modifier);
|
||||
void SetEXPModifierByCharID(uint32 character_id, uint32 zone_id, double exp_modifier);
|
||||
std::string getdeityname(uint32 deity_id);
|
||||
std::string getinventoryslotname(int16 slot_id);
|
||||
|
||||
Client *GetInitiator() const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user