Exemplo n.º 1
0
struct shop_offer *offer_list_get_by_id(unsigned int id)
{
    if (session.wf.shop.offers == NULL)
        return NULL;

    return list_get_by(session.wf.shop.offers,
                       (void *) &id,
                       (f_list_cmp) offer_cmp_id);
}
Exemplo n.º 2
0
struct game_item *item_list_get_by_id(unsigned int id)
{
    if (session.profile.items == NULL)
        return NULL;

    return list_get_by(session.profile.items,
                       &id,
                       (f_list_cmp) item_cmp_id);
}