summaryrefslogtreecommitdiff
path: root/world/map/npc/magic/_procedures.txt
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-11-11 17:18:14 -0500
committergumi <git@gumi.ca>2018-11-11 22:36:15 -0500
commit0e1a7f000ccdcf6f84ec66192b025f261772cdb3 (patch)
tree7367604274d14b0fdabae946985ef30fc71aa8de /world/map/npc/magic/_procedures.txt
parent15e556361dabcee7d215cb6aeb2f157d30c0963a (diff)
downloadserverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.tar.gz
serverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.tar.bz2
serverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.tar.xz
serverdata-0e1a7f000ccdcf6f84ec66192b025f261772cdb3.zip
give unique ids to magic spell effects
Diffstat (limited to 'world/map/npc/magic/_procedures.txt')
-rw-r--r--world/map/npc/magic/_procedures.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt
index c7ae2cd7..6ba748a9 100644
--- a/world/map/npc/magic/_procedures.txt
+++ b/world/map/npc/magic/_procedures.txt
@@ -32,6 +32,7 @@ function|script|magic_checks
set .@flags, getarg(0);
set .@nonmagic, .@flags & (1<<0);
+ if (GM >= 50) goto L_Return; // event managers have no restrictions
if(HIDDEN) goto L_Hidden; // can not cast with @hide
if(@_M_BLOCK == 2) goto L_Login; // login warmup
if(@_M_BLOCK) goto L_Blocked; // check if last debuff ended
@@ -58,6 +59,9 @@ L_Greybar:
L_Login:
smsg SMSG_FAILURE, "Magic: Impossible to cast for 10s after logging in.";
return 5;
+
+L_Return:
+ return 0;
}
function|script|elt_damage
@@ -72,7 +76,7 @@ function|script|elt_damage
if (!.@source) set .@source, getcharid(3);
injure .@source, @target_id, (.@dmg * (100 - get(MDEF1, @target_id))) / 100;
- misceffect getarg(4), @target_id;
+ if (getarg(4) != FX_NONE) misceffect getarg(4), @target_id;
return;
}