Browse Source

- Fixing TK Mission asigning non spawning mobs.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11485 54d463be-8e91-2dee-dedb-b68131a5f0ec
zephyrus 17 năm trước cách đây
mục cha
commit
26eba3eb7c
3 tập tin đã thay đổi với 4 bổ sung3 xóa
  1. 1 0
      Changelog-Trunk.txt
  2. 2 2
      src/map/mob.c
  3. 1 1
      src/map/skill.c

+ 1 - 0
Changelog-Trunk.txt

@@ -4,6 +4,7 @@ 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.
 
 2007/10/15
+	* Fixing TK Mission asigning non spawning mobs. [Zephyrus]
 	* Updated the item price/sell reading code to enable 'null' values. The
 	  difference between a blank value and 0 is that when the value is blank, it
 	  should automatically take half/double the other value. The previous

+ 2 - 2
src/map/mob.c

@@ -245,7 +245,7 @@ struct mob_data* mob_spawn_dataset(struct spawn_data *data)
  * &1: Apply the summon success chance found in the list (otherwise get any monster from the db)
  * &2: Apply a monster check level.
  * &4: Selected monster should not be a boss type
- * &8: Selected monster must give base exp.
+ * &8: Selected monster must have normal spawn.
  * lv: Mob level to check against
  *------------------------------------------*/
 int mob_get_random_id(int type, int flag, int lv)
@@ -268,7 +268,7 @@ int mob_get_random_id(int type, int flag, int lv)
 		(flag&1 && mob->summonper[type] <= rand() % 1000000) ||
 		(flag&2 && lv < mob->lv) ||
 		(flag&4 && mob->status.mode&MD_BOSS) ||
-		(flag&8 && mob->base_exp < 1)
+		(flag&8 && mob->spawn[0].qty < 1)
 	) && (i++) < MAX_MOB_DB);
 
 	if(i >= MAX_MOB_DB)

+ 1 - 1
src/map/skill.c

@@ -4007,7 +4007,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
 				clif_skill_fail(sd,skillid,0,0);
 				break;
 			}
-			id = mob_get_random_id(0,0xC, sd->status.base_level);
+			id = mob_get_random_id(0,0xE, sd->status.base_level);
 			if (!id) {
 				clif_skill_fail(sd,skillid,0,0);
 				break;