mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
LUA/PERL - IsStanding() and IsCrouching() - Returns as bools
This commit is contained in:
parent
2690e4de4d
commit
d23a6e646e
@ -791,7 +791,9 @@ public:
|
|||||||
uint32 GetCharMaxLevelFromQGlobal();
|
uint32 GetCharMaxLevelFromQGlobal();
|
||||||
uint32 GetCharMaxLevelFromBucket();
|
uint32 GetCharMaxLevelFromBucket();
|
||||||
|
|
||||||
|
inline bool IsStanding() const {return (playeraction == 0);}
|
||||||
inline bool IsSitting() const {return (playeraction == 1);}
|
inline bool IsSitting() const {return (playeraction == 1);}
|
||||||
|
inline bool IsCrouching() const {return (playeraction == 2);}
|
||||||
inline bool IsBecomeNPC() const { return npcflag; }
|
inline bool IsBecomeNPC() const { return npcflag; }
|
||||||
inline uint8 GetBecomeNPCLevel() const { return npclevel; }
|
inline uint8 GetBecomeNPCLevel() const { return npclevel; }
|
||||||
inline void SetBecomeNPC(bool flag) { npcflag = flag; }
|
inline void SetBecomeNPC(bool flag) { npcflag = flag; }
|
||||||
|
|||||||
@ -615,11 +615,21 @@ void Lua_Client::UntrainDiscAll(bool update_client) {
|
|||||||
self->UntrainDiscAll(update_client);
|
self->UntrainDiscAll(update_client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Lua_Client::IsStanding() {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsStanding();
|
||||||
|
}
|
||||||
|
|
||||||
bool Lua_Client::IsSitting() {
|
bool Lua_Client::IsSitting() {
|
||||||
Lua_Safe_Call_Bool();
|
Lua_Safe_Call_Bool();
|
||||||
return self->IsSitting();
|
return self->IsSitting();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Lua_Client::IsCrouching() {
|
||||||
|
Lua_Safe_Call_Bool();
|
||||||
|
return self->IsCrouching();
|
||||||
|
}
|
||||||
|
|
||||||
void Lua_Client::SetFeigned(bool v) {
|
void Lua_Client::SetFeigned(bool v) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
self->SetFeigned(v);
|
self->SetFeigned(v);
|
||||||
@ -1621,7 +1631,9 @@ luabind::scope lua_register_client() {
|
|||||||
.def("UntrainDisc", (void(Lua_Client::*)(int,bool))&Lua_Client::UntrainDisc)
|
.def("UntrainDisc", (void(Lua_Client::*)(int,bool))&Lua_Client::UntrainDisc)
|
||||||
.def("UntrainDiscAll", (void(Lua_Client::*)(void))&Lua_Client::UntrainDiscAll)
|
.def("UntrainDiscAll", (void(Lua_Client::*)(void))&Lua_Client::UntrainDiscAll)
|
||||||
.def("UntrainDiscAll", (void(Lua_Client::*)(bool))&Lua_Client::UntrainDiscAll)
|
.def("UntrainDiscAll", (void(Lua_Client::*)(bool))&Lua_Client::UntrainDiscAll)
|
||||||
|
.def("IsStanding", (bool(Lua_Client::*)(void))&Lua_Client::IsStanding)
|
||||||
.def("IsSitting", (bool(Lua_Client::*)(void))&Lua_Client::IsSitting)
|
.def("IsSitting", (bool(Lua_Client::*)(void))&Lua_Client::IsSitting)
|
||||||
|
.def("IsCrouching", (bool(Lua_Client::*)(void))&Lua_Client::IsCrouching)
|
||||||
.def("SetFeigned", (void(Lua_Client::*)(bool))&Lua_Client::SetFeigned)
|
.def("SetFeigned", (void(Lua_Client::*)(bool))&Lua_Client::SetFeigned)
|
||||||
.def("GetFeigned", (bool(Lua_Client::*)(void))&Lua_Client::GetFeigned)
|
.def("GetFeigned", (bool(Lua_Client::*)(void))&Lua_Client::GetFeigned)
|
||||||
.def("AutoSplitEnabled", (bool(Lua_Client::*)(void))&Lua_Client::AutoSplitEnabled)
|
.def("AutoSplitEnabled", (bool(Lua_Client::*)(void))&Lua_Client::AutoSplitEnabled)
|
||||||
|
|||||||
@ -148,7 +148,9 @@ public:
|
|||||||
void UntrainDisc(int slot, bool update_client);
|
void UntrainDisc(int slot, bool update_client);
|
||||||
void UntrainDiscAll();
|
void UntrainDiscAll();
|
||||||
void UntrainDiscAll(bool update_client);
|
void UntrainDiscAll(bool update_client);
|
||||||
|
bool IsStanding();
|
||||||
bool IsSitting();
|
bool IsSitting();
|
||||||
|
bool IsCrouching();
|
||||||
void SetFeigned(bool v);
|
void SetFeigned(bool v);
|
||||||
bool GetFeigned();
|
bool GetFeigned();
|
||||||
bool AutoSplitEnabled();
|
bool AutoSplitEnabled();
|
||||||
|
|||||||
@ -2596,6 +2596,32 @@ XS(XS_Client_UntrainDiscAll) {
|
|||||||
XSRETURN_EMPTY;
|
XSRETURN_EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XS(XS_Client_IsStanding); /* prototype to pass -Wmissing-prototypes */
|
||||||
|
XS(XS_Client_IsStanding)
|
||||||
|
{
|
||||||
|
dXSARGS;
|
||||||
|
if (items != 1)
|
||||||
|
Perl_croak(aTHX_ "Usage: Client::IsStanding(THIS)");
|
||||||
|
{
|
||||||
|
Client * THIS;
|
||||||
|
bool RETVAL;
|
||||||
|
|
||||||
|
if (sv_derived_from(ST(0), "Client")) {
|
||||||
|
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||||
|
THIS = INT2PTR(Client *,tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||||
|
if(THIS == nullptr)
|
||||||
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
|
RETVAL = THIS->IsStanding();
|
||||||
|
ST(0) = boolSV(RETVAL);
|
||||||
|
sv_2mortal(ST(0));
|
||||||
|
}
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
XS(XS_Client_IsSitting); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Client_IsSitting); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Client_IsSitting) {
|
XS(XS_Client_IsSitting) {
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
@ -2620,6 +2646,32 @@ XS(XS_Client_IsSitting) {
|
|||||||
XSRETURN(1);
|
XSRETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XS(XS_Client_IsCrouching); /* prototype to pass -Wmissing-prototypes */
|
||||||
|
XS(XS_Client_IsCrouching)
|
||||||
|
{
|
||||||
|
dXSARGS;
|
||||||
|
if (items != 1)
|
||||||
|
Perl_croak(aTHX_ "Usage: Client::IsCrouching(THIS)");
|
||||||
|
{
|
||||||
|
Client * THIS;
|
||||||
|
bool RETVAL;
|
||||||
|
|
||||||
|
if (sv_derived_from(ST(0), "Client")) {
|
||||||
|
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||||
|
THIS = INT2PTR(Client *,tmp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
Perl_croak(aTHX_ "THIS is not of type Client");
|
||||||
|
if(THIS == nullptr)
|
||||||
|
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
|
||||||
|
|
||||||
|
RETVAL = THIS->IsCrouching();
|
||||||
|
ST(0) = boolSV(RETVAL);
|
||||||
|
sv_2mortal(ST(0));
|
||||||
|
}
|
||||||
|
XSRETURN(1);
|
||||||
|
}
|
||||||
|
|
||||||
XS(XS_Client_IsBecomeNPC); /* prototype to pass -Wmissing-prototypes */
|
XS(XS_Client_IsBecomeNPC); /* prototype to pass -Wmissing-prototypes */
|
||||||
XS(XS_Client_IsBecomeNPC) {
|
XS(XS_Client_IsBecomeNPC) {
|
||||||
dXSARGS;
|
dXSARGS;
|
||||||
@ -6338,7 +6390,9 @@ XS(boot_Client) {
|
|||||||
newXSproto(strcpy(buf, "IsLD"), XS_Client_IsLD, file, "$");
|
newXSproto(strcpy(buf, "IsLD"), XS_Client_IsLD, file, "$");
|
||||||
newXSproto(strcpy(buf, "IsMedding"), XS_Client_IsMedding, file, "$");
|
newXSproto(strcpy(buf, "IsMedding"), XS_Client_IsMedding, file, "$");
|
||||||
newXSproto(strcpy(buf, "IsRaidGrouped"), XS_Client_IsRaidGrouped, file, "$");
|
newXSproto(strcpy(buf, "IsRaidGrouped"), XS_Client_IsRaidGrouped, file, "$");
|
||||||
|
newXSproto(strcpy(buf, "IsStanding"), XS_Client_IsStanding, file, "$");
|
||||||
newXSproto(strcpy(buf, "IsSitting"), XS_Client_IsSitting, file, "$");
|
newXSproto(strcpy(buf, "IsSitting"), XS_Client_IsSitting, file, "$");
|
||||||
|
newXSproto(strcpy(buf, "IsCrouching"), XS_Client_IsCrouching, file, "$");
|
||||||
newXSproto(strcpy(buf, "IsTaskActive"), XS_Client_IsTaskActive, file, "$$");
|
newXSproto(strcpy(buf, "IsTaskActive"), XS_Client_IsTaskActive, file, "$$");
|
||||||
newXSproto(strcpy(buf, "IsTaskActivityActive"), XS_Client_IsTaskActivityActive, file, "$$$");
|
newXSproto(strcpy(buf, "IsTaskActivityActive"), XS_Client_IsTaskActivityActive, file, "$$$");
|
||||||
newXSproto(strcpy(buf, "IsTaskCompleted"), XS_Client_IsTaskCompleted, file, "$$");
|
newXSproto(strcpy(buf, "IsTaskCompleted"), XS_Client_IsTaskCompleted, file, "$$");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user