diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-06-06 17:42:22 +0200 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-06-06 17:42:22 +0200 |
commit | 0a17ea82686c925ea81ba10bb7305b89f9e3fcd8 (patch) | |
tree | 5dadf99b56cdd4e941c8c923d8203fcb62b1eeda /src/map | |
parent | ff1868fb126f02cd94b7a7f72663621a4c34938f (diff) | |
download | tmwa-0a17ea82686c925ea81ba10bb7305b89f9e3fcd8.tar.gz tmwa-0a17ea82686c925ea81ba10bb7305b89f9e3fcd8.tar.bz2 tmwa-0a17ea82686c925ea81ba10bb7305b89f9e3fcd8.tar.xz tmwa-0a17ea82686c925ea81ba10bb7305b89f9e3fcd8.zip |
Add support for optional charname target to script function misceffect.
misceffect int number - shows effect on NPC
misceffect int number, string taget - shows effect on named target
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/script.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c index 96ace2c..4cc65e2 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","i"}, + {buildin_misceffect,"misceffect","is"}, {buildin_soundeffect,"soundeffect","si"}, {buildin_strmobinfo,"strmobinfo","ii"}, // display mob data [Valaris] {buildin_guardian,"guardian","siisii*i"}, // summon guardians @@ -5553,9 +5553,17 @@ int buildin_classchange(struct script_state *st) int buildin_misceffect(struct script_state *st) { int type; + char *name; type=conv_num(st,& (st->stack->stack_data[st->start+2])); - if(st->oid) + name=conv_str(st,& (st->stack->stack_data[st->start+3])); + if (strlen(name) > 0) + { + struct map_session_data *sd = map_nick2sd(name); + if(sd) + clif_misceffect(&sd->bl,type); + } + else if(st->oid) clif_misceffect(map_id2bl(st->oid),type); else{ struct map_session_data *sd=script_rid2sd(st); |