farkmt2official 1
farkmt2official
Mt2Hizmet 1
Mt2Hizmet
Bvural41 1
Bvural41
berzahx 1
berzahx
mavzermete 1
mavzermete
Hikaye Ekle

Cevaplanmadı Chest Item Info

  • Konuyu başlatan Konuyu başlatan qay123
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 4
  • Görüntüleme Görüntüleme 856

Ayyıldız2 | 2008 TR Yapısı • 1-99 Orta Emek Destan • Oto Avsız • 10 Temmuz 21:00 HEMEN TIKLA!

Hello, please i have problem with Chest Item Info
No chest shows me in the description: show drop - ctrl+left click. It shows me only on the item that is linked to the Lucky_box system.

Used Chest Item Info system: https://forum.turkmmo.com/konu/3819088-chest-item-info/
Kod:
        if app.ENABLE_CHEST_DROP_INFO:
            if app.IsPressed(app.DIK_LCONTROL):
                isMain = not app.IsPressed(app.DIK_LSHIFT)
                if item.HasDropInfo(ItemVNum, isMain) and self.interface:
                    self.interface.OpenChestDropWindow(ItemVNum, isMain)
                return

Kod:
#if defined(ENABLE_CHEST_DROP_INFO)
PyObject* itemHasDropInfo(PyObject* poSelf, PyObject* poArgs)
{
    int iItemIndex;
    if (!PyTuple_GetInteger(poArgs, 0, &iItemIndex))
        return Py_BadArgument();

    bool bMain;
    if (!PyTuple_GetBoolean(poArgs, 1, &bMain))
        return Py_BadArgument();

    CItemManager::TChestDropItemInfoVec* vDropInfo = nullptr;
    
    if (bMain)
        vDropInfo = CItemManager::Instance().GetItemDropInfoVec(iItemIndex);
    else
        vDropInfo = CItemManager::Instance().GetBaseItemDropInfoVec(iItemIndex);

    return Py_BuildValue("b", (vDropInfo && !vDropInfo->empty()));
}

static int __CreateDropPage(CItemManager::TChestDropItemInfoVec* vDropInfo, PyObject* poList)
{
    int iPageCount(0);
    CGrid grid(5, 8);
    
    if (vDropInfo && !vDropInfo->empty())
    {
        for (CItemManager::TChestDropItemInfoVec::const_iterator it = vDropInfo->begin(); it != vDropInfo->end(); ++it)
        {
            const CItemManager::SDropItemInfo& dwDropInfo = *it;

            CItemData* pItemData;
            if (!CItemManager::Instance().GetItemDataPointer(dwDropInfo.dwDropVnum, &pItemData))
                continue;

            const BYTE bItemSize = pItemData->GetSize();

            while (true)
            {
                const int iPos = grid.FindBlank(1, bItemSize);

                if (iPos >= 0)
                {
                    grid.Put(iPos, 1, bItemSize);
                    PyList_Append(poList, Py_BuildValue("iiii", iPageCount, iPos, dwDropInfo.dwDropVnum, dwDropInfo.iCount));
                    break;
                }
                else
                {
                    grid.Clear();
                    ++iPageCount;
                }
            }
        }
    }

    return iPageCount;
}

PyObject* itemGetDropInfo(PyObject* poSelf, PyObject* poArgs)
{
    int iItemIndex;
    if (!PyTuple_GetInteger(poArgs, 0, &iItemIndex))
        return Py_BadArgument();

    bool bMain;
    if (!PyTuple_GetBoolean(poArgs, 1, &bMain))
        return Py_BadArgument();

    PyObject* poList = PyList_New(0);
    CItemManager::TChestDropItemInfoVec* vDropInfo = nullptr;

    if (bMain)
        vDropInfo = CItemManager::Instance().GetItemDropInfoVec(iItemIndex);
    else
        vDropInfo = CItemManager::Instance().GetBaseItemDropInfoVec(iItemIndex);

    return Py_BuildValue("iO", __CreateDropPage(vDropInfo, poList), poList);
}
#endif

Does anyone know how to fix it?
Thanks for help.
 
Son düzenleme:
[CODE title="syserr"]0226 20:14:43899 :: Traceback (most recent call last):

0226 20:14:43899 :: File "ui.py", line 1824, in OnUnselectItemSlot

0226 20:14:43899 :: File "ui.py", line 87, in __call__

0226 20:14:43899 :: File "ui.py", line 78, in __call__

0226 20:14:43899 :: File "uiInventory.py", line 764, in UseItemSlot

0226 20:14:43900 :: File "uiInventory.py", line 784, in __UseItem

0226 20:14:43900 :: AttributeError
0226 20:14:43900 :: :
0226 20:14:43900 :: 'module' object has no attribute 'GetItemTypeBySlot'
0226 20:14:43900 :: [/CODE]
 

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Geri
Üst