From 797eaf308d0477b5a4588b9887263770a2727a4b Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 16 Jun 2021 11:06:30 -0400 Subject: [PATCH] [Quest API] Add AddNimbusEffect(effect_id) to Perl. (#1412) - Add $client->AddNimbusEffect(effect_id) to Perl. --- zone/perl_mob.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/zone/perl_mob.cpp b/zone/perl_mob.cpp index 28830ef2b..ad16544bb 100644 --- a/zone/perl_mob.cpp +++ b/zone/perl_mob.cpp @@ -6257,6 +6257,20 @@ XS(XS_Mob_GetLastName) { XSRETURN(1); } +XS(XS_Mob_AddNimbusEffect); +XS(XS_Mob_AddNimbusEffect) { + dXSARGS; + if (items != 2) + Perl_croak(aTHX_ "Usage: Mob::AddNimbusEffect(THIS, int effect_id)"); // @categories Script Utility + { + Mob* THIS; + int effect_id = (int) SvIV(ST(1)); + VALIDATE_THIS_IS_MOB; + THIS->AddNimbusEffect(effect_id); + } + XSRETURN_EMPTY; +} + #ifdef BOTS XS(XS_Mob_CastToBot); /* prototype to pass -Wmissing-prototypes */ XS(XS_Mob_CastToBot) @@ -6625,6 +6639,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, "AddNimbusEffect"), XS_Mob_AddNimbusEffect, file, "$$"); #ifdef BOTS newXSproto(strcpy(buf, "CastToBot"), XS_Mob_CastToBot, file, "$"); #endif