viewing paste Unknown #15852 | C

Posted on the | Last edited on
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
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);
}
Viewed 559 times, submitted by Guest.