Blocks Items/Polymorph on Guild War C++

04/11/2018 19:32 Agorin#1
Hi guys, how can i block items like potions and poly on guild map? I want solutions only in c++, andy ideas?
04/12/2018 09:35 DevBlade#2
In File char_item.cpp:

Search static bool IS_SUMMON_ITEM(int vnum)

Paste under that function:

Code:
static bool IS_ENABLE_ITEM(int vnum)
{
    switch (vnum)
    {
        case 39011:
        case 39012:
        case 39013:
            return true;
    }

    return false;
}

Search bool IS_BOTARYABLE_ZONE(int nMapIndex)

Paste under that function:

Code:
bool IS_ENABLE_ITEM_ZONE(int map_index)
{
    switch (map_index)
    {
        case 29:
        case 30:
        case 31:
            return false;
    }

    return true;
}
Search //PREVENT_TRADE_WINDOW

Paste above that function:

Code:
if (IS_ENABLE_ITEM(item->GetVnum()))
    {
        if (false == IS_ENABLE_ITEM_ZONE(GetMapIndex()))
        {
            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can not use this item here."));
            return false;
        }
    }