mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-28 20:07:56 +00:00
QuestReward now accepts a single bool (true or false) for faction instead of 2 int32s. If true, it will pull the faction hits assigned to the NPC in the DB (reversed, of course) and give you that as part of the reward.
Example usage: e.other:QuestReward(e.self,copper,silver,gold,platinum,itemid,exp,faction) (Credit to Cavedude)
This commit is contained in:
@@ -6193,7 +6193,7 @@ XS(XS_Client_QuestReward)
|
||||
{
|
||||
dXSARGS;
|
||||
if (items < 1 || items > 9)
|
||||
Perl_croak(aTHX_ "Usage: Client::QuestReward(THIS, mob, copper, silver, gold, platinum, itemid, exp, factionid, faction)");
|
||||
Perl_croak(aTHX_ "Usage: Client::QuestReward(THIS, mob, copper, silver, gold, platinum, itemid, exp, faction)");
|
||||
{
|
||||
Client* THIS;
|
||||
Mob * mob = nullptr;
|
||||
@@ -6203,8 +6203,7 @@ XS(XS_Client_QuestReward)
|
||||
int32 platinum = 0;
|
||||
int32 itemid = 0;
|
||||
int32 exp = 0;
|
||||
int32 factionid = 0;
|
||||
int32 faction = 0;
|
||||
bool faction = false;
|
||||
|
||||
if (sv_derived_from(ST(0), "THIS")) {
|
||||
IV tmp = SvIV((SV*)SvRV(ST(0)));
|
||||
@@ -6231,10 +6230,9 @@ XS(XS_Client_QuestReward)
|
||||
if (items > 5) { platinum = (int32)SvIV(ST(5)); }
|
||||
if (items > 6) { itemid = (int32)SvIV(ST(6)); }
|
||||
if (items > 7) { exp = (int32)SvIV(ST(7)); }
|
||||
if (items > 8) { factionid = (int32)SvIV(ST(8)); }
|
||||
if (items > 9) { faction = (int32)SvIV(ST(9)); }
|
||||
if (items > 8) { faction = (bool)SvIV(ST(8)); }
|
||||
|
||||
THIS->QuestReward(mob, copper, silver, gold, platinum, itemid, exp, factionid, faction);
|
||||
THIS->QuestReward(mob, copper, silver, gold, platinum, itemid, exp, faction);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
@@ -6483,7 +6481,7 @@ XS(boot_Client)
|
||||
newXSproto(strcpy(buf, "GetTargetRingX"), XS_Client_GetTargetRingX, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetTargetRingY"), XS_Client_GetTargetRingY, file, "$$");
|
||||
newXSproto(strcpy(buf, "GetTargetRingZ"), XS_Client_GetTargetRingZ, file, "$$");
|
||||
newXSproto(strcpy(buf, "QuestReward"), XS_Client_QuestReward, file, "$$;$$$$$$$$");
|
||||
newXSproto(strcpy(buf, "QuestReward"), XS_Client_QuestReward, file, "$$;$$$$$$$");
|
||||
XSRETURN_YES;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user