mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Quest API] Add CanRaceEquipItem(item_id) to Perl/Lua. (#1411)
* [Quest API] Add CanRaceEquipItem(item_id) to Perl/Lua. - Add $mob->CanRaceEquipItem(item_id) to Perl. - Add mob:CanClassEquipItem(item_id) to Lua. - Add mob:CanRaceEquipItem(item_id) to Lua. * Use constants. Co-authored-by: Chris Miles <akkadius1@gmail.com>
This commit is contained in:
+19
-1
@@ -5652,7 +5652,7 @@ XS(XS_Mob_CanClassEquipItem) {
|
||||
uint32 item_id = (uint32) SvUV(ST(1));
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
RETVAL = THIS->CanClassEquipItem(item_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
@@ -6257,6 +6257,23 @@ XS(XS_Mob_GetLastName) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_CanRaceEquipItem); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_CanRaceEquipItem) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Mob::CanRaceEquipItem(THIS, uint32 item_id)"); // @categories Inventory and Items, Script Utility
|
||||
{
|
||||
Mob *THIS;
|
||||
bool RETVAL;
|
||||
uint32 item_id = (uint32) SvUV(ST(1));
|
||||
VALIDATE_THIS_IS_MOB;
|
||||
RETVAL = THIS->CanRaceEquipItem(item_id);
|
||||
ST(0) = boolSV(RETVAL);
|
||||
sv_2mortal(ST(0));
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Mob_RemoveAllNimbusEffects); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Mob_RemoveAllNimbusEffects) {
|
||||
dXSARGS;
|
||||
@@ -6652,6 +6669,7 @@ XS(boot_Mob) {
|
||||
newXSproto(strcpy(buf, "GetHateClosest"), XS_Mob_GetHateClosest, file, "$");
|
||||
newXSproto(strcpy(buf, "GetHateListByDistance"), XS_Mob_GetHateListByDistance, file, "$;$");
|
||||
newXSproto(strcpy(buf, "GetLastName"), XS_Mob_GetLastName, file, "$");
|
||||
newXSproto(strcpy(buf, "CanRaceEquipItem"), XS_Mob_CanRaceEquipItem, file, "$$");
|
||||
newXSproto(strcpy(buf, "RemoveAllNimbusEffects"), XS_Mob_RemoveAllNimbusEffects, file, "$");
|
||||
newXSproto(strcpy(buf, "AddNimbusEffect"), XS_Mob_AddNimbusEffect, file, "$$");
|
||||
#ifdef BOTS
|
||||
|
||||
Reference in New Issue
Block a user