Przeglądaj źródła

* 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://svn.code.sf.net/p/rathena/svn/trunk@14119 54d463be-8e91-2dee-dedb-b68131a5f0ec

L0ne_W0lf 15 lat temu
rodzic
commit
8d0be03e8a
7 zmienionych plików z 17 dodań i 4 usunięć
  1. 5 0
      Changelog-Trunk.txt
  2. 3 0
      conf/battle/monster.conf
  3. 1 0
      src/map/battle.c
  4. 1 0
      src/map/battle.h
  5. 2 2
      src/map/mob.c
  6. 1 1
      src/map/mob.h
  7. 4 1
      src/map/unit.c

+ 5 - 0
Changelog-Trunk.txt

@@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 09/11/02
+	* Rev. 14119 Added battle_config.mob_slave_keep_target config option (monster.conf) [L0ne_W0lf]
+	- 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.
 	* Quick fix to char command checking gm level of the target player instead of the command user (bugreport:3255). [Inkfish]
 	* Disalbed @jump/@jumpto usage when dead. [Inkfish]
 09/11/01

+ 3 - 0
conf/battle/monster.conf

@@ -210,3 +210,6 @@ mob_npc_event_type: 1
 // If this is activated and a player is using @noks, damage from others players (KS) not in the party
 // will be reduced to 0.
 ksprotection: 0
+
+// Should MVP slaves retain their target when summoned back to their master?
+mob_slave_keep_target: yes

+ 1 - 0
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,        },

+ 1 - 0
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;

+ 2 - 2
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);

+ 1 - 1
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

+ 4 - 1
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;