summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-19 20:31:57 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-19 20:31:57 +0000
commit9a83b5ad626f8bfd4011277173e8bf385e4971fe (patch)
treefac179a5bb93199cf5f0314ff21e935d7da47b72 /src/map/unit.c
parentca003ef941f7a039a4251f28d0a60b61de66f186 (diff)
downloadhercules-9a83b5ad626f8bfd4011277173e8bf385e4971fe.tar.gz
hercules-9a83b5ad626f8bfd4011277173e8bf385e4971fe.tar.bz2
hercules-9a83b5ad626f8bfd4011277173e8bf385e4971fe.tar.xz
hercules-9a83b5ad626f8bfd4011277173e8bf385e4971fe.zip
- Added bonusautoscript and bonusautoscript2. These are used to attach a script to a player which gets executed on attack (or when attacked). Required for several of the more recent items.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11519 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 616781b7a..709886e76 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1805,6 +1805,10 @@ int unit_free(struct block_list *bl, int clrtype)
status_change_end(bl,SC_STEELBODY,-1);
}
}
+
+ pc_autoscript_clear(sd->autoscript, ARRAYLENGTH(sd->autoscript));
+ pc_autoscript_clear(sd->autoscript2, ARRAYLENGTH(sd->autoscript2));
+
if (sd->followtimer != -1)
pc_stop_following(sd);
// Force exiting from duel and rejecting all duel invitations when player quit [LuzZza]