浏览代码

- Modified mob_can_changetarget to return true always when the new target is the provoked-by character. Fixes provoke not making the mob change target when it already is locked on another player.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6633 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 年之前
父节点
当前提交
e2ba12927e
共有 2 个文件被更改,包括 10 次插入3 次删除
  1. 3 0
      Changelog-Trunk.txt
  2. 7 3
      src/map/mob.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ 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/05/17
+	* Modified mob_can_changetarget to return true always when the new target
+	  is the provoked-by character. Fixes provoke not making the mob change
+	  target when it already is locked on another player. [Skotlex]
 	* Added check to clear previous skill when combo time ends. Should fix TK
 	  Rankers being unable to initiate a combo with the same kick their previous
 	  combo was finished with. [Skotlex]

+ 7 - 3
src/map/mob.c

@@ -733,9 +733,13 @@ int mob_spawn (struct mob_data *md)
 static int mob_can_changetarget(struct mob_data* md, struct block_list* target, int mode)
 {
 	// if the monster was provoked ignore the above rule [celest]
-	if(md->state.provoke_flag && md->state.provoke_flag != target->id &&
-		!battle_config.mob_ai&4)
-		return 0;
+	if(md->state.provoke_flag)
+	{	
+		if (md->state.provoke_flag == target->id)
+			return 1;
+		else if (!battle_config.mob_ai&4)
+			return 0;
+	}
 	
 	switch (md->state.skillstate) {
 		case MSS_BERSERK: //Only Assist, Angry or Aggressive+CastSensor mobs can change target while attacking.