[Quest API] Expand Bot quest API functionality. (#2096)

* [Quest API] Expand Bot quest API functionality.
- Add $bot->AddItem(slot_id, item_id, charges, attuned, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six) to Perl.
- Add $bot->CountItem(item_id) to Perl.
- Add $bot->HasItem(item_id) to Perl.
- Add $bot->RemoveItem(item_id) to Perl.
- Add bot:AddItem(slot_id, item_id, charges, attuned, augment_one, augment_two, augment_three, augment_four, augment_five, augment_six) to Lua.
- Add bot:CountItem(item_id) to Lua.
- Add bot:GetOwner() to Lua.
- Add bot:HasItem(item_id) to Lua.
- Add bot:RemoveItem(item_id) to Lua.

* Fix possible crash.
This commit is contained in:
Kinglykrab
2022-05-03 23:04:54 -04:00
committed by GitHub
parent 837c0a4385
commit b2b87ea4e0
6 changed files with 1234 additions and 753 deletions
+15
View File
@@ -7,6 +7,7 @@
class Bot;
class Lua_Bot;
class Lua_Mob;
namespace luabind {
struct scope;
@@ -25,6 +26,20 @@ public:
operator Bot*() {
return reinterpret_cast<Bot*>(GetLuaPtrData());
}
void AddItem(uint16 slot_id, uint32 item_id);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three, uint32 augment_four);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three, uint32 augment_four, uint32 augment_five);
void AddItem(uint16 slot_id, uint32 item_id, int16 charges, bool attuned, uint32 augment_one, uint32 augment_two, uint32 augment_three, uint32 augment_four, uint32 augment_five, uint32 augment_six);
uint32 CountItem(uint32 item_id);
Lua_Mob GetOwner();
bool HasItem(uint32 item_id);
void RemoveItem(uint32 item_id);
};
#endif