eqemu-server/zone/lua_hate_list.cpp
Chris Miles f201d4c999
[int64] Support for HP / Mana / End / Damage / Hate (#2091)
* Initial int64 work

* Hate 64 bit

* Update special_attacks.cpp

* Aggro / Damage / Hate int64

* NPC edit adjustments

* Fix bot compile

* More int64 adjustments

* More int64 references

* npcedit references

* aggrozone

* More int64 changes

* More int64 changes for damage

* Many more damage int64 references

* More spell damage int64 conversions

* HealDamage

* Damage fully working

* Remove debug

* Add migration

* More int64 adjustments

* Much wow, many int64

* More int64

* PR adjustments
2022-05-07 22:32:02 -05:00

69 lines
1.6 KiB
C++

#ifdef LUA_EQEMU
#include "lua.hpp"
#include <luabind/luabind.hpp>
#include <luabind/object.hpp>
#include <luabind/iterator_policy.hpp>
#include "masterentity.h"
#include "hate_list.h"
#include "lua_mob.h"
#include "lua_hate_list.h"
Lua_Mob Lua_HateEntry::GetEnt() {
Lua_Safe_Call_Class(Lua_Mob);
return Lua_Mob(self->entity_on_hatelist);
}
void Lua_HateEntry::SetEnt(Lua_Mob e) {
Lua_Safe_Call_Void();
self->entity_on_hatelist = e;
}
int64 Lua_HateEntry::GetDamage() {
Lua_Safe_Call_Int();
return self->hatelist_damage;
}
void Lua_HateEntry::SetDamage(int64 value) {
Lua_Safe_Call_Void();
self->hatelist_damage = value;
}
uint64 Lua_HateEntry::GetHate() {
Lua_Safe_Call_Int();
return self->stored_hate_amount;
}
void Lua_HateEntry::SetHate(uint64 value) {
Lua_Safe_Call_Void();
self->stored_hate_amount = value;
}
int Lua_HateEntry::GetFrenzy() {
Lua_Safe_Call_Int();
return self->is_entity_frenzy;
}
void Lua_HateEntry::SetFrenzy(bool value) {
Lua_Safe_Call_Void();
self->is_entity_frenzy = value;
}
luabind::scope lua_register_hate_entry() {
return luabind::class_<Lua_HateEntry>("HateEntry")
.property("null", &Lua_HateEntry::Null)
.property("valid", &Lua_HateEntry::Valid)
.property("damage", &Lua_HateEntry::GetDamage, &Lua_HateEntry::SetDamage)
.property("ent", &Lua_HateEntry::GetEnt, &Lua_HateEntry::SetEnt)
.property("frenzy", &Lua_HateEntry::GetFrenzy, &Lua_HateEntry::SetFrenzy)
.property("hate", &Lua_HateEntry::GetHate, &Lua_HateEntry::SetHate);
}
luabind::scope lua_register_hate_list() {
return luabind::class_<Lua_HateList>("HateList")
.def_readwrite("entries", &Lua_HateList::entries, luabind::return_stl_iterator);
}
#endif