feat(Scripting): Created two perl/lua scripting hooks for merchants (#5083)
Build / Linux (push) Has been cancelled
Build / Windows (push) Has been cancelled

This commit is contained in:
Dan
2026-05-13 03:18:36 -04:00
committed by GitHub
parent ef6dfe0469
commit ca704c7f88
9 changed files with 148 additions and 16 deletions
+6
View File
@@ -158,6 +158,11 @@ uint32 Lua_ItemInst::GetItemScriptID() {
return self->GetItemScriptID();
}
uint8 Lua_ItemInst::GetItemType() {
Lua_Safe_Call_Int();
return self->GetItemType();
}
int Lua_ItemInst::GetCharges() {
Lua_Safe_Call_Int();
return self->GetCharges();
@@ -497,6 +502,7 @@ luabind::scope lua_register_iteminst() {
.def("GetItemID", (uint32(Lua_ItemInst::*)(int))&Lua_ItemInst::GetItemID)
.def("GetItemLink", (std::string(Lua_ItemInst::*)(void))&Lua_ItemInst::GetItemLink)
.def("GetItemScriptID", (uint32(Lua_ItemInst::*)(void))&Lua_ItemInst::GetItemScriptID)
.def("GetItemType", (uint8(Lua_ItemInst::*)(void)) & Lua_ItemInst::GetItemType)
.def("GetMaxEvolveLvl", (int(Lua_ItemInst::*)(void))&Lua_ItemInst::GetMaxEvolveLvl)
.def("GetName", (std::string(Lua_ItemInst::*)(void))&Lua_ItemInst::GetName)
.def("GetSerialNumber", (int(Lua_ItemInst::*)(void))&Lua_ItemInst::GetSerialNumber)