[Quest API] Add GetItemCooldown to return the time remaining on items… (#2811)

* [Quest API] Add GetItemCooldown to return the time remaining on items in seconds

* Change GetItemCooldown to uint32 for timers up to 130 years
This commit is contained in:
Natedog2012
2023-01-30 00:04:06 -06:00
committed by GitHub
parent 4d2418af9d
commit 66896a3121
5 changed files with 38 additions and 0 deletions
+7
View File
@@ -3026,6 +3026,12 @@ void Lua_Client::SetItemCooldown(uint32 item_id, uint32 in_time)
self->SetItemCooldown(item_id, false, in_time);
}
uint32 Lua_Client::GetItemCooldown(uint32 item_id)
{
Lua_Safe_Call_Int();
return self->GetItemCooldown(item_id);
}
luabind::scope lua_register_client() {
return luabind::class_<Lua_Client, Lua_Mob>("Client")
.def(luabind::constructor<>())
@@ -3216,6 +3222,7 @@ luabind::scope lua_register_client() {
.def("GetInventory", (Lua_Inventory(Lua_Client::*)(void))&Lua_Client::GetInventory)
.def("GetInvulnerableEnvironmentDamage", (bool(Lua_Client::*)(void))&Lua_Client::GetInvulnerableEnvironmentDamage)
.def("GetItemIDAt", (int(Lua_Client::*)(int))&Lua_Client::GetItemIDAt)
.def("GetItemCooldown", (uint32(Lua_Client::*)(uint32))&Lua_Client::GetItemCooldown)
.def("GetLDoNLosses", (int(Lua_Client::*)(void))&Lua_Client::GetLDoNLosses)
.def("GetLDoNLossesTheme", (int(Lua_Client::*)(int))&Lua_Client::GetLDoNLossesTheme)
.def("GetLDoNPointsTheme", (int(Lua_Client::*)(int))&Lua_Client::GetLDoNPointsTheme)