[Quest API] Add Bot::Camp() to Perl/Lua. (#2718)

# Perl
- Add `$bot->Camp()`.
- Add `$bot->Camp(save_to_database)`.

# Lua
- Add `bot:Camp()`.
- Add `bot:Camp(save_to_database)`.

# Notes
- Saves to database by default, overload is for edge case where a user may not want bot to save to database.
This commit is contained in:
Alex King
2023-01-10 21:44:55 -05:00
committed by GitHub
parent 09d1dc6a24
commit 4df9fa89bc
5 changed files with 32 additions and 9 deletions
+12
View File
@@ -360,6 +360,16 @@ uint32 Lua_Bot::GetBotID() {
return self->GetBotID();
}
void Lua_Bot::Camp() {
Lua_Safe_Call_Void();
self->Camp();
}
void Lua_Bot::Camp(bool save_to_database) {
Lua_Safe_Call_Void();
self->Camp(save_to_database);
}
luabind::scope lua_register_bot() {
return luabind::class_<Lua_Bot, Lua_Mob>("Bot")
.def(luabind::constructor<>())
@@ -378,6 +388,8 @@ luabind::scope lua_register_bot() {
.def("ApplySpellGroup", (void(Lua_Bot::*)(int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int))&Lua_Bot::ApplySpellGroup)
.def("ApplySpellGroup", (void(Lua_Bot::*)(int,int,bool))&Lua_Bot::ApplySpellGroup)
.def("Camp", (void(Lua_Bot::*)(void))&Lua_Bot::Camp)
.def("Camp", (void(Lua_Bot::*)(bool))&Lua_Bot::Camp)
.def("CountBotItem", (uint32(Lua_Bot::*)(uint32))&Lua_Bot::CountBotItem)
.def("CountItemEquippedByID", (int(Lua_Bot::*)(uint32))&Lua_Bot::CountItemEquippedByID)
.def("Escape", (void(Lua_Bot::*)(void))&Lua_Bot::Escape)