mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository
This commit is contained in:
@@ -1619,11 +1619,12 @@ XS(XS__ChooseRandom) {
|
||||
if (items < 1)
|
||||
Perl_croak(aTHX_ "Usage: quest::ChooseRandom(option1, option2, option3, option4, option5...[no limit])");
|
||||
|
||||
dXSTARG;
|
||||
int index = zone->random.Int(0, items - 1);
|
||||
SV *RETVAL = ST(index);
|
||||
|
||||
SV *tmp = ST(0);
|
||||
ST(0) = ST(index);
|
||||
ST(index) = tmp;
|
||||
XSprePUSH;
|
||||
PUSHs(RETVAL);
|
||||
|
||||
XSRETURN(1); //return 1 element from the stack (ST(0))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user