summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/script_ref.txt3
-rw-r--r--src/map/script.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/doc/script_ref.txt b/doc/script_ref.txt
index 992a1e2..6c9f3f9 100644
--- a/doc/script_ref.txt
+++ b/doc/script_ref.txt
@@ -1254,6 +1254,9 @@ AthenaNPCScript
Retrieves the RID of the player's partner, or 0 if not married.
* (fixme)
+
+ misceffect <id> <name>
+ Shows the effect with id on name. if name is omitted show on NPC.
*定数ラベル
-ラベル
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)