[Quest API] Add corpse->GetLootList() and npc->GetLootList() to Perl and Lua. (#1529)

* [Quest API] Add corpse->GetLootList() and npc->GetLootList() to Perl and Lua.
- Add $corpse->GetLootList() to Perl.
- Add $npc->GetLootList() to Perl.
- Add corpse:GetLootList() to Lua.
- Add npc:GetLootList() to Lua.

Returns an array of item IDs for use with corpse and NPC methods such as HasItem(item_id), CountItem(item_id), and GetFirstSlotByItemID(item_id).

* Categories.

* Modify Lua to use classes.
This commit is contained in:
Kinglykrab
2021-09-12 23:38:38 -04:00
committed by GitHub
parent 97dcba70cf
commit 56b9b6f2c4
11 changed files with 148 additions and 8 deletions
+3
View File
@@ -6,12 +6,14 @@
class Corpse;
class Lua_Client;
struct Lua_Corpse_Loot_List;
namespace luabind {
struct scope;
}
luabind::scope lua_register_corpse();
luabind::scope lua_register_corpse_loot_list();
class Lua_Corpse : public Lua_Mob
{
@@ -58,6 +60,7 @@ public:
uint16 CountItem(uint32 item_id);
uint32 GetItemIDBySlot(uint16 loot_slot);
uint16 GetFirstSlotByItemID(uint32 item_id);
Lua_Corpse_Loot_List GetLootList(lua_State* L);
};
#endif