mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 11:36:36 +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
@@ -1579,7 +1579,7 @@ XS(XS_Mob_GetHP) {
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetHP(THIS)"); // @categories Stats and Attributes
|
||||
{
|
||||
Mob *THIS;
|
||||
int32 RETVAL;
|
||||
int64 RETVAL;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
RETVAL = THIS->GetHP();
|
||||
@@ -1596,7 +1596,7 @@ XS(XS_Mob_GetMaxHP) {
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetMaxHP(THIS)"); // @categories Stats and Attributes
|
||||
{
|
||||
Mob *THIS;
|
||||
int32 RETVAL;
|
||||
int64 RETVAL;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
RETVAL = THIS->GetMaxHP();
|
||||
@@ -1613,7 +1613,7 @@ XS(XS_Mob_GetItemHPBonuses) {
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetItemHPBonuses(THIS)"); // @categories Inventory and Items, Stats and Attributes
|
||||
{
|
||||
Mob *THIS;
|
||||
int32 RETVAL;
|
||||
int64 RETVAL;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
RETVAL = THIS->GetItemHPBonuses();
|
||||
@@ -4417,12 +4417,12 @@ XS(XS_Mob_SetOOCRegen); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_SetOOCRegen) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Mob::SetOOCRegen(THIS, int32 new_ooc_regen)"); // @categories Stats and Attributes
|
||||
Perl_croak(aTHX_ "Usage: Mob::SetOOCRegen(THIS, int64 new_ooc_regen)"); // @categories Stats and Attributes
|
||||
{
|
||||
Mob *THIS;
|
||||
int32 newoocregen = (int32) SvIV(ST(1));
|
||||
int64 new_ooc_regen = (int64) SvIV(ST(1));
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
THIS->SetOOCRegen(newoocregen);
|
||||
THIS->SetOOCRegen(new_ooc_regen);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user