mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
Merge pull request #476 from KinglyKrab/master
Exported several Mob-based methods to Perl and Lua.
This commit is contained in:
commit
dfc5699403
@ -1,5 +1,27 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 12/19/2015 ==
|
||||
Kinglykrab: Added many methods to Perl and Lua, list below:
|
||||
- SeeInvisible()
|
||||
- SeeInvisibleUndead()
|
||||
- SeeHide()
|
||||
- SeeImprovedHide()
|
||||
- GetNimbusEffect1() - returns first nimbus effect
|
||||
- GetNimbusEffect2() - returns second nimbus effect
|
||||
- GetNimbusEffect3() - returns third nimbus effect
|
||||
- IsTargetable()
|
||||
- HasShieldEquiped()
|
||||
- HasTwoHandBluntEquiped()
|
||||
- HasTwoHanderEquiped()
|
||||
- GetHerosForgeModel() - returns int32 Hero's Forge model
|
||||
- IsEliteMaterialItem() - returns uint32 Hero's Forge Model
|
||||
- GetBaseSize() - returns Mob's base size
|
||||
- HasOwner()
|
||||
- IsPet()
|
||||
- HasPet()
|
||||
- IsSilenced()
|
||||
- IsAmnesiad()
|
||||
|
||||
== 12/16/2015 ==
|
||||
Noudess: Repaired issue with Bind Wounds on someone else. Message was not coming out on client (hold still) and a bind wounds on someone already binding their wounds would interrupt their bind and make them stand. Also removed some duplicate messaging.
|
||||
|
||||
|
||||
116
zone/lua_mob.cpp
116
zone/lua_mob.cpp
@ -1881,6 +1881,101 @@ bool Lua_Mob::IsBlind() {
|
||||
return self->IsBlind();
|
||||
}
|
||||
|
||||
uint8 Lua_Mob::SeeInvisible() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->SeeInvisible();
|
||||
}
|
||||
|
||||
bool Lua_Mob::SeeInvisibleUndead() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->SeeInvisibleUndead();
|
||||
}
|
||||
|
||||
bool Lua_Mob::SeeHide() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->SeeHide();
|
||||
}
|
||||
|
||||
bool Lua_Mob::SeeImprovedHide() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->SeeImprovedHide();
|
||||
}
|
||||
|
||||
uint8 Lua_Mob::GetNimbusEffect1() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetNimbusEffect1();
|
||||
}
|
||||
|
||||
uint8 Lua_Mob::GetNimbusEffect2() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetNimbusEffect2();
|
||||
}
|
||||
|
||||
uint8 Lua_Mob::GetNimbusEffect3() {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetNimbusEffect3();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsTargetable() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsTargetable();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasShieldEquiped() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasShieldEquiped();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasTwoHandBluntEquiped() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasTwoHandBluntEquiped();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasTwoHanderEquipped() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasTwoHanderEquipped();
|
||||
}
|
||||
|
||||
uint32 Lua_Mob::GetHerosForgeModel(uint8 material_slot) {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->GetHerosForgeModel(material_slot);
|
||||
}
|
||||
|
||||
uint32 Lua_Mob::IsEliteMaterialItem(uint8 material_slot) {
|
||||
Lua_Safe_Call_Int();
|
||||
return self->IsEliteMaterialItem(material_slot);
|
||||
}
|
||||
|
||||
float Lua_Mob::GetBaseSize() {
|
||||
Lua_Safe_Call_Real();
|
||||
return self->GetBaseSize();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasOwner() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasOwner();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsPet() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsPet();
|
||||
}
|
||||
|
||||
bool Lua_Mob::HasPet() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->HasPet();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsSilenced() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsSilenced();
|
||||
}
|
||||
|
||||
bool Lua_Mob::IsAmnesiad() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsAmnesiad();
|
||||
}
|
||||
|
||||
luabind::scope lua_register_mob() {
|
||||
return luabind::class_<Lua_Mob, Lua_Entity>("Mob")
|
||||
.def(luabind::constructor<>())
|
||||
@ -2203,7 +2298,26 @@ luabind::scope lua_register_mob() {
|
||||
.def("BuffFadeBySlot", (void(Lua_Mob::*)(int,bool))&Lua_Mob::BuffFadeBySlot)
|
||||
.def("CanBuffStack", (int(Lua_Mob::*)(int,int))&Lua_Mob::CanBuffStack)
|
||||
.def("CanBuffStack", (int(Lua_Mob::*)(int,int,bool))&Lua_Mob::CanBuffStack)
|
||||
.def("SetPseudoRoot", (void(Lua_Mob::*)(bool))&Lua_Mob::SetPseudoRoot);
|
||||
.def("SetPseudoRoot", (void(Lua_Mob::*)(void))&Lua_Mob::SetPseudoRoot)
|
||||
.def("SeeInvisible", (uint8(Lua_Mob::*)(void))&Lua_Mob::SeeInvisible)
|
||||
.def("SeeInvisibleUndead", (bool(Lua_Mob::*)(void))&Lua_Mob::SeeInvisibleUndead)
|
||||
.def("SeeHide", (bool(Lua_Mob::*)(void))&Lua_Mob::SeeHide)
|
||||
.def("SeeImprovedHide", (bool(Lua_Mob::*)(bool))&Lua_Mob::SeeImprovedHide)
|
||||
.def("GetNimbusEffect1", (uint8(Lua_Mob::*)(void))&Lua_Mob::GetNimbusEffect1)
|
||||
.def("GetNimbusEffect2", (uint8(Lua_Mob::*)(void))&Lua_Mob::GetNimbusEffect2)
|
||||
.def("GetNimbusEffect3", (uint8(Lua_Mob::*)(void))&Lua_Mob::GetNimbusEffect3)
|
||||
.def("IsTargetable", (bool(Lua_Mob::*)(void))&Lua_Mob::IsTargetable)
|
||||
.def("HasShieldEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasShieldEquiped)
|
||||
.def("HasTwoHandBluntEquiped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHandBluntEquiped)
|
||||
.def("HasTwoHanderEquipped", (bool(Lua_Mob::*)(void))&Lua_Mob::HasTwoHanderEquipped)
|
||||
.def("GetHerosForgeModel", (int32(Lua_Mob::*)(uint8))&Lua_Mob::GetHerosForgeModel)
|
||||
.def("IsEliteMaterialItem", (uint32(Lua_Mob::*)(uint8))&Lua_Mob::IsEliteMaterialItem)
|
||||
.def("GetBaseSize", (double(Lua_Mob::*)(void))&Lua_Mob::GetBaseSize)
|
||||
.def("HasOwner", (bool(Lua_Mob::*)(void))&Lua_Mob::HasOwner)
|
||||
.def("IsPet", (bool(Lua_Mob::*)(void))&Lua_Mob::IsPet)
|
||||
.def("HasPet", (bool(Lua_Mob::*)(void))&Lua_Mob::HasPet)
|
||||
.def("IsSilenced", (bool(Lua_Mob::*)(void))&Lua_Mob::IsSilenced)
|
||||
.def("IsAmnesiad", (bool(Lua_Mob::*)(void))&Lua_Mob::IsAmnesiad);
|
||||
}
|
||||
|
||||
luabind::scope lua_register_special_abilities() {
|
||||
|
||||
@ -358,6 +358,25 @@ public:
|
||||
int CanBuffStack(int spell_id, int caster_level);
|
||||
int CanBuffStack(int spell_id, int caster_level, bool fail_if_overwrite);
|
||||
void SetPseudoRoot(bool in);
|
||||
uint8 SeeInvisible();
|
||||
bool SeeInvisibleUndead();
|
||||
bool SeeHide();
|
||||
bool SeeImprovedHide();
|
||||
uint8 GetNimbusEffect1();
|
||||
uint8 GetNimbusEffect2();
|
||||
uint8 GetNimbusEffect3();
|
||||
bool IsTargetable();
|
||||
bool HasShieldEquiped();
|
||||
bool HasTwoHandBluntEquiped();
|
||||
bool HasTwoHanderEquipped();
|
||||
uint32 GetHerosForgeModel(uint8 material_slot);
|
||||
uint32 IsEliteMaterialItem(uint8 material_slot);
|
||||
float GetBaseSize();
|
||||
bool HasOwner();
|
||||
bool IsPet();
|
||||
bool HasPet();
|
||||
bool IsSilenced();
|
||||
bool IsAmnesiad();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -8490,6 +8490,497 @@ XS(XS_Mob_IsBlind) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_SeeInvisible);
|
||||
XS(XS_Mob_SeeInvisible) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::SeeInvisible(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->SeeInvisible();
|
||||
XSprePUSH;
|
||||
PUSHu((UV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_SeeInvisibleUndead);
|
||||
XS(XS_Mob_SeeInvisibleUndead) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::SeeInvisibleUndead(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->SeeInvisibleUndead();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_SeeHide);
|
||||
XS(XS_Mob_SeeHide) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::SeeHide(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->SeeHide();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_SeeImprovedHide);
|
||||
XS(XS_Mob_SeeImprovedHide) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::SeeImprovedHide(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->SeeImprovedHide();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetNimbusEffect1);
|
||||
XS(XS_Mob_GetNimbusEffect1) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetNimbusEffect1(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->GetNimbusEffect1();
|
||||
XSprePUSH;
|
||||
PUSHu((UV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetNimbusEffect2);
|
||||
XS(XS_Mob_GetNimbusEffect2) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetNimbusEffect2(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->GetNimbusEffect2();
|
||||
XSprePUSH;
|
||||
PUSHu((UV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetNimbusEffect3);
|
||||
XS(XS_Mob_GetNimbusEffect3) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetNimbusEffect3(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->GetNimbusEffect3();
|
||||
XSprePUSH;
|
||||
PUSHu((UV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_IsTargetable);
|
||||
XS(XS_Mob_IsTargetable) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::IsTargetable(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->IsTargetable();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_HasShieldEquiped);
|
||||
XS(XS_Mob_HasShieldEquiped) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::HasShieldEquiped(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->HasShieldEquiped();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_HasTwoHandBluntEquiped);
|
||||
XS(XS_Mob_HasTwoHandBluntEquiped) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::HasTwoHandBluntEquiped(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->HasTwoHandBluntEquiped();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_HasTwoHanderEquipped);
|
||||
XS(XS_Mob_HasTwoHanderEquipped) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::HasTwoHanderEquipped(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->HasTwoHanderEquipped();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetHerosForgeModel);
|
||||
XS(XS_Mob_GetHerosForgeModel) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetHerosForgeModel(THIS, material_slot)");
|
||||
{
|
||||
Mob* THIS;
|
||||
int32 RETVAL;
|
||||
uint8 material_slot = (uint8)SvUV(ST(1));
|
||||
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->GetHerosForgeModel(material_slot);
|
||||
XSprePUSH;
|
||||
PUSHi((IV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_IsEliteMaterialItem);
|
||||
XS(XS_Mob_IsEliteMaterialItem) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Mob::IsEliteMaterialItem(THIS, material_slot)");
|
||||
{
|
||||
Mob* THIS;
|
||||
uint32 RETVAL;
|
||||
uint8 material_slot = (uint8)SvUV(ST(1));
|
||||
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->IsEliteMaterialItem(material_slot);
|
||||
XSprePUSH;
|
||||
PUSHu((UV)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_GetBaseSize);
|
||||
XS(XS_Mob_GetBaseSize) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::GetBaseSize(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->GetBaseSize();
|
||||
XSprePUSH;
|
||||
PUSHn((double)RETVAL);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_HasOwner);
|
||||
XS(XS_Mob_HasOwner) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::HasOwner(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->HasOwner();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_IsPet);
|
||||
XS(XS_Mob_IsPet) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::IsPet(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->IsPet();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_HasPet);
|
||||
XS(XS_Mob_HasPet) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::HasPet(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->HasPet();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_IsSilenced);
|
||||
XS(XS_Mob_IsSilenced) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::IsSilenced(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->IsSilenced();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_IsAmnesiad);
|
||||
XS(XS_Mob_IsAmnesiad) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: Mob::IsAmnesiad(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->IsAmnesiad();
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
@ -8803,6 +9294,25 @@ XS(boot_Mob)
|
||||
newXSproto(strcpy(buf, "CanClassEquipItem"), XS_Mob_CanClassEquipItem, file, "$$");
|
||||
newXSproto(strcpy(buf, "IsFeared"), XS_Mob_IsFeared, file, "$");
|
||||
newXSproto(strcpy(buf, "IsBlind"), XS_Mob_IsBlind, file, "$");
|
||||
newXSproto(strcpy(buf, "SeeInvisible"), XS_Mob_SeeInvisible, file, "$");
|
||||
newXSproto(strcpy(buf, "SeeInvisibleUndead"), XS_Mob_SeeInvisibleUndead, file, "$");
|
||||
newXSproto(strcpy(buf, "SeeHide"), XS_Mob_SeeHide, file, "$");
|
||||
newXSproto(strcpy(buf, "SeeImprovedHide"), XS_Mob_SeeImprovedHide, file, "$");
|
||||
newXSproto(strcpy(buf, "GetNimbusEffect1"), XS_Mob_GetNimbusEffect1, file, "$");
|
||||
newXSproto(strcpy(buf, "GetNimbusEffect2"), XS_Mob_GetNimbusEffect2, file, "$");
|
||||
newXSproto(strcpy(buf, "GetNimbusEffect3"), XS_Mob_GetNimbusEffect3, file, "$");
|
||||
newXSproto(strcpy(buf, "IsTargetable"), XS_Mob_IsTargetable, file, "$");
|
||||
newXSproto(strcpy(buf, "HasShieldEquiped"), XS_Mob_HasShieldEquiped, file, "$");
|
||||
newXSproto(strcpy(buf, "HasTwoHandBluntEquiped"), XS_Mob_HasTwoHandBluntEquiped, file, "$");
|
||||
newXSproto(strcpy(buf, "HasTwoHanderEquipped"), XS_Mob_HasTwoHanderEquipped, file, "$");
|
||||
newXSproto(strcpy(buf, "GetHerosForgeModel"), XS_Mob_GetHerosForgeModel, file, "$$");
|
||||
newXSproto(strcpy(buf, "IsEliteMaterialItem"), XS_Mob_IsEliteMaterialItem, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetBaseSize"), XS_Mob_GetBaseSize, file, "$");
|
||||
newXSproto(strcpy(buf, "HasOwner"), XS_Mob_HasOwner, file, "$");
|
||||
newXSproto(strcpy(buf, "IsPet"), XS_Mob_IsPet, file, "$");
|
||||
newXSproto(strcpy(buf, "HasPet"), XS_Mob_HasPet, file, "$");
|
||||
newXSproto(strcpy(buf, "IsSilenced"), XS_Mob_IsSilenced, file, "$");
|
||||
newXSproto(strcpy(buf, "IsAmnesiad"), XS_Mob_IsAmnesiad, file, "$");
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user