summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c40
1 files changed, 12 insertions, 28 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 01bd4d9b5..91f1d8cc9 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14890,40 +14890,24 @@ BUILDIN(npcskilleffect) {
*------------------------------------------*/
BUILDIN(specialeffect) {
struct block_list *bl = NULL;
- int type = script_getnum(st, 2);
- enum send_target target = AREA;
-
- if (script_hasdata(st, 3)) {
- target = script_getnum(st, 3);
- }
+ int type = script_getnum(st,2);
+ enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA;
- if (script_hasdata(st, 4)) {
- if (script_isstringtype(st, 4)) {
- struct npc_data *nd = npc->name2id(script_getstr(st, 4));
- if (nd != NULL) {
- bl = &nd->bl;
- }
- } else {
- bl = map->id2bl(script_getnum(st, 4));
- }
+ if (script_hasdata(st,4)) {
+ struct npc_data *nd = npc->name2id(script_getstr(st,4));
+ if (nd != NULL)
+ bl = &nd->bl;
} else {
bl = map->id2bl(st->oid);
}
- if (bl == NULL) {
+ if (bl == NULL)
return true;
- }
if (target == SELF) {
- struct map_session_data *sd;
- if (script_hasdata(st, 5)) {
- sd = map->id2sd(script_getnum(st, 5));
- } else {
- sd = script->rid2sd(st);
- }
- if (sd != NULL) {
+ struct map_session_data *sd = script->rid2sd(st);
+ if (sd != NULL)
clif->specialeffect_single(bl, type, sd->fd);
- }
} else {
clif->specialeffect(bl, type, target);
}
@@ -23580,7 +23564,7 @@ void script_parse_builtin(void) {
BUILDIN_DEF(getskilllist,""),
BUILDIN_DEF(clearitem,""),
BUILDIN_DEF(classchange,"ii?"),
- BUILDIN_DEF_DEPRECATED(misceffect,"i"),
+ BUILDIN_DEF(misceffect,"i"),
BUILDIN_DEF(playbgm,"s"),
BUILDIN_DEF(playbgmall,"s?????"),
BUILDIN_DEF(soundeffect,"si"),
@@ -23595,8 +23579,8 @@ void script_parse_builtin(void) {
BUILDIN_DEF(petskillsupport,"viiii"), // [Skotlex]
BUILDIN_DEF(skilleffect,"vi"), // skill effect [Celest]
BUILDIN_DEF(npcskilleffect,"viii"), // npc skill effect [Valaris]
- BUILDIN_DEF(specialeffect,"i???"), // npc skill effect [Valaris]
- BUILDIN_DEF_DEPRECATED(specialeffect2,"i??"), // skill effect on players[Valaris]
+ BUILDIN_DEF(specialeffect,"i??"), // npc skill effect [Valaris]
+ BUILDIN_DEF(specialeffect2,"i??"), // skill effect on players[Valaris]
BUILDIN_DEF(nude,""), // nude command [Valaris]
BUILDIN_DEF(mapwarp,"ssii??"), // Added by RoVeRT
BUILDIN_DEF(atcommand,"s"), // [MouseJstr]