summaryrefslogtreecommitdiff
path: root/world/map/npc/magic
diff options
context:
space:
mode:
Diffstat (limited to 'world/map/npc/magic')
-rw-r--r--world/map/npc/magic/level2-protect.txt9
1 files changed, 2 insertions, 7 deletions
diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt
index db11105f..659efdc1 100644
--- a/world/map/npc/magic/level2-protect.txt
+++ b/world/map/npc/magic/level2-protect.txt
@@ -11,11 +11,7 @@
if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id))
set @target_id, BL_ID; // fallback to self
- set @betsanc_caster, BL_ID, @target_id;
- if (attachrid(@target_id) != 1) end;
- set @target_hat, getequipid(equip_head), @betsanc_caster;
- if (attachrid(@betsanc_caster) != 1) end;
- if (@target_hat == 888) end; // FIXME: this whole 5 line block could be done with only one line if we modify getequipid
+ if (getequipid(equip_head, strcharinfo(0, @target_id)) == 888) end;
if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID;
if (get(@antiprotect, @target_id) > 0) end;
@@ -33,8 +29,7 @@
set @betsanc_time, .@time, @target_id;
sc_start SC_PHYS_SHIELD, .@time, max(15,(@spellpower/20))+5, @target_id;
message @args$, "Shield : You feel more protected.";
- if (attachrid(@target_id) != 1) end;
- addtimer @betsanc_time, strnpcinfo(0)+"::OnEnd";
+ addtimer @betsanc_time, strnpcinfo(0)+"::OnEnd", @target_id;
end;
OnEnd: