Originally posted by [b]zephyrus_cr[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=1291
On map_quit, in the last steps:
unit_remove_map_pc(sd,3); ----> Here, the pet don't return the loot to the owner.
pc_makesavestatus(sd);
pc_clean_skilltree(sd);
chrif_save(sd,1);
unit_free_pc(sd); ---- > Here, the items are returned... but the char is allready saved in the previous step so all items in loot get lost.
The reasson is on unit_remove_map:
CODE
case BL_PET:
{
struct pet_data *pd = (struct pet_data*)bl;
if( pd->pet.intimate <= 0 && !(pd->msd && !pd->msd->state.active) )
{ //If logging out, this is deleted on unit_free
clif_clearunit_area(bl,clrtype);
map_delblock(bl);
unit_free(bl,0);
map_freeblock_unlock();
return 0;
}
state.active becomes 0 after
chrif_save(sd,1);