mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
merge upstream
This commit is contained in:
+30
-3
@@ -2933,6 +2933,32 @@ XS(XS_Mob_GetCorruption)
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetPhR); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_GetPhR)
|
||||
{
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetPhR(THIS)");
|
||||
{
|
||||
Mob * THIS;
|
||||
int32 RETVAL;
|
||||
dXSTARG;
|
||||
|
||||
if (sv_derived_from(ST(0), "Mob")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
THIS = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
Perl_croak(aTHX_ "THIS is not of type Mob");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetPhR();
|
||||
XSprePUSH; PUSHi((IV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetMaxSTR); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_GetMaxSTR)
|
||||
{
|
||||
@@ -5354,7 +5380,7 @@ XS(XS_Mob_SetHate)
|
||||
damage = (int32)SvIV(ST(3));
|
||||
}
|
||||
|
||||
THIS->SetHate(other, hate, damage);
|
||||
THIS->SetHateAmountOnEnt(other, hate, damage);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
@@ -6599,7 +6625,7 @@ XS(XS_Mob_GetHateList)
|
||||
|
||||
while(iter != hate_list.end())
|
||||
{
|
||||
tHateEntry *entry = (*iter);
|
||||
struct_HateList *entry = (*iter);
|
||||
ST(0) = sv_newmortal();
|
||||
sv_setref_pv(ST(0), "HateEntry", (void*)entry);
|
||||
XPUSHs(ST(0));
|
||||
@@ -8459,7 +8485,8 @@ XS(boot_Mob)
|
||||
newXSproto(strcpy(buf, "GetDR"), XS_Mob_GetDR, file, "$");
|
||||
newXSproto(strcpy(buf, "GetPR"), XS_Mob_GetPR, file, "$");
|
||||
newXSproto(strcpy(buf, "GetCR"), XS_Mob_GetCR, file, "$");
|
||||
newXSproto(strcpy(buf, "GetCorruption"), XS_Mob_GetCR, file, "$");
|
||||
newXSproto(strcpy(buf, "GetCorruption"), XS_Mob_GetCorruption, file, "$");
|
||||
newXSproto(strcpy(buf, "GetPhR"), XS_Mob_GetPhR, file, "$");
|
||||
newXSproto(strcpy(buf, "GetMaxSTR"), XS_Mob_GetMaxSTR, file, "$");
|
||||
newXSproto(strcpy(buf, "GetMaxSTA"), XS_Mob_GetMaxSTA, file, "$");
|
||||
newXSproto(strcpy(buf, "GetMaxDEX"), XS_Mob_GetMaxDEX, file, "$");
|
||||
|
||||
Reference in New Issue
Block a user