Added rules for what int mobs need to not attack red cons and how much food and drink is taken per stamina update.

Added mod hooks for food/drink values and mob aggro.
Added quest functions for getting/setting hunger and thirst.
This commit is contained in:
Tabasco
2013-08-01 19:24:15 -05:00
parent 936c8cce4b
commit fc03ee94e2
11 changed files with 296 additions and 37 deletions
+31
View File
@@ -1204,6 +1204,31 @@ void Lua_Client::QueuePacket(Lua_Packet app, bool ack_req, int client_connection
self->QueuePacket(app, ack_req, static_cast<Mob::CLIENT_CONN_STATUS>(client_connection_status), static_cast<eqFilterType>(filter));
}
int32 Lua_Client::GetHunger() {
Lua_Safe_Call_Int();
return self->GetHunger();
}
int32 Lua_Client::GetThirst() {
Lua_Safe_Call_Int();
return self->GetThirst();
}
void Lua_Client::SetHunger(int32 in_hunger) {
Lua_Safe_Call_Void();
self->SetHunger(in_hunger);
}
void Lua_Client::SetThirst(int32 in_thirst) {
Lua_Safe_Call_Void();
self->SetThirst(in_thirst);
}
void Lua_Client::SetConsumption(int32 in_hunger, int32 in_thirst) {
Lua_Safe_Call_Void();
self->SetConsumption(in_hunger, in_thirst);
}
luabind::scope lua_register_client() {
return luabind::class_<Lua_Client, Lua_Mob>("Client")
.def(luabind::constructor<>())
@@ -1444,6 +1469,12 @@ luabind::scope lua_register_client() {
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool))&Lua_Client::QueuePacket)
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool,int))&Lua_Client::QueuePacket)
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool,int,int))&Lua_Client::QueuePacket);
.def("QueuePacket", (void(Lua_Client::*)(Lua_Packet,bool,int,int))&Lua_Client::QueuePacket)
.def("GetHunger", (int32(Lua_Client::*)(void))&Lua_Client::GetHunger)
.def("GetThirst", (int32(Lua_Client::*)(void))&Lua_Client::GetThirst)
.def("SetHunger", (void(Lua_Client::*)(int32))&Lua_Client::SetHunger)
.def("SetThirst", (void(Lua_Client::*)(int32))&Lua_Client::SetThirst)
.def("SetConsumption", (void(Lua_Client::*)(int32, int32))&Lua_Client::SetConsumption);
}
luabind::scope lua_register_inventory_where() {