mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[Quest API] Add GetHealScale() and GetSpellScale() to Perl and Lua. (#1515)
This commit is contained in:
@@ -1812,6 +1812,40 @@ XS(XS_NPC_GetFirstSlotByItemID) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_NPC_GetHealScale);
|
||||
XS(XS_NPC_GetHealScale) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: NPC::GetHealScale(THIS)"); // @categories Stats and Attributes
|
||||
{
|
||||
NPC *THIS;
|
||||
float healscale;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_NPC;
|
||||
healscale = THIS->GetHealScale();
|
||||
XSprePUSH;
|
||||
PUSHn((double) healscale);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_NPC_GetSpellScale);
|
||||
XS(XS_NPC_GetSpellScale) {
|
||||
dXSARGS;
|
||||
if (items != 1)
|
||||
Perl_croak(aTHX_ "Usage: NPC::GetSpellScale(THIS)"); // @categories Stats and Attributes
|
||||
{
|
||||
NPC *THIS;
|
||||
float spellscale;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_NPC;
|
||||
spellscale = THIS->GetSpellScale();
|
||||
XSprePUSH;
|
||||
PUSHn((double) spellscale);
|
||||
}
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
@@ -1934,6 +1968,8 @@ XS(boot_NPC) {
|
||||
newXSproto(strcpy(buf, "CountItem"), XS_NPC_CountItem, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetItemIDBySlot"), XS_NPC_GetItemIDBySlot, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetFirstSlotByItemID"), XS_NPC_GetFirstSlotByItemID, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetHealScale"), XS_NPC_GetHealScale, file, "$");
|
||||
newXSproto(strcpy(buf, "GetSpellScale"), XS_NPC_GetSpellScale, file, "$");
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user