Jump to content

ENABLE_FIX_QUICK_SLOT


Recommended Posts

looking for working fix, rn i have sth like this and its not working

void CInputMain::QuickslotAdd(LPCHARACTER ch, const char * data)
{
    struct command_quickslot_add * pinfo = (struct command_quickslot_add *) data;
#ifdef ENABLE_FIX_QUICK_SLOT   
    if(pinfo->slot.type == QUICKSLOT_TYPE_ITEM)
    {
        LPITEM item = NULL;
        
        TItemPos srcCell(INVENTORY, pinfo->slot.pos);
        
        if (!(item = ch->GetItem(srcCell)))
            return;
        
        if (item->GetType() != ITEM_USE && item->GetType() != ITEM_QUEST)
            return;
    }
#endif
    
    ch->SetQuickslot(pinfo->pos, pinfo->slot);
}

Link to comment
Share on other sites

  • Bronze
17 hours ago, Fakis said:

 i have

Remove #define ENABLE_FIX_QUICK_SLOT   from service.h

 

change 

#ifdef ENABLE_FIX_QUICK_SLOT   
    if(pinfo->slot.type == QUICKSLOT_TYPE_ITEM)
    {
        LPITEM item = NULL;
        
        TItemPos srcCell(INVENTORY, pinfo->slot.pos);
        
        if (!(item = ch->GetItem(srcCell)))
            return;
        
        if (item->GetType() != ITEM_USE && item->GetType() != ITEM_QUEST)
            return;
    }
#endif

 

with:

 

#ifndef ENABLE_FIX_QUICK_SLOT   
    if(pinfo->slot.type == QUICKSLOT_TYPE_ITEM)
    {
        LPITEM item = NULL;
        
        TItemPos srcCell(INVENTORY, pinfo->slot.pos);
        
        if (!(item = ch->GetItem(srcCell)))
            return;
        
        if (item->GetType() != ITEM_USE && item->GetType() != ITEM_QUEST)
            return;
    }
#endif

 

  • Not Good 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.