[Saylinks] Implement Auto Saylink Injection (#1525)

* Implement auto saylink injection

* Cover Lua say since it takes a different code path
This commit is contained in:
Chris Miles
2021-09-12 22:08:30 -05:00
committed by GitHub
parent 94c1a50cc8
commit 6b93130c13
8 changed files with 112 additions and 30 deletions
+5 -5
View File
@@ -1593,7 +1593,7 @@ XS(XS__addldonpoints) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: quest::addldonpoints(uint32 theme_id, int points)");
uint32 theme_id = (uint32) SvUV(ST(0));
int points = (int) SvIV(ST(1));
quest_manager.addldonpoints(theme_id, points);
@@ -6483,7 +6483,7 @@ XS(XS__gethexcolorcode) {
sv_setpv(TARG, hex_color_code.c_str());
XSprePUSH;
PUSHTARG;
XSRETURN(1);
XSRETURN(1);
}
XS(XS__getaaexpmodifierbycharid);
@@ -6491,7 +6491,7 @@ XS(XS__getaaexpmodifierbycharid) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: quest::getaaexpmodifierbycharid(uint32 character_id, uint32 zone_id)");
dXSTARG;
double aa_modifier;
uint32 character_id = (uint32) SvUV(ST(0));
@@ -6507,7 +6507,7 @@ XS(XS__getexpmodifierbycharid) {
dXSARGS;
if (items != 2)
Perl_croak(aTHX_ "Usage: quest::getexpmodifierbycharid(uint32 character_id, uint32 zone_id)");
dXSTARG;
double exp_modifier;
uint32 character_id = (uint32) SvUV(ST(0));
@@ -6870,7 +6870,7 @@ XS(XS__getspellstat) {
uint8 slot = 0;
if (items == 3)
slot = (uint8) SvUV(ST(2));
stat_value = quest_manager.getspellstat(spell_id, stat_identifier, slot);
XSprePUSH;