Преглед изворни кода

- Updated mob_ai so that mobs will use their rude-attacked skill when they can't reach their current target.
- Fixed the default txt config making pets be saved to the homun file instead of to the pet file.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8316 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex пре 19 година
родитељ
комит
7cd73fc68b
3 измењених фајлова са 9 додато и 4 уклоњено
  1. 4 0
      Changelog-Trunk.txt
  2. 2 2
      conf-tmpl/inter_athena.conf
  3. 3 2
      src/map/mob.c

+ 4 - 0
Changelog-Trunk.txt

@@ -4,6 +4,10 @@ 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.
 
 2006/08/16
+	* Updated mob_ai so that mobs will use their rude-attacked skill when they
+	  can't reach their current target. [Skotlex]
+	* Fixed the default txt config making pets be saved to the homun file
+	  instead of to the pet file. [Skotlex]
 	* Now arrow-consuming skills where your main weapon is a whip or musical
 	  instrument WILL count as arrow-type attacks, using the atk of the arrow and
 	  all related bonuses. [Skotlex]

+ 2 - 2
conf-tmpl/inter_athena.conf

@@ -14,8 +14,8 @@ guild_txt: save/guild.txt
 // Pet flatfile database, for pet names, and other pet info.
 pet_txt: save/pet.txt
 
-// Pet flatfile database, for homunculus information.
-pet_txt: save/homun.txt
+// Homunculus flatfile database, for homunculus information.
+homun_txt: save/homun.txt
 
 // Castle flatfile database, for emperium war castles, etc.
 castle_txt: save/castle.txt

+ 3 - 2
src/map/mob.c

@@ -1094,8 +1094,9 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
 	{
 		if (md->attacked_id == md->target_id)
 		{
-			if (!can_move && (battle_config.mob_ai&2) &&
-				!battle_check_range(&md->bl, tbl, md->status.rhw.range))
+			if (!battle_check_range(&md->bl, tbl, md->status.rhw.range) &&
+				((!can_move && battle_config.mob_ai&2) ||
+				(!mob_can_reach(md, tbl, dist+2, MSS_RUSH))))
 			{	//Rude-attacked (avoid triggering due to can-walk delay).
 				if (DIFF_TICK(tick, md->ud.canmove_tick) > 0 &&
 				  	md->attacked_count++ >= RUDE_ATTACKED_COUNT)