summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-28 08:23:53 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-28 08:23:53 +0000
commitac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96 (patch)
tree85408fbe3187a3e4a3450b8db88d33374573c39c /src/map/unit.c
parenta6a08b1c5d2a955cbd586d5d3c7f777e69c215ff (diff)
downloadhercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.tar.gz
hercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.tar.bz2
hercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.tar.xz
hercules-ac6e0a8cd56eaa51dc7e6cd68020d0ea7e9b5d96.zip
* Implemented script command "autobonus". [Inkfish]
- "autobonus" is similar to "bonusautoscript", however it has a timer of its own. - Updated itemdb changing items bonus using "bonusautoscript + sc_start" mode to "autobonus + bonus" mode. - Remove bonusautoscript and status changes that was needed by bonusautoscript and is no longer in use. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13915 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 88304940b..89e1b3788 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1955,12 +1955,15 @@ int unit_free(struct block_list *bl, int clrtype)
case BL_PC:
{
struct map_session_data *sd = (struct map_session_data*)bl;
+
if( status_isdead(bl) )
pc_setrestartvalue(sd,2);
pc_delinvincibletimer(sd);
- pc_autoscript_clear(sd);
-
+ pc_delautobonus(sd,sd->autobonus,ARRAYLENGTH(sd->autobonus),false);
+ pc_delautobonus(sd,sd->autobonus2,ARRAYLENGTH(sd->autobonus),false);
+ pc_delautobonus(sd,sd->autobonus3,ARRAYLENGTH(sd->autobonus),false);
+
if( sd->followtimer != -1 )
pc_stop_following(sd);