void clif_parse_TakeItem(int fd, struct map_session_data *sd) {
struct flooritem_data *fitem;
int map_object_id;
map_object_id = RFIFOL(fd,packet_db[RFIFOW(fd,0)].pos[0]);
fitem = (struct flooritem_data*)map->id2bl(map_object_id);
do {
if (pc_isdead(sd)) {
clif->clearunit_area(&sd->bl, CLR_DEAD);
break;
}
if (fitem == NULL || fitem->bl.type != BL_ITEM || fitem->bl.m != sd->bl.m)
break;
if( sd->sc.count && (
sd->sc.data[SC_HIDING] ||
sd->sc.data[SC_CLOAKING] ||
sd->sc.data[SC_TRICKDEAD] ||
sd->sc.data[SC_BLADESTOP] ||
sd->sc.data[SC_CLOAKINGEXCEED] ||
(sd->sc.data[SC_NOCHAT] &&sd->sc.data[SC_NOCHAT]->val1&MANNER_NOITEM)
) )
break;
if (pc_cant_act(sd))
break;
/*if (battle_config.arealoot && sd->state.arealoot)*/
map->foreachinrange(skill->greed, &fitem->bl, 1, BL_ITEM, &sd->bl);
/*else if(!pc->takeitem(sd, fitem))
break;*/
return;
} while (0);
// Client REQUIRES a fail packet or you can no longer pick items.
clif->additem(sd,0,0,6);
}