mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Quest API] Add inventory->CountItemEquippedByID(item_id) and inventory->HasItemEquippedByID(item_id) to Perl/Lua. (#1963)
- Add $inventory->CountItemEquippedByID(item_id) to Perl. - Add $inventory->HasItemEquippedByID(item_id) to Perl. - Add inventory:CountItemEquippedByID(item_id) to Lua. - Add inventory:HasItemEquippedByID(item_id) to Lua
This commit is contained in:
@@ -174,6 +174,16 @@ bool Lua_Inventory::HasAugmentEquippedByID(uint32 item_id) {
|
||||
return self->HasAugmentEquippedByID(item_id);
|
||||
}
|
||||
|
||||
int Lua_Inventory::CountItemEquippedByID(uint32 item_id) {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->CountItemEquippedByID(item_id);
|
||||
}
|
||||
|
||||
bool Lua_Inventory::HasItemEquippedByID(uint32 item_id) {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasItemEquippedByID(item_id);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_inventory() {
|
||||
return luabind::class_<Lua_Inventory>("Inventory")
|
||||
.def(luabind::constructor<>())
|
||||
@@ -185,6 +195,7 @@ luabind::scope lua_register_inventory() {
|
||||
.def("CanItemFitInContainer", (bool(Lua_Inventory::*)(Lua_Item,Lua_Item))&Lua_Inventory::CanItemFitInContainer)
|
||||
.def("CheckNoDrop", (bool(Lua_Inventory::*)(int))&Lua_Inventory::CheckNoDrop)
|
||||
.def("CountAugmentEquippedByID", (int(Lua_Inventory::*)(uint32))&Lua_Inventory::CountAugmentEquippedByID)
|
||||
.def("CountItemEquippedByID", (int(Lua_Inventory::*)(uint32))&Lua_Inventory::CountItemEquippedByID)
|
||||
.def("DeleteItem", (bool(Lua_Inventory::*)(int))&Lua_Inventory::DeleteItem)
|
||||
.def("DeleteItem", (bool(Lua_Inventory::*)(int,int))&Lua_Inventory::DeleteItem)
|
||||
.def("FindFreeSlot", (int(Lua_Inventory::*)(bool,bool))&Lua_Inventory::FindFreeSlot)
|
||||
@@ -202,6 +213,7 @@ luabind::scope lua_register_inventory() {
|
||||
.def("HasItemByUse", (int(Lua_Inventory::*)(int))&Lua_Inventory::HasItemByUse)
|
||||
.def("HasItemByUse", (int(Lua_Inventory::*)(int,uint8))&Lua_Inventory::HasItemByUse)
|
||||
.def("HasItemByUse", (int(Lua_Inventory::*)(int,uint8,uint8))&Lua_Inventory::HasItemByUse)
|
||||
.def("HasItemEquippedByID", (bool(Lua_Inventory::*)(uint32))&Lua_Inventory::HasItemEquippedByID)
|
||||
.def("HasSpaceForItem", (bool(Lua_Inventory::*)(Lua_Item,int))&Lua_Inventory::HasSpaceForItem)
|
||||
.def("PopItem", (Lua_ItemInst(Lua_Inventory::*)(int))&Lua_Inventory::PopItem)
|
||||
.def("PushCursor", (int(Lua_Inventory::*)(Lua_ItemInst))&Lua_Inventory::PushCursor)
|
||||
|
||||
Reference in New Issue
Block a user