mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
perl_player_corpse.cpp formatting
This commit is contained in:
parent
2010d1ba83
commit
88ed2e64bb
@ -26,7 +26,9 @@
|
||||
*/
|
||||
|
||||
#include "../common/features.h"
|
||||
|
||||
#ifdef EMBPERL_XS_CLASSES
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "embperl.h"
|
||||
|
||||
@ -42,8 +44,7 @@
|
||||
|
||||
|
||||
XS(XS_Corpse_GetCharID); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetCharID)
|
||||
{
|
||||
XS(XS_Corpse_GetCharID) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetCharID(THIS)");
|
||||
@ -55,21 +56,20 @@ XS(XS_Corpse_GetCharID)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCharID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetDecayTime); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetDecayTime)
|
||||
{
|
||||
XS(XS_Corpse_GetDecayTime) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetDecayTime(THIS)");
|
||||
@ -81,21 +81,20 @@ XS(XS_Corpse_GetDecayTime)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetDecayTime();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_Lock); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_Lock)
|
||||
{
|
||||
XS(XS_Corpse_Lock) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::Lock(THIS)");
|
||||
@ -105,8 +104,7 @@ XS(XS_Corpse_Lock)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -117,8 +115,7 @@ XS(XS_Corpse_Lock)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_UnLock); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_UnLock)
|
||||
{
|
||||
XS(XS_Corpse_UnLock) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::UnLock(THIS)");
|
||||
@ -128,8 +125,7 @@ XS(XS_Corpse_UnLock)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -140,8 +136,7 @@ XS(XS_Corpse_UnLock)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_IsLocked); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_IsLocked)
|
||||
{
|
||||
XS(XS_Corpse_IsLocked) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::IsLocked(THIS)");
|
||||
@ -152,8 +147,7 @@ XS(XS_Corpse_IsLocked)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -166,8 +160,7 @@ XS(XS_Corpse_IsLocked)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_ResetLooter); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_ResetLooter)
|
||||
{
|
||||
XS(XS_Corpse_ResetLooter) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::ResetLooter(THIS)");
|
||||
@ -177,8 +170,7 @@ XS(XS_Corpse_ResetLooter)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -189,8 +181,7 @@ XS(XS_Corpse_ResetLooter)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetDBID); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetDBID)
|
||||
{
|
||||
XS(XS_Corpse_GetDBID) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetDBID(THIS)");
|
||||
@ -202,21 +193,20 @@ XS(XS_Corpse_GetDBID)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCorpseDBID();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetOwnerName); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetOwnerName)
|
||||
{
|
||||
XS(XS_Corpse_GetOwnerName) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetOwnerName(THIS)");
|
||||
@ -228,21 +218,21 @@ XS(XS_Corpse_GetOwnerName)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetOwnerName();
|
||||
sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
|
||||
sv_setpv(TARG, RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHTARG;
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_SetDecayTimer); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_SetDecayTimer)
|
||||
{
|
||||
XS(XS_Corpse_SetDecayTimer) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::SetDecayTimer(THIS, uint32 decay_time)");
|
||||
@ -253,8 +243,7 @@ XS(XS_Corpse_SetDecayTimer)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -265,8 +254,7 @@ XS(XS_Corpse_SetDecayTimer)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_IsEmpty); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_IsEmpty)
|
||||
{
|
||||
XS(XS_Corpse_IsEmpty) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::IsEmpty(THIS)");
|
||||
@ -277,8 +265,7 @@ XS(XS_Corpse_IsEmpty)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -291,8 +278,7 @@ XS(XS_Corpse_IsEmpty)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_AddItem); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_AddItem)
|
||||
{
|
||||
XS(XS_Corpse_AddItem) {
|
||||
dXSARGS;
|
||||
if (items < 3 || items > 4)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::AddItem(THIS, uint32 item_id, uint16 charges, [unt16 slot = 0])");
|
||||
@ -305,8 +291,7 @@ XS(XS_Corpse_AddItem)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -323,8 +308,7 @@ XS(XS_Corpse_AddItem)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetWornItem); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetWornItem)
|
||||
{
|
||||
XS(XS_Corpse_GetWornItem) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetWornItem(THIS, equipSlot)");
|
||||
@ -337,21 +321,20 @@ XS(XS_Corpse_GetWornItem)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetWornItem(equipSlot);
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_RemoveItem); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_RemoveItem)
|
||||
{
|
||||
XS(XS_Corpse_RemoveItem) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::RemoveItem(THIS, uint16 loot_slot)");
|
||||
@ -362,8 +345,7 @@ XS(XS_Corpse_RemoveItem)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -374,8 +356,7 @@ XS(XS_Corpse_RemoveItem)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_SetCash); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_SetCash)
|
||||
{
|
||||
XS(XS_Corpse_SetCash) {
|
||||
dXSARGS;
|
||||
if (items != 5)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::SetCash(THIS, uint16 copper, uint16 silver, uint16 gold, uint16 platinum)");
|
||||
@ -389,8 +370,7 @@ XS(XS_Corpse_SetCash)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -401,8 +381,7 @@ XS(XS_Corpse_SetCash)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_RemoveCash); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_RemoveCash)
|
||||
{
|
||||
XS(XS_Corpse_RemoveCash) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::RemoveCash(THIS)");
|
||||
@ -412,8 +391,7 @@ XS(XS_Corpse_RemoveCash)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -424,8 +402,7 @@ XS(XS_Corpse_RemoveCash)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_CountItems); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_CountItems)
|
||||
{
|
||||
XS(XS_Corpse_CountItems) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::CountItems(THIS)");
|
||||
@ -437,21 +414,20 @@ XS(XS_Corpse_CountItems)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->CountItems();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_Delete); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_Delete)
|
||||
{
|
||||
XS(XS_Corpse_Delete) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::Delete(THIS)");
|
||||
@ -461,8 +437,7 @@ XS(XS_Corpse_Delete)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -473,8 +448,7 @@ XS(XS_Corpse_Delete)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetCopper); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetCopper)
|
||||
{
|
||||
XS(XS_Corpse_GetCopper) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetCopper(THIS)");
|
||||
@ -486,21 +460,20 @@ XS(XS_Corpse_GetCopper)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetCopper();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetSilver); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetSilver)
|
||||
{
|
||||
XS(XS_Corpse_GetSilver) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetSilver(THIS)");
|
||||
@ -512,21 +485,20 @@ XS(XS_Corpse_GetSilver)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetSilver();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetGold); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetGold)
|
||||
{
|
||||
XS(XS_Corpse_GetGold) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetGold(THIS)");
|
||||
@ -538,21 +510,20 @@ XS(XS_Corpse_GetGold)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetGold();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_GetPlatinum); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_GetPlatinum)
|
||||
{
|
||||
XS(XS_Corpse_GetPlatinum) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::GetPlatinum(THIS)");
|
||||
@ -564,21 +535,20 @@ XS(XS_Corpse_GetPlatinum)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
|
||||
RETVAL = THIS->GetPlatinum();
|
||||
XSprePUSH; PUSHu((UV)RETVAL);
|
||||
XSprePUSH;
|
||||
PUSHu((UV) RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Corpse_Summon); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_Summon)
|
||||
{
|
||||
XS(XS_Corpse_Summon) {
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::Summon(THIS, Client* client, bool is_spell)");
|
||||
@ -590,8 +560,7 @@ XS(XS_Corpse_Summon)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -599,8 +568,7 @@ XS(XS_Corpse_Summon)
|
||||
if (sv_derived_from(ST(1), "Client")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||
client = INT2PTR(Client *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "client is not of type Client");
|
||||
if (client == nullptr)
|
||||
Perl_croak(aTHX_ "client is nullptr, avoiding crash.");
|
||||
@ -611,8 +579,7 @@ XS(XS_Corpse_Summon)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_CastRezz); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_CastRezz)
|
||||
{
|
||||
XS(XS_Corpse_CastRezz) {
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::CastRezz(THIS, uint16 spell_id, [Mob* caster = nullptr])");
|
||||
@ -624,8 +591,7 @@ XS(XS_Corpse_CastRezz)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -633,8 +599,7 @@ XS(XS_Corpse_CastRezz)
|
||||
if (sv_derived_from(ST(2), "Mob")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(2)));
|
||||
Caster = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "Caster is not of type Mob");
|
||||
if (Caster == nullptr)
|
||||
Perl_croak(aTHX_ "Caster is nullptr, avoiding crash.");
|
||||
@ -645,8 +610,7 @@ XS(XS_Corpse_CastRezz)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_CompleteRezz); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_CompleteRezz)
|
||||
{
|
||||
XS(XS_Corpse_CompleteRezz) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::CompleteRezz(THIS)");
|
||||
@ -656,8 +620,7 @@ XS(XS_Corpse_CompleteRezz)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -668,8 +631,7 @@ XS(XS_Corpse_CompleteRezz)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_CanMobLoot); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_CanMobLoot)
|
||||
{
|
||||
XS(XS_Corpse_CanMobLoot) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::CanMobLoot(THIS, int character_id)");
|
||||
@ -681,8 +643,7 @@ XS(XS_Corpse_CanMobLoot)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -695,8 +656,7 @@ XS(XS_Corpse_CanMobLoot)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_AllowMobLoot); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_AllowMobLoot)
|
||||
{
|
||||
XS(XS_Corpse_AllowMobLoot) {
|
||||
dXSARGS;
|
||||
if (items != 3)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::AllowMobLoot(THIS, Mob* them, uint8 slot)");
|
||||
@ -708,8 +668,7 @@ XS(XS_Corpse_AllowMobLoot)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -717,8 +676,7 @@ XS(XS_Corpse_AllowMobLoot)
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||
them = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "them is not of type Mob");
|
||||
if (them == nullptr)
|
||||
Perl_croak(aTHX_ "them is nullptr, avoiding crash.");
|
||||
@ -729,8 +687,7 @@ XS(XS_Corpse_AllowMobLoot)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_AddLooter); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_AddLooter)
|
||||
{
|
||||
XS(XS_Corpse_AddLooter) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::AddLooter(THIS, Mob* who)");
|
||||
@ -741,8 +698,7 @@ XS(XS_Corpse_AddLooter)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -750,8 +706,7 @@ XS(XS_Corpse_AddLooter)
|
||||
if (sv_derived_from(ST(1), "Mob")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(1)));
|
||||
who = INT2PTR(Mob *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "who is not of type Mob");
|
||||
if (who == nullptr)
|
||||
Perl_croak(aTHX_ "who is nullptr, avoiding crash.");
|
||||
@ -762,8 +717,7 @@ XS(XS_Corpse_AddLooter)
|
||||
}
|
||||
|
||||
XS(XS_Corpse_IsRezzed); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Corpse_IsRezzed)
|
||||
{
|
||||
XS(XS_Corpse_IsRezzed) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Corpse::IsRezzed(THIS)");
|
||||
@ -774,8 +728,7 @@ XS(XS_Corpse_IsRezzed)
|
||||
if (sv_derived_from(ST(0), "Corpse")) {
|
||||
IV tmp = SvIV((SV *) SvRV(ST(0)));
|
||||
THIS = INT2PTR(Corpse *, tmp);
|
||||
}
|
||||
else
|
||||
} else
|
||||
Perl_croak(aTHX_ "THIS is not of type Corpse");
|
||||
if (THIS == nullptr)
|
||||
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||
@ -791,8 +744,7 @@ XS(XS_Corpse_IsRezzed)
|
||||
extern "C"
|
||||
#endif
|
||||
XS(boot_Corpse); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(boot_Corpse)
|
||||
{
|
||||
XS(boot_Corpse) {
|
||||
dXSARGS;
|
||||
char file[256];
|
||||
strncpy(file, __FILE__, 256);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user