diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-26 16:58:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-26 16:58:56 +0300 |
commit | 369f7b3a44b0838e168ef7dcdc36d182845e8874 (patch) | |
tree | 57690592aef1c0560aef150ea87e2e6f2f8c7e1b /src/map/script.c | |
parent | e7434a2c9bb05e2c2404092cab842236e9a155e8 (diff) | |
download | plugin-369f7b3a44b0838e168ef7dcdc36d182845e8874.tar.gz plugin-369f7b3a44b0838e168ef7dcdc36d182845e8874.tar.bz2 plugin-369f7b3a44b0838e168ef7dcdc36d182845e8874.tar.xz plugin-369f7b3a44b0838e168ef7dcdc36d182845e8874.zip |
Replace script function misceffect2 to misceffect.
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c index bdf8bb2..618f89c 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -401,3 +401,33 @@ BUILDIN(countItemColor) script_pushint(st, count); return true; } + +BUILDIN(miscEffect) +{ + int type = script_getnum(st, 2); + struct block_list *bl = NULL; + + if (script_hasdata(st, 3)) + { + if (script_isstring(st, 3)) + { + TBL_PC *sd = map->nick2sd(script_getstr(st, 3)); + if (sd) + bl = &sd->bl; + } + else if (script_isint(st, 3)) + { + bl = map->id2bl(script_getnum(st, 3)); + } + } + + if (!bl) + { + TBL_PC *sd = script->rid2sd (st); + if (sd) + bl = &sd->bl; + } + if (bl) + clif->specialeffect(bl, type, AREA); + return true; +} |