diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-06-06 19:08:12 +0200 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-06-06 19:08:12 +0200 |
commit | 121897bca888944998c1260184a5ab4bdf4ccdad (patch) | |
tree | f3b2e1001f4719edc00d191ed122a1eaca233f3c /src/map | |
parent | 0a17ea82686c925ea81ba10bb7305b89f9e3fcd8 (diff) | |
download | tmwa-121897bca888944998c1260184a5ab4bdf4ccdad.tar.gz tmwa-121897bca888944998c1260184a5ab4bdf4ccdad.tar.bz2 tmwa-121897bca888944998c1260184a5ab4bdf4ccdad.tar.xz tmwa-121897bca888944998c1260184a5ab4bdf4ccdad.zip |
Fix 2nd parameter being truly optional on misceffect. Document it too.
The name parameter can now be omitted safely.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c index 4cc65e2..dddb395 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -464,7 +464,7 @@ struct { {buildin_getskilllist,"getskilllist",""}, {buildin_clearitem,"clearitem",""}, {buildin_classchange,"classchange","ii"}, - {buildin_misceffect,"misceffect","is"}, + {buildin_misceffect,"misceffect","i*"}, {buildin_soundeffect,"soundeffect","si"}, {buildin_strmobinfo,"strmobinfo","ii"}, // display mob data [Valaris] {buildin_guardian,"guardian","siisii*i"}, // summon guardians @@ -5553,11 +5553,12 @@ int buildin_classchange(struct script_state *st) int buildin_misceffect(struct script_state *st) { int type; - char *name; + char *name = NULL; type=conv_num(st,& (st->stack->stack_data[st->start+2])); - name=conv_str(st,& (st->stack->stack_data[st->start+3])); - if (strlen(name) > 0) + if( st->end>st->start+3 ) + name=conv_str(st,& (st->stack->stack_data[st->start+3])); + if (name) { struct map_session_data *sd = map_nick2sd(name); if(sd) |