浏览代码

* [Fixed]
- Pets attacking even master is dead

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

Lance 19 年之前
父节点
当前提交
21a6d3fad7
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 2 0
      Changelog-Trunk.txt
  2. 4 0
      src/map/pc.c

+ 2 - 0
Changelog-Trunk.txt

@@ -4,6 +4,8 @@ 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/30
+	* [Fixed]:
+	  - Pets attacking even master is dead. [Lance]
 	* Fixed battle_calc_weapon_attack damage capping damage to a minimum of 0
 	  (negative values should be allowed when attack is absorbed by target's
 	  element) [Skotlex]

+ 4 - 0
src/map/pc.c

@@ -4445,6 +4445,10 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
 		if(sd->pet.intimate < 0)
 			sd->pet.intimate = 0;
 		clif_send_petdata(sd,1,sd->pet.intimate);
+		if(sd->pd->target_id){ // Unlock all targets...
+			unit_unattackable(&sd->pd->bl);
+			sd->pd->target_id = 0;
+		}
 	}
 
 	// Leave duel if you die [LuzZza]