Просмотр исходного кода

- Fixed pc_set_hate_mob letting you place mobs on any of the three positions regardless of size :/

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8813 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 18 лет назад
Родитель
Сommit
370ab1a2da
2 измененных файлов с 4 добавлено и 0 удалено
  1. 2 0
      Changelog-Trunk.txt
  2. 2 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/09/19
+	* Fixed pc_set_hate_mob letting you place mobs on any of the three
+	  positions regardless of size [Skotlex]
 	* The double continuation error will now display both scripts that
 	  triggered it. [Skotlex]
 	* Loading the storage from the char-server will fail if player is already

+ 2 - 0
src/map/pc.c

@@ -785,6 +785,8 @@ int pc_set_hate_mob(struct map_session_data *sd, int pos, struct block_list *bl)
 		unsigned int max_hp = status_get_max_hp(bl);
 		if ((pos == 1 && max_hp < 6000) || (pos == 2 && max_hp < 20000))
 			return 0;
+		if (pos != status_get_size(bl))
+			return 0; //Wrong size
 	}
 	sd->hate_mob[pos] = class_;
 	pc_setglobalreg(sd,hate_var[pos],class_+1);