Issue information

Issue ID
#4065
Status
Duplicate
Severity
None
Started
Hercules Elf Bot
Feb 21, 2010 18:16
Last Post
Hercules Elf Bot
Feb 21, 2010 18:16
Confirmation
N/A

Hercules Elf Bot - Feb 21, 2010 18:16

Originally posted by [b]Format[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=4065

This is an exploit in configuration option in file conf/battle/homunc.conf

// If a monster is killed only by homunculus, can autoloot works?
homunculus_autoloot: no


If this option is set as above, everything works except this situation:
Homunculus kills looter mob ( Zenorc for example), which has already looted some items - original drops from this monster are not looted[OK], but the ones, that the mob has looted from the ground goes straight to users inventory[BUG].

Fix:
In src/map/mob.c on lines 2279-2283(latest trunk) replace
// 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);

}


with
// 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, flaghom?1:0);

}


This post has been edited by Format: Feb 21 2010, 10:19 AM