Jelajahi Sumber

* Fixed homunculus_autoloot not working with skill/item granted drops and loot (bugreport:4452, since r12203).

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14589 54d463be-8e91-2dee-dedb-b68131a5f0ec
ai4rei 14 tahun lalu
induk
melakukan
63d3ed791c
2 mengubah file dengan 6 tambahan dan 5 penghapusan
  1. 2 1
      Changelog-Trunk.txt
  2. 4 4
      src/map/mob.c

+ 2 - 1
Changelog-Trunk.txt

@@ -1,7 +1,8 @@
 Date	Added
 
 2010/12/12
-	* Fixed killed monsters were assumed to be killed by homunculus only, if no damage log entries were elligible for exp distribution, even when no homunculus took part in damage dealing (bugreport:4452, since r12203).
+	* Fixed homunculus_autoloot not working with skill/item granted drops and loot (bugreport:4452, since r12203). [Ai4rei]
+	* Fixed killed monsters were assumed to be killed by homunculus only, if no damage log entries were elligible for exp distribution, even when no homunculus took part in damage dealing (bugreport:4452, since r12203). [Ai4rei]
 	* Added enumeration for monster damage log field 'flag'. [Ai4rei]
 	* Removed disabled backup of script command 'isequipped' (since r1605). [Ai4rei]
 	* Made script engine's DEBUG_DISASM block use script_op2name, rather than hardcoding operator names as per TODO from r13083 (related r9569, follow up to r10667). [Ai4rei]

+ 4 - 4
src/map/mob.c

@@ -2253,7 +2253,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		// Ore Discovery [Celest]
 		if (sd == mvp_sd && pc_checkskill(sd,BS_FINDINGORE)>0 && battle_config.finding_ore_rate/10 >= rand()%10000) {
 			ditem = mob_setdropitem(itemdb_searchrandomid(IG_FINDINGORE), 1);
-			mob_item_drop(md, dlist, ditem, 0, battle_config.finding_ore_rate/10, 0);
+			mob_item_drop(md, dlist, ditem, 0, battle_config.finding_ore_rate/10, homkillonly);
 		}
 
 		if(sd) {
@@ -2279,7 +2279,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 					if (rand()%10000 >= drop_rate)
 						continue;
 					itemid = (sd->add_drop[i].id > 0) ? sd->add_drop[i].id : itemdb_searchrandomid(sd->add_drop[i].group);
-					mob_item_drop(md, dlist, mob_setdropitem(itemid,1), 0, drop_rate, 0);
+					mob_item_drop(md, dlist, mob_setdropitem(itemid,1), 0, drop_rate, homkillonly);
 				}
 			}
 			
@@ -2295,7 +2295,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		// process items looted by the mob
 		if(md->lootitem) {
 			for(i = 0; i < md->lootitem_count; i++)
-				mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, 0);
+				mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, homkillonly);
 		}
 		if (dlist->item) //There are drop items.
 			add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr)dlist);
@@ -2311,7 +2311,7 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type)
 		dlist->third_charid = (third_sd ? third_sd->status.char_id : 0);
 		dlist->item = NULL;
 		for(i = 0; i < md->lootitem_count; i++)
-			mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, 0);
+			mob_item_drop(md, dlist, mob_setlootitem(&md->lootitem[i]), 1, 10000, homkillonly);
 		add_timer(tick + (!battle_config.delay_battle_damage?500:0), mob_delay_item_drop, 0, (intptr)dlist);
 	}