mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] Add corpse->RemoveItemByID(item_id, quantity) to Perl and Lua. (#1535)
* [Quest API] Add corpse->RemoveItemByID(item_id, quantity) to Perl and Lua. - Add $corpse->RemoveItemByID(item_id, quantity) to Perl. - Add corpse:RemoveItemByID(item_id, quantity) to Lua. * Formatting.
This commit is contained in:
@@ -177,6 +177,16 @@ uint16 Lua_Corpse::GetFirstSlotByItemID(uint32 item_id) {
|
||||
return self->GetFirstSlotByItemID(item_id);
|
||||
}
|
||||
|
||||
void Lua_Corpse::RemoveItemByID(uint32 item_id) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->RemoveItemByID(item_id);
|
||||
}
|
||||
|
||||
void Lua_Corpse::RemoveItemByID(uint32 item_id, int quantity) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->RemoveItemByID(item_id, quantity);
|
||||
}
|
||||
|
||||
Lua_Corpse_Loot_List Lua_Corpse::GetLootList(lua_State* L) {
|
||||
Lua_Safe_Call_Class(Lua_Corpse_Loot_List);
|
||||
Lua_Corpse_Loot_List ret;
|
||||
@@ -227,6 +237,8 @@ luabind::scope lua_register_corpse() {
|
||||
.def("CountItem", (uint16(Lua_Corpse::*)(uint32))&Lua_Corpse::CountItem)
|
||||
.def("GetItemIDBySlot", (uint32(Lua_Corpse::*)(uint16))&Lua_Corpse::GetItemIDBySlot)
|
||||
.def("GetFirstSlotByItemID", (uint16(Lua_Corpse::*)(uint32))&Lua_Corpse::GetFirstSlotByItemID)
|
||||
.def("RemoveItemByID", (void(Lua_Corpse::*)(uint32))&Lua_Corpse::RemoveItemByID)
|
||||
.def("RemoveItemByID", (void(Lua_Corpse::*)(uint32,int))&Lua_Corpse::RemoveItemByID)
|
||||
.def("GetLootList", (Lua_Corpse_Loot_List(Lua_Corpse::*)(lua_State* L))&Lua_Corpse::GetLootList);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user