mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-14 03:38:33 +00:00
Added optional guildid and minstatus parameters to quest::gmsay(<messsage>, [color], [toworld], [guildid], [minstatus])
This commit is contained in:
+10
-2
@@ -644,12 +644,14 @@ XS(XS__gmsay);
|
||||
XS(XS__gmsay)
|
||||
{
|
||||
dXSARGS;
|
||||
if (items != 1 && items != 2 && items != 3)
|
||||
if ((items < 1) || (items > 5))
|
||||
Perl_croak(aTHX_ "Usage: gmsay(str, color, send_to_world?)");
|
||||
|
||||
char * str = (char *)SvPV_nolen(ST(0));
|
||||
int color = 7;
|
||||
bool send_to_world = 0;
|
||||
uint32 to_guilddbid = 0;
|
||||
uint16 to_minstatus = 80;
|
||||
|
||||
if (items > 1) {
|
||||
color = (int)SvIV(ST(1));
|
||||
@@ -659,7 +661,13 @@ XS(XS__gmsay)
|
||||
send_to_world = ((int)SvIV(ST(2))) == 0?false:true;
|
||||
}
|
||||
|
||||
quest_manager.gmsay(str, color, send_to_world);
|
||||
if (items > 3)
|
||||
to_guilddbid = (int)SvUV(ST(3));
|
||||
|
||||
if (items > 4)
|
||||
to_minstatus = (int)SvUV(ST(4));
|
||||
|
||||
quest_manager.gmsay(str, color, send_to_world, to_guilddbid, to_minstatus);
|
||||
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user