Added single target HalveAggro and DoubleAggro

Both exported to perl/lua
pass the target you wish to change their hate.
This commit is contained in:
Michael Cook (mackal)
2014-02-18 16:52:51 -05:00
parent 068bd57fbc
commit 6e474f22a2
4 changed files with 85 additions and 1 deletions
+12
View File
@@ -908,6 +908,16 @@ void Lua_Mob::SetHate(Lua_Mob other, int hate, int damage) {
self->SetHate(other, hate, damage);
}
void Lua_Mob::HalveAggro(Lua_Mob other) {
Lua_Safe_Call_Void();
self->HalveAggro(other);
}
void Lua_Mob::DoubleAggro(Lua_Mob other) {
Lua_Safe_Call_Void();
self->DoubleAggro(other);
}
uint32 Lua_Mob::GetHateAmount(Lua_Mob target) {
Lua_Safe_Call_Int();
return self->GetHateAmount(target);
@@ -1962,6 +1972,8 @@ luabind::scope lua_register_mob() {
.def("SetHate", (void(Lua_Mob::*)(Lua_Mob))&Lua_Mob::SetHate)
.def("SetHate", (void(Lua_Mob::*)(Lua_Mob,int))&Lua_Mob::SetHate)
.def("SetHate", (void(Lua_Mob::*)(Lua_Mob,int,int))&Lua_Mob::SetHate)
.def("HalveAggro", &Lua_Mob::HalveAggro)
.def("DoubleAggro", &Lua_Mob::DoubleAggro)
.def("GetHateAmount", (uint32(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetHateAmount)
.def("GetHateAmount", (uint32(Lua_Mob::*)(Lua_Mob,bool))&Lua_Mob::GetHateAmount)
.def("GetDamageAmount", (uint32(Lua_Mob::*)(Lua_Mob))&Lua_Mob::GetDamageAmount)