summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-11-03 01:39:45 +0000
committerL0ne_W0lf <L0ne_W0lf@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-11-03 01:39:45 +0000
commita9763770c28c1e79cc43a0a43b46745ea3090940 (patch)
tree59279fec5b69e1c9f91952f8fc9cf68a6dd16085 /src/map/unit.c
parent4f7099544a0846d270eaf131ce25b61d9880ba8e (diff)
downloadhercules-a9763770c28c1e79cc43a0a43b46745ea3090940.tar.gz
hercules-a9763770c28c1e79cc43a0a43b46745ea3090940.tar.bz2
hercules-a9763770c28c1e79cc43a0a43b46745ea3090940.tar.xz
hercules-a9763770c28c1e79cc43a0a43b46745ea3090940.zip
* Added battle_config.mob_slave_keep_target config option (monster.conf)
- When yes (default) MVP slaves will always keep their prior targets. - When no the old behavior of switching to the closest target is enabled. * Updated MAX_MOB_DB to 4000 (Monsters are starting to appear in the 2k ranges) * Changed default respawn time (when 0) to 500 from 5000. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14119 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 56969f1db..d828832c6 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1874,7 +1874,10 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
case BL_MOB:
{
struct mob_data *md = (struct mob_data*)bl;
- md->target_id=0;
+ // Drop previous target mob_slave_keep_target: no.
+ if (!battle_config.mob_slave_keep_target)
+ md->target_id=0;
+
md->attacked_id=0;
md->state.skillstate= MSS_IDLE;