mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 23:20:25 +00:00
[INT64] Fix int64 for OOC Regen and GetHP(), GetMaxHP(), GetItemHPBonuses() in Perl/Lua. (#2218)
* [INT64] Fix int64 for OOC Regen and GetHP(), GetMaxHP(), GetItemHPBonuses() in Perl/Lua. - These all had int64 values and were overflowing, returning garbage data. * Update npc.cpp
This commit is contained in:
+6
-6
@@ -482,17 +482,17 @@ bool Lua_Mob::IsWarriorClass() {
|
||||
return self->IsWarriorClass();
|
||||
}
|
||||
|
||||
int Lua_Mob::GetHP() {
|
||||
int64 Lua_Mob::GetHP() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetHP();
|
||||
}
|
||||
|
||||
int Lua_Mob::GetMaxHP() {
|
||||
int64 Lua_Mob::GetMaxHP() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetMaxHP();
|
||||
}
|
||||
|
||||
int Lua_Mob::GetItemHPBonuses() {
|
||||
int64 Lua_Mob::GetItemHPBonuses() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetItemHPBonuses();
|
||||
}
|
||||
@@ -1356,9 +1356,9 @@ bool Lua_Mob::DivineAura() {
|
||||
return self->DivineAura();
|
||||
}
|
||||
|
||||
void Lua_Mob::SetOOCRegen(int regen) {
|
||||
void Lua_Mob::SetOOCRegen(int64 new_ooc_regen) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetOOCRegen(regen);
|
||||
self->SetOOCRegen(new_ooc_regen);
|
||||
}
|
||||
|
||||
const char* Lua_Mob::GetEntityVariable(const char *name) {
|
||||
@@ -2860,7 +2860,7 @@ luabind::scope lua_register_mob() {
|
||||
.def("SetLevel", (void(Lua_Mob::*)(int))&Lua_Mob::SetLevel)
|
||||
.def("SetLevel", (void(Lua_Mob::*)(int,bool))&Lua_Mob::SetLevel)
|
||||
.def("SetMana", &Lua_Mob::SetMana)
|
||||
.def("SetOOCRegen", (void(Lua_Mob::*)(int))&Lua_Mob::SetOOCRegen)
|
||||
.def("SetOOCRegen", (void(Lua_Mob::*)(int64))&Lua_Mob::SetOOCRegen)
|
||||
.def("SetPet", &Lua_Mob::SetPet)
|
||||
.def("SetPetOrder", (void(Lua_Mob::*)(int))&Lua_Mob::SetPetOrder)
|
||||
.def("SetPseudoRoot", (void(Lua_Mob::*)(bool))&Lua_Mob::SetPseudoRoot)
|
||||
|
||||
Reference in New Issue
Block a user