All pastes #988560 Raw Edit

Jemand

public text v1 · immutable
#988560 ·published 2008-04-17 18:37 UTC
rendered paste body
case 43723:
{
    if(m_caster->GetTypeId()!=TYPEID_PLAYER)
        return;

    Player* player = ((Player*)m_caster);
    if ((player->GetItemCount(31672, false, 0) >= 2) && (player->GetItemCount(31673, false, 0) >= 1))
    {
        ItemPosCountVec dest;
        uint8 msg = player->CanStoreNewItem( NULL_BAG, NULL_SLOT, dest, 43753, 1);
        if( msg != EQUIP_ERR_OK )
        {
            player->DestroyItemCount(31672, 2, true);
            player->DestroyItemCount(31673, 1, true);
            player->StoreNewItem(dest, 43753, true);
        }
        else
        {
            player->SendEquipError(EQUIP_ERR_BAG_FULL, NULL, NULL );
            return;
        }
    }
}