Permalink
Fetching contributors…
Cannot retrieve contributors at this time
8837 lines (7752 sloc) 224 KB
/*
* This file was generated automatically by xsubpp version 1.9508 from the
* contents of tmp. Do not edit this file, edit tmp instead.
*
* ANY CHANGES MADE HERE WILL BE LOST!
*
*/
/* EQEMu: Everquest Server Emulator
Copyright (C) 2001-2004 EQEMu Development Team (http://eqemulator.net)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY except by those people which sell it, which
are required to give you total support for your newly bought product;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "../common/features.h"
#ifdef EMBPERL_XS_CLASSES
#include "../common/global_define.h"
#include "embperl.h"
#ifdef seed
#undef seed
#endif
typedef const char Const_char;
#include "mob.h"
#include "client.h"
#include "../common/spdat.h"
#ifdef THIS /* this macro seems to leak out on some systems */
#undef THIS
#endif
XS(XS_Mob_IsClient); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsClient) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsClient(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsClient();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsNPC); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsNPC) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsNPC(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsNPC();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsMob); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsMob) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsMob(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsMob();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsCorpse); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsCorpse) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsCorpse(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsCorpse();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsPlayerCorpse); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsPlayerCorpse) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsPlayerCorpse(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsPlayerCorpse();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsNPCCorpse); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsNPCCorpse) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsNPCCorpse(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsNPCCorpse();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsObject); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsObject) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsObject(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsObject();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsDoor); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsDoor) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsDoor(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsDoor();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsTrap); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsTrap) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsTrap(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsTrap();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsBeacon); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsBeacon) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsBeacon(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsBeacon();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_CastToClient); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CastToClient) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::CastToClient(THIS)");
{
Mob *THIS;
Client *RETVAL;
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->CastToClient();
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Client", (void *) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_CastToNPC); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CastToNPC) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::CastToNPC(THIS)");
{
Mob *THIS;
NPC *RETVAL;
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->CastToNPC();
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "NPC", (void *) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_CastToMob); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CastToMob) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::CastToMob(THIS)");
{
Mob *THIS;
Mob *RETVAL;
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->CastToMob();
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Mob", (void *) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_CastToCorpse); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CastToCorpse) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::CastToCorpse(THIS)");
{
Mob *THIS;
Corpse *RETVAL;
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->CastToCorpse();
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Corpse", (void *) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetID) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetID(THIS)");
{
Mob *THIS;
uint16 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->GetID();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetName); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetName) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetName(THIS)");
{
Mob *THIS;
Const_char *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->GetName();
sv_setpv(TARG, RETVAL);
XSprePUSH;
PUSHTARG;
}
XSRETURN(1);
}
XS(XS_Mob_Depop); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Depop) {
dXSARGS;
if (items < 1 || items > 2)
Perl_croak(aTHX_ "Usage: Mob::Depop(THIS, StartSpawnTimer = true)");
{
Mob *THIS;
bool StartSpawnTimer;
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.");
if (items < 2)
StartSpawnTimer = true;
else {
StartSpawnTimer = (bool) SvTRUE(ST(1));
}
THIS->Depop(StartSpawnTimer);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_RogueAssassinate); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_RogueAssassinate) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::RogueAssassinate(THIS, other)");
{
Mob *THIS;
Mob *other;
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.");
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
other = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "other is not of type Mob");
if (other == nullptr)
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
THIS->RogueAssassinate(other);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_BehindMob); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_BehindMob) {
dXSARGS;
if (items < 1 || items > 4)
Perl_croak(aTHX_ "Usage: Mob::BehindMob(THIS, Mob* other = 0, [float x = 0.0f], [float y= 0.0f])");
{
Mob *THIS;
bool RETVAL;
Mob *other;
float playerx;
float playery;
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.");
if (items < 2)
other = 0;
else {
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
other = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "other is not of type Mob");
if (other == nullptr)
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
}
if (items < 3)
playerx = 0.0f;
else {
playerx = (float) SvNV(ST(2));
}
if (items < 4)
playery = 0.0f;
else {
playery = (float) SvNV(ST(3));
}
RETVAL = THIS->BehindMob(other, playerx, playery);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_SetLevel); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetLevel) {
dXSARGS;
if (items < 2 || items > 3)
Perl_croak(aTHX_ "Usage: Mob::SetLevel(THIS, uint8 in_level, [bool command = false])");
{
Mob *THIS;
uint8 in_level = (uint8) SvUV(ST(1));
bool command;
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.");
if (items < 3)
command = false;
else {
command = (bool) SvTRUE(ST(2));
}
THIS->SetLevel(in_level, command);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetSkill); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetSkill) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetSkill(THIS, int skill_id)");
{
Mob *THIS;
uint32 RETVAL;
dXSTARG;
EQEmu::skills::SkillType skill_num = (EQEmu::skills::SkillType) SvUV(ST(1));
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->GetSkill(skill_num);
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_SendWearChange); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SendWearChange) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::SendWearChange(THIS, uint8 material_slot)");
{
Mob *THIS;
uint8 material_slot = (uint8) SvUV(ST(1));
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.");
THIS->SendWearChange(material_slot);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetEquipment); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetEquipment) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetEquipment(THIS, uint8 material_slot)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint8 material_slot = (uint8) SvUV(ST(1));
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->GetEquipment(material_slot);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetEquipmentMaterial); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetEquipmentMaterial) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetEquipmentMaterial(THIS, uint8 material_slot)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint8 material_slot = (uint8) SvUV(ST(1));
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->GetEquipmentMaterial(material_slot);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetEquipmentColor); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetEquipmentColor) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetEquipmentColor(THIS, uint8 material_slot)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint8 material_slot = (uint8) SvUV(ST(1));
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->GetEquipmentColor(material_slot);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetArmorTint); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetArmorTint) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetArmorTint(THIS, uint8 material_slot)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint8 material_slot = (uint8) SvUV(ST(1));
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->GetArmorTint(material_slot);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_IsMoving); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsMoving) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsMoving(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsMoving();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_GoToBind); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GoToBind) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GoToBind(THIS)");
{
Mob *THIS;
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.");
THIS->GoToBind();
}
XSRETURN_EMPTY;
}
XS(XS_Mob_Gate); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Gate) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::Gate(THIS)");
{
Mob *THIS;
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.");
THIS->Gate();
}
XSRETURN_EMPTY;
}
XS(XS_Mob_Attack); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Attack) {
dXSARGS;
if (items < 2 || items > 4)
Perl_croak(aTHX_
"Usage: Mob::Attack(THIS, Mob* other, [int hand = 13 [prim|sec]], [bool from_riposte = false])");
{
Mob *THIS;
bool RETVAL;
Mob *other;
int Hand;
bool FromRiposte;
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.");
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
other = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "other is not of type Mob");
if (other == nullptr)
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
if (items < 3)
Hand = 13;
else {
Hand = (int) SvIV(ST(2));
}
if (items < 4)
FromRiposte = false;
else {
FromRiposte = (bool) SvTRUE(ST(3));
}
RETVAL = THIS->Attack(other, Hand, FromRiposte);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_Damage); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Damage) {
dXSARGS;
if (items < 5 || items > 8)
Perl_croak(aTHX_
"Usage: Mob::Damage(THIS, Mob* from, int32 damage, uint16 spell_id, int attack_skill, [bool avoidable = true], [int8 buffslot = -1], [bool buff_tic = false])");
{
Mob *THIS;
Mob *from;
int32 damage = (int32) SvIV(ST(2));
uint16 spell_id = (uint16) SvUV(ST(3));
EQEmu::skills::SkillType attack_skill = (EQEmu::skills::SkillType) SvUV(ST(4));
bool avoidable;
int8 buffslot;
bool iBuffTic;
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.");
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
from = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "from is not of type Mob");
if (from == nullptr)
Perl_croak(aTHX_ "from is nullptr, avoiding crash.");
if (items < 6)
avoidable = true;
else {
avoidable = (bool) SvTRUE(ST(5));
}
if (items < 7)
buffslot = -1;
else {
buffslot = (int8) SvIV(ST(6));
}
if (items < 8)
iBuffTic = false;
else {
iBuffTic = (bool) SvTRUE(ST(7));
}
THIS->Damage(from, damage, spell_id, attack_skill, avoidable, buffslot, iBuffTic);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_RangedAttack); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_RangedAttack) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::RangedAttack(THIS, Mob* other)");
{
Mob *THIS;
Mob *other;
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.");
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
other = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "other is not of type Mob");
if (other == nullptr)
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
THIS->RangedAttack(other);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_ThrowingAttack); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_ThrowingAttack) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::ThrowingAttack(THIS, Mob* other)");
{
Mob *THIS;
Mob *other;
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.");
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
other = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "other is not of type Mob");
if (other == nullptr)
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
THIS->ThrowingAttack(other);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_Heal); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Heal) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::Heal(THIS)");
{
Mob *THIS;
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.");
THIS->Heal();
}
XSRETURN_EMPTY;
}
XS(XS_Mob_HealDamage); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_HealDamage) {
dXSARGS;
if (items < 2 || items > 3)
Perl_croak(aTHX_ "Usage: Mob::HealDamage(THIS, int32 amount, [Mob* caster = 0])");
{
Mob *THIS;
int32 heal_amt = (int32) SvIV(ST(1));
Mob *caster = nullptr;
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.");
if (items == 3) {
if (sv_derived_from(ST(2), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(2)));
caster = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "caster is not of type Mob");
if (caster == nullptr)
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
}
THIS->HealDamage(heal_amt, caster);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_SetMaxHP); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetMaxHP) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::SetMaxHP(THIS)");
{
Mob *THIS;
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.");
THIS->SetMaxHP();
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetLevelCon); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetLevelCon) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetLevelCon(THIS, uint8 other_level)");
{
Mob *THIS;
uint32 RETVAL;
dXSTARG;
uint8 iOtherLevel = (uint8) SvUV(ST(1));
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->GetLevelCon(iOtherLevel);
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_SetHP); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetHP) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::SetHP(THIS, int32 hp)");
{
Mob *THIS;
int32 hp = (int32) SvIV(ST(1));
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.");
THIS->SetHP(hp);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_DoAnim); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_DoAnim) {
dXSARGS;
if (items < 2 || items > 3)
Perl_croak(aTHX_ "Usage: Mob::DoAnim(THIS, int animation_number, [int type = 0])");
{
Mob *THIS;
int animnum = (int) SvIV(ST(1));
int type;
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.");
if (items < 3)
type = 0;
else {
type = (int) SvIV(ST(2));
}
THIS->DoAnim(animnum, type);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_ChangeSize); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_ChangeSize) {
dXSARGS;
if (items < 2 || items > 3)
Perl_croak(aTHX_ "Usage: Mob::ChangeSize(THIS, float in_size, [bool no_restriction = false])");
{
Mob *THIS;
float in_size = (float) SvNV(ST(1));
bool bNoRestriction;
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.");
if (items < 3)
bNoRestriction = false;
else {
bNoRestriction = (bool) SvTRUE(ST(2));
}
THIS->ChangeSize(in_size, bNoRestriction);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GMMove); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GMMove) {
dXSARGS;
if (items < 4 || items > 5)
Perl_croak(aTHX_ "Usage: Mob::GMMove(THIS, float x, float y, float z, [float heading = 0.01])");
{
Mob *THIS;
float x = (float) SvNV(ST(1));
float y = (float) SvNV(ST(2));
float z = (float) SvNV(ST(3));
float heading;
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.");
if (items < 5)
heading = 0.01;
else {
heading = (float) SvNV(ST(4));
}
THIS->GMMove(x, y, z, heading);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_SendPosUpdate); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SendPosUpdate) {
dXSARGS;
if (items < 1 || items > 2)
Perl_croak(aTHX_ "Usage: Mob::SendPosUpdate(THIS, [uint8 send_to_self = 0])");
{
Mob *THIS;
uint8 iSendToSelf;
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.");
if (items < 2)
iSendToSelf = 0;
else {
iSendToSelf = (uint8) SvUV(ST(1));
}
THIS->SendPositionUpdate(iSendToSelf);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_SendPosition); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SendPosition) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::SendPosition(THIS)");
{
Mob *THIS;
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.");
THIS->SendPosition();
}
XSRETURN_EMPTY;
}
XS(XS_Mob_HasProcs); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_HasProcs) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::HasProcs(THIS)");
{
Mob *THIS;
bool RETVAL;
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->HasProcs();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_IsInvisible); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsInvisible) {
dXSARGS;
if (items < 1 || items > 2)
Perl_croak(aTHX_ "Usage: Mob::IsInvisible(THIS, [Mob* other = 0])");
{
Mob *THIS;
bool RETVAL;
Mob *other;
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.");
if (items < 2)
other = 0;
else {
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
other = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "other is not of type Mob");
if (other == nullptr)
Perl_croak(aTHX_ "other is nullptr, avoiding crash.");
}
RETVAL = THIS->IsInvisible(other);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_SetInvisible); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetInvisible) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::SetInvisible(THIS, uint8 state)");
{
Mob *THIS;
uint8 state = (uint8) SvUV(ST(1));
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.");
THIS->SetInvisible(state);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_FindBuff); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_FindBuff) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::FindBuff(THIS, uint16 spell_id)");
{
Mob *THIS;
bool RETVAL;
uint16 spellid = (uint16) SvUV(ST(1));
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->FindBuff(spellid);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_FindType); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_FindType) {
dXSARGS;
if (items < 2 || items > 4)
Perl_croak(aTHX_ "Usage: Mob::FindType(THIS, uint8 type, [bool offensive = false], [uint16 threshold = 100])");
{
Mob *THIS;
bool RETVAL;
uint8 type = (uint8) SvUV(ST(1));
bool bOffensive;
uint16 threshold;
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.");
if (items < 3)
bOffensive = false;
else {
bOffensive = (bool) SvTRUE(ST(2));
}
if (items < 4)
threshold = 100;
else {
threshold = (uint16) SvUV(ST(3));
}
RETVAL = THIS->FindType(type, bOffensive, threshold);
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_GetBuffSlotFromType); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetBuffSlotFromType) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetBuffSlotFromType(THIS, uint16 type)");
{
Mob *THIS;
int8 RETVAL;
dXSTARG;
uint16 type = (uint16) SvUV(ST(1));
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->GetBuffSlotFromType(type);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_MakePet); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_MakePet) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_ "Usage: Mob::MakePet(THIS, uint16 spell_id, string pet_type, [string name = nullptr])");
{
Mob *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
char *pettype = (char *) SvPV_nolen(ST(2));
char *name;
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.");
if (items < 4)
name = nullptr;
else {
name = (char *) SvPV_nolen(ST(3));
}
THIS->MakePet(spell_id, pettype, name);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_MakeTempPet); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_MakeTempPet) {
dXSARGS;
if (items < 2 || items > 6)
Perl_croak(aTHX_
"Usage: Mob::MakeTempPet(THIS, uint16 spell_id, [string name = nullptr], [uint32 duration = 0], [Mob* target = nullptr], [bool sticktarg = 0])");
{
Mob *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
char *name;
uint32 duration;
Mob *target;
bool sticktarg;
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.");
if (items < 3)
name = nullptr;
else
name = (char *) SvPV_nolen(ST(2));
if (items < 4)
duration = 0;
else
duration = (uint32) SvUV(ST(3));
if (items < 5)
target = nullptr;
else if (sv_derived_from(ST(4), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(4)));
target = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "owner is not of type Mob");
if (items < 6)
sticktarg = false;
else {
sticktarg = (bool) SvTRUE(ST(5));
}
THIS->TemporaryPets(spell_id, target, name, duration, true, sticktarg);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_TypesTempPet); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_TypesTempPet) {
dXSARGS;
if (items < 2 || items > 7)
Perl_croak(aTHX_
"Usage: Mob::TypesTempPet(THIS, uint32 type_id, [string name = nullptr], [uint32 duration = 0], [bool follow = 0], [Mob* target = nullptr], [bool stick_targ = 0])");
{
Mob *THIS;
uint32 typesid = (uint32) SvUV(ST(1));
char *name;
uint32 duration;
bool follow;
Mob *target;
bool sticktarg;
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.");
if (items < 3)
name = nullptr;
else
name = (char *) SvPV_nolen(ST(2));
if (items < 4)
duration = 0;
else
duration = (uint32) SvUV(ST(3));
if (items < 5)
follow = true;
else {
follow = (bool) SvTRUE(ST(4));
}
if (items < 6)
target = nullptr;
else if (sv_derived_from(ST(5), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(5)));
target = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "target is not of type Mob");
if (items < 7)
sticktarg = false;
else {
sticktarg = (bool) SvTRUE(ST(6));
}
THIS->TypesTemporaryPets(typesid, target, name, duration, follow, sticktarg);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetBaseRace); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetBaseRace) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetBaseRace(THIS)");
{
Mob *THIS;
uint16 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->GetBaseRace();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetBaseGender); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetBaseGender) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetBaseGender(THIS)");
{
Mob *THIS;
uint8 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->GetBaseGender();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetDeity); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetDeity) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetDeity(THIS)");
{
Mob *THIS;
uint8 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->GetDeity();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetRace); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetRace) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetRace(THIS)");
{
Mob *THIS;
uint16 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->GetRace();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetGender); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetGender) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetGender(THIS)");
{
Mob *THIS;
uint8 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->GetGender();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetTexture); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetTexture) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetTexture(THIS)");
{
Mob *THIS;
uint8 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->GetTexture();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetHelmTexture); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetHelmTexture) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetHelmTexture(THIS)");
{
Mob *THIS;
uint8 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->GetHelmTexture();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetHairColor); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetHairColor) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetHairColor(THIS)");
{
Mob *THIS;
uint8 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->GetHairColor();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetBeardColor); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetBeardColor) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetBeardColor(THIS)");
{
Mob *THIS;
uint8 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->GetBeardColor();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetEyeColor1); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetEyeColor1) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetEyeColor1(THIS)");
{
Mob *THIS;
uint8 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->GetEyeColor1();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetEyeColor2); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetEyeColor2) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetEyeColor2(THIS)");
{
Mob *THIS;
uint8 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->GetEyeColor2();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetHairStyle); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetHairStyle) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetHairStyle(THIS)");
{
Mob *THIS;
uint8 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->GetHairStyle();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetLuclinFace); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetLuclinFace) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetLuclinFace(THIS)");
{
Mob *THIS;
uint8 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->GetLuclinFace();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetBeard); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetBeard) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetBeard(THIS)");
{
Mob *THIS;
uint8 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->GetBeard();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetDrakkinHeritage); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetDrakkinHeritage) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetDrakkinHeritage(THIS)");
{
Mob *THIS;
uint8 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->GetDrakkinHeritage();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetDrakkinTattoo); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetDrakkinTattoo) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetDrakkinTattoo(THIS)");
{
Mob *THIS;
uint8 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->GetDrakkinTattoo();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetDrakkinDetails); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetDrakkinDetails) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetDrakkinDetails(THIS)");
{
Mob *THIS;
uint8 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->GetDrakkinDetails();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetClass); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetClass) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetClass(THIS)");
{
Mob *THIS;
uint8 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->GetClass();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetLevel); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetLevel) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetLevel(THIS)");
{
Mob *THIS;
uint8 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->GetLevel();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetCleanName); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetCleanName) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetCleanName(THIS)");
{
Mob *THIS;
Const_char *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->GetCleanName();
sv_setpv(TARG, RETVAL);
XSprePUSH;
PUSHTARG;
}
XSRETURN(1);
}
XS(XS_Mob_GetTarget); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetTarget) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetTarget(THIS)");
{
Mob *THIS;
Mob *RETVAL;
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->GetTarget();
ST(0) = sv_newmortal();
sv_setref_pv(ST(0), "Mob", (void *) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_SetTarget); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetTarget) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::SetTarget(THIS, mob)");
{
Mob *THIS;
Mob *mob;
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.");
if (sv_derived_from(ST(1), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(1)));
mob = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "mob is not of type Mob");
if (mob == nullptr)
Perl_croak(aTHX_ "mob is nullptr, avoiding crash.");
THIS->SetTarget(mob);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetHPRatio); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetHPRatio) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetHPRatio(THIS)");
{
Mob *THIS;
float 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->GetHPRatio();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_IsWarriorClass); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsWarriorClass) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsWarriorClass(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsWarriorClass();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_GetHP); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetHP) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetHP(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->GetHP();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxHP); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxHP) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxHP(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->GetMaxHP();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetItemHPBonuses); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetItemHPBonuses) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetItemHPBonuses(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->GetItemHPBonuses();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetSpellHPBonuses); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetSpellHPBonuses) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetSpellHPBonuses(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->GetSpellHPBonuses();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetSpellIDFromSlot); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetSpellIDFromSlot) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetSpellIDFromSlot(THIS, slot)");
{
Mob *THIS;
int RETVAL;
dXSTARG;
uint8 slot = (uint16) SvUV(ST(1));
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.");
if (slot > THIS->GetMaxBuffSlots())
RETVAL = -1;
else
RETVAL = THIS->GetSpellIDFromSlot(slot);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWalkspeed); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWalkspeed) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWalkspeed(THIS)");
{
Mob *THIS;
float 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->GetWalkspeed();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetRunspeed); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetRunspeed) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetRunspeed(THIS)");
{
Mob *THIS;
float 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->GetRunspeed();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetCasterLevel); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetCasterLevel) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetCasterLevel(THIS, spell_id)");
{
Mob *THIS;
int RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
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->GetCasterLevel(spell_id);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxMana); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxMana) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxMana(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->GetMaxMana();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMana); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMana) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMana(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->GetMana();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_SetMana); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetMana) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::SetMana(THIS, amount)");
{
Mob *THIS;
int32 amount = (int32) SvIV(ST(1));
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.");
THIS->SetMana(amount);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetManaRatio); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetManaRatio) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetManaRatio(THIS)");
{
Mob *THIS;
float 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->GetManaRatio();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetAC); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetAC) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetAC(THIS)");
{
Mob *THIS;
uint32 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->GetAC();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetATK); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetATK) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetATK(THIS)");
{
Mob *THIS;
uint32 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->GetATK();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetSTR); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetSTR) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetSTR(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->GetSTR();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetSTA); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetSTA) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetSTA(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->GetSTA();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetDEX); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetDEX) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetDEX(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->GetDEX();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetAGI); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetAGI) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetAGI(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->GetAGI();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetINT); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetINT) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetINT(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->GetINT();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWIS); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWIS) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWIS(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->GetWIS();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetCHA); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetCHA) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetCHA(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->GetCHA();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMR); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMR) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMR(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->GetMR();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetFR); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetFR) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetFR(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->GetFR();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetDR); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetDR) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetDR(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->GetDR();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetPR); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetPR) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetPR(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->GetPR();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetCR); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetCR) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetCR(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->GetCR();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetCorruption); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetCorruption) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetCorruption(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->GetCorrup();
XSprePUSH;
PUSHi((IV) RETVAL);
}
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) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxSTR(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->GetMaxSTR();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxSTA); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxSTA) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxSTA(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->GetMaxSTA();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxDEX); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxDEX) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxDEX(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->GetMaxDEX();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxAGI); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxAGI) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxAGI(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->GetMaxAGI();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxINT); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxINT) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxINT(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->GetMaxINT();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxWIS); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxWIS) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxWIS(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->GetMaxWIS();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetMaxCHA); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetMaxCHA) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetMaxCHA(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->GetMaxCHA();
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetActSpellRange); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetActSpellRange) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: Mob::GetActSpellRange(THIS, uint16 spell_id, float range)");
{
Mob *THIS;
float RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
float range = (float) SvNV(ST(2));
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->GetActSpellRange(spell_id, range);
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetActSpellDamage); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetActSpellDamage) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: Mob::GetActSpellDamage(THIS, uint16 spell_id, int32 value)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
int32 value = (int32) SvIV(ST(2));
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->GetActSpellDamage(spell_id, value);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetActSpellHealing); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetActSpellHealing) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: Mob::GetActSpellHealing(THIS, uint16 spell_id, int32 value)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
int32 value = (int32) SvIV(ST(2));
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->GetActSpellHealing(spell_id, value);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetActSpellCost); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetActSpellCost) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: Mob::GetActSpellCost(THIS, uint16 spell_id, int32 cost)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
int32 cost = (int32) SvIV(ST(2));
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->GetActSpellCost(spell_id, cost);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetActSpellDuration); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetActSpellDuration) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: Mob::GetActSpellDuration(THIS, uint16 spell_id, int32 duration)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
int32 duration = (int32) SvIV(ST(2));
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->GetActSpellDuration(spell_id, duration);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetActSpellCasttime); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetActSpellCasttime) {
dXSARGS;
if (items != 3)
Perl_croak(aTHX_ "Usage: Mob::GetActSpellCasttime(THIS, uint16 spell_id, uint32 cast_time)");
{
Mob *THIS;
int32 RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
int32 casttime = (int32) SvIV(ST(2));
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->GetActSpellCasttime(spell_id, casttime);
XSprePUSH;
PUSHi((IV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_ResistSpell); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_ResistSpell) {
dXSARGS;
if (items != 4)
Perl_croak(aTHX_ "Usage: Mob::ResistSpell(THIS, uint8 resist_type, uint16 spell_id, [Mob* caster = nullptr])");
{
Mob *THIS;
double RETVAL;
dXSTARG;
uint8 ressit_type = (uint8) SvUV(ST(1));
uint16 spell_id = (uint16) SvUV(ST(2));
Mob *caster;
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.");
if (sv_derived_from(ST(3), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(3)));
caster = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "caster is not of type Mob");
if (caster == nullptr)
Perl_croak(aTHX_ "caster is nullptr, avoiding crash.");
RETVAL = THIS->ResistSpell(ressit_type, spell_id, caster);
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetSpecializeSkillValue); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetSpecializeSkillValue) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::GetSpecializeSkillValue(THIS, uint16 spell_id)");
{
Mob *THIS;
uint16 RETVAL;
dXSTARG;
uint16 spell_id = (uint16) SvUV(ST(1));
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->GetSpecializeSkillValue(spell_id);
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetNPCTypeID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetNPCTypeID) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetNPCTypeID(THIS)");
{
Mob *THIS;
uint32 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->GetNPCTypeID();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_IsTargeted); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_IsTargeted) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::IsTargeted(THIS)");
{
Mob *THIS;
bool RETVAL;
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->IsTargeted();
ST(0) = boolSV(RETVAL);
sv_2mortal(ST(0));
}
XSRETURN(1);
}
XS(XS_Mob_GetX); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetX) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetX(THIS)");
{
Mob *THIS;
float 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->GetX();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetY); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetY) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetY(THIS)");
{
Mob *THIS;
float 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->GetY();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetZ); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetZ) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetZ(THIS)");
{
Mob *THIS;
float 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->GetZ();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetHeading); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetHeading) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetHeading(THIS)");
{
Mob *THIS;
float 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->GetHeading();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWaypointX); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWaypointX) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWaypointX(THIS)");
{
Mob *THIS;
float 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->GetCurrentWayPoint().x;
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWaypointY); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWaypointY) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWaypointY(THIS)");
{
Mob *THIS;
float 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->GetCurrentWayPoint().y;
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWaypointZ); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWaypointZ) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWaypointZ(THIS)");
{
Mob *THIS;
float 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->GetCurrentWayPoint().z;
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWaypointH); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWaypointH) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWaypointH(THIS)");
{
Mob *THIS;
float 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->GetCurrentWayPoint().w;
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWaypointPause); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWaypointPause) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWaypointPause(THIS)");
{
Mob *THIS;
uint32 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->GetCWPP();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_GetWaypointID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetWaypointID) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetWaypointID(THIS)");
{
Mob *THIS;
uint32 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->GetCWP();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_SetCurrentWP); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetCurrentWP) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::SetCurrentWP(THIS, waypoint)");
{
Mob *THIS;
uint16 waypoint = (uint16) SvUV(ST(1));
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.");
THIS->SetCurrentWP(waypoint);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetSize); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetSize) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetSize(THIS)");
{
Mob *THIS;
float 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->GetSize();
XSprePUSH;
PUSHn((double) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_SetFollowID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SetFollowID) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: Mob::SetFollowID(THIS, id)");
{
Mob *THIS;
uint32 id = (uint32) SvUV(ST(1));
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.");
THIS->SetFollowID(id);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_GetFollowID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_GetFollowID) {
dXSARGS;
if (items != 1)
Perl_croak(aTHX_ "Usage: Mob::GetFollowID(THIS)");
{
Mob *THIS;
uint32 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->GetFollowID();
XSprePUSH;
PUSHu((UV) RETVAL);
}
XSRETURN(1);
}
XS(XS_Mob_Message); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Message) {
dXSARGS;
if (items < 3)
Perl_croak(aTHX_ "Usage: Mob::Message(THIS, uint32 emote_color_type, string message)");
{
Mob *THIS;
uint32 type = (uint32) SvUV(ST(1));
char *message = (char *) SvPV_nolen(ST(2));
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.");
THIS->Message(type, message);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_Message_StringID); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Message_StringID) {
dXSARGS;
if (items < 3 || items > 4)
Perl_croak(aTHX_
"Usage: Mob::Message_StringID(THIS, uint32 emote_color_type, uint32 string_id, [uint32 distance = 0])");
{
Mob *THIS;
uint32 type = (uint32) SvUV(ST(1));
uint32 string_id = (uint32) SvUV(ST(2));
uint32 distance;
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.");
if (items < 4)
distance = 0;
else {
distance = (uint32) SvUV(ST(3));
}
THIS->Message_StringID(type, string_id, distance);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_Say); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Say) {
dXSARGS;
if (items < 2)
Perl_croak(aTHX_ "Usage: Mob::Say(THIS, string message)");
{
Mob *THIS;
char *format = (char *) SvPV_nolen(ST(1));
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.");
THIS->Say(format);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_Shout); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Shout) {
dXSARGS;
if (items < 2)
Perl_croak(aTHX_ "Usage: Mob::Shout(THIS, string message)");
{
Mob *THIS;
char *format = (char *) SvPV_nolen(ST(1));
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.");
THIS->Shout(format);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_Emote); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_Emote) {
dXSARGS;
if (items < 2)
Perl_croak(aTHX_ "Usage: Mob::Emote(THIS, string message)");
{
Mob *THIS;
char *format = (char *) SvPV_nolen(ST(1));
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.");
THIS->Emote(format);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_InterruptSpell); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_InterruptSpell) {
dXSARGS;
if (items < 1 || items > 2)
Perl_croak(aTHX_ "Usage: Mob::InterruptSpell(THIS, [uint16 spell_id = 0xFFFF])");
{
Mob *THIS;
uint16 spellid;
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.");
if (items < 2)
spellid = 0xFFFF;
else {
spellid = (uint16) SvUV(ST(1));
}
THIS->InterruptSpell(spellid);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_CastSpell); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_CastSpell) {
dXSARGS;
if (items < 3 || items > 7)
Perl_croak(aTHX_
"Usage: Mob::CastSpell(THIS, uint16 spell_id, uint16 target_id, [int slot = 22], [int32 cast_time = -1], [int32 mana_cost = -1], [int16 resist_adjust = 0])");
{
Mob *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
uint16 target_id = (uint16) SvUV(ST(2));
EQEmu::CastingSlot slot;
int32 casttime;
int32 mana_cost;
int16 resist_adjust;
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.");
if (items < 4)
slot = EQEmu::CastingSlot::Item;
else {
slot = static_cast<EQEmu::CastingSlot>(SvUV(ST(3)));
}
if (items < 5)
casttime = -1;
else {
casttime = (int32) SvIV(ST(4));
}
if (items < 6)
mana_cost = -1;
else {
mana_cost = (int32) SvIV(ST(5));
}
if (items < 7) {
resist_adjust = 0;
} else {
resist_adjust = (int16) SvIV(ST(6));
}
if (resist_adjust ==
0)//If you do not pass resist adjust as nullptr it will ignore the spells default resist adjust
THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0);
else
THIS->CastSpell(spell_id, target_id, slot, casttime, mana_cost, 0, 0xFFFFFFFF, 0xFFFFFFFF, 0,
&resist_adjust);
}
XSRETURN_EMPTY;
}
XS(XS_Mob_SpellFinished); /* prototype to pass -Wmissing-prototypes */
XS(XS_Mob_SpellFinished) {
dXSARGS;
if (items < 2 || items > 5)
Perl_croak(aTHX_
"Usage: Mob::SpellFinished(uint16 spell_id, [Mob* spell_target = this], [uint16 mana_cost = 0], [uint16 resist_diff = 0])");
{
Mob *THIS;
uint16 spell_id = (uint16) SvUV(ST(1));
Mob *spell_target;
uint16 mana_cost = 0;
int16 resist_diff;
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.");
spell_target = THIS;
if (items > 2) {
if (sv_derived_from(ST(2), "Mob")) {
IV tmp = SvIV((SV *) SvRV(ST(2)));
spell_target = INT2PTR(Mob *, tmp);
} else
Perl_croak(aTHX_ "spell_target is not of type Mob");
if (spell_target == nullptr)
Perl_croak(aTHX_ "spell_target is nullptr, avoiding crash.");
}
if (items > 3)
mana_cost = (uint16) SvUV(ST(3));
if (items > 4) {
resist_diff = (int16) SvUV(ST(4));
} else {
resist_diff = spells[spell_id].ResistDiff;
}
THIS->SpellFinished(spell_id, spell_target, EQEmu::CastingSlot::Item, mana_cost, -1, resist_diff);
}
XSRETURN_EMPTY;
}