summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/mob.c4
-rw-r--r--src/map/mob.h2
-rw-r--r--src/map/unit.c5
5 files changed, 9 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index e1ee7afa9..adf87c367 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3835,6 +3835,7 @@ static const struct _battle_data {
{ "skill_add_heal_rate", &battle_config.skill_add_heal_rate, 7, 0, INT_MAX, },
{ "eq_single_target_reflectable", &battle_config.eq_single_target_reflectable, 1, 0, 1, },
{ "invincible.nodamage", &battle_config.invincible_nodamage, 0, 0, 1, },
+ { "mob_slave_keep_target", &battle_config.mob_slave_keep_target, 0, 0, 1, },
// BattleGround Settings
{ "bg_update_interval", &battle_config.bg_update_interval, 1000, 100, INT_MAX, },
{ "bg_short_attack_damage_rate", &battle_config.bg_short_damage_rate, 80, 0, INT_MAX, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 06897e891..17e80c408 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -468,6 +468,7 @@ extern struct Battle_Config
int skill_add_heal_rate; //skills that bHealPower has effect on [Inkfish]
int eq_single_target_reflectable;
int invincible_nodamage;
+ int mob_slave_keep_target;
// [BattleGround Settings]
int bg_update_interval;
diff --git a/src/map/mob.c b/src/map/mob.c
index f0741a2cf..95f6964a7 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -792,8 +792,8 @@ int mob_setdelayspawn(struct mob_data *md)
if (md->spawn->delay2) //random variance
spawntime+= rand()%md->spawn->delay2;
- if (spawntime < 5000) //Min respawn time (is it needed?)
- spawntime = 5000;
+ if (spawntime < 500) //Min respawn time (is it needed?)
+ spawntime = 500;
if( md->spawn_timer != INVALID_TIMER )
delete_timer(md->spawn_timer, mob_delayspawn);
diff --git a/src/map/mob.h b/src/map/mob.h
index 360c69e06..235e93756 100644
--- a/src/map/mob.h
+++ b/src/map/mob.h
@@ -17,7 +17,7 @@
// Change this to increase the table size in your mob_db to accomodate a larger mob database.
// Be sure to note that IDs 4001 to 4048 are reserved for advanced/baby/expanded classes.
// Notice that the last 1000 entries are used for player clones, so always set this to desired value +1000
-#define MAX_MOB_DB 3000
+#define MAX_MOB_DB 4000
//The number of drops all mobs have and the max drop-slot that the steal skill will attempt to steal from.
#define MAX_MOB_DROP 10
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;