Jump to content

stein20

Member
  • Posts

    95
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by stein20

  1. search in PythonItemMoudle.cpp

     

    PyObject * itemSelectItem(PyObject * poSelf, PyObject * poArgs)
    {


        int iIndex;
        if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
            return Py_BadArgument();

        if (!CItemManager::Instance().SelectItemData(iIndex))
        {
            TraceError("Cannot find item by %d", iIndex);
            CItemManager::Instance().SelectItemData(60001);
        }

        return Py_BuildNone();
    }

     

    change for:

     

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

        if (!CItemManager::Instance().SelectItemData(iIndex))
        {
            //TraceError("Cannot find item by %d", iIndex);
            CItemManager::Instance().SelectItemData(60001);
        }

        return Py_BuildNone();
    }


    not fix.

    but does not show the error xD

     

    maybe thx ok not ? xD

    • Love 1
  2. hello

    the version is not complete:

    fix:

    Open:  PythonShop.cpp

    Search:

    PyObject * shopBuildPrivateShop(PyObject * poSelf, PyObject * poArgs)
    {
        char * szName;
        if (!PyTuple_GetString(poArgs, 0, &szName))
            return Py_BuildException();

        CPythonShop::Instance().BuildPrivateShop(szName);
        return Py_BuildNone();
    }

    paste under:

    PyObject * shopIsOfflineShop(PyObject * poSelf, PyObject * poArgs)
    {
        CPythonShop & rkShop = CPythonShop::Instance();
        return Py_BuildValue("i", rkShop.IsOfflineShop());
    }

    PyObject * shopGetOfflineShopItemID(PyObject * poSelf, PyObject * poArgs)
    {
        int nPos;
        if (!PyTuple_GetInteger(poArgs, 0, &nPos))
            return Py_BuildException();

        const TShopItemData * c_pItemData;
        if (CPythonShop::Instance().GetOfflineShopItemData(nPos, &c_pItemData))
            return Py_BuildValue("i", c_pItemData->vnum);

        return Py_BuildValue("i", 0);
    }

    PyObject * shopGetOfflineShopItemCount(PyObject * poSelf, PyObject * poArgs)
    {
        int iIndex;
        if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
            return Py_BuildException();

        const TShopItemData * c_pItemData;
        if (CPythonShop::Instance().GetOfflineShopItemData(iIndex, &c_pItemData))
            return Py_BuildValue("i", c_pItemData->count);

        return Py_BuildValue("i", 0);
    }

    PyObject * shopGetOfflineShopItemPrice(PyObject * poSelf, PyObject * poArgs)
    {
        int iIndex;
        if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
            return Py_BuildException();

        const TShopItemData * c_pItemData;
        if (CPythonShop::Instance().GetOfflineShopItemData(iIndex, &c_pItemData))
            return Py_BuildValue("i", c_pItemData->price);

        return Py_BuildValue("i", 0);
    }

    PyObject * shopGetOfflineShopItemMetinSocket(PyObject * poSelf, PyObject * poArgs)
    {
        int iIndex;
        if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
            return Py_BuildException();
        int iMetinSocketIndex;
        if (!PyTuple_GetInteger(poArgs, 1, &iMetinSocketIndex))
            return Py_BuildException();

        const TShopItemData * c_pItemData;
        if (CPythonShop::Instance().GetOfflineShopItemData(iIndex, &c_pItemData))
            return Py_BuildValue("i", c_pItemData->alSockets[iMetinSocketIndex]);

        return Py_BuildValue("i", 0);
    }

    PyObject * shopGetOfflineShopItemAttribute(PyObject * poSelf, PyObject * poArgs)
    {
        int iIndex;
        if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
            return Py_BuildException();
        int iAttrSlotIndex;
        if (!PyTuple_GetInteger(poArgs, 1, &iAttrSlotIndex))
            return Py_BuildException();

        if (iAttrSlotIndex >= 0 && iAttrSlotIndex < ITEM_ATTRIBUTE_SLOT_MAX_NUM)
        {
            const TShopItemData * c_pItemData;
            if (CPythonShop::Instance().GetOfflineShopItemData(iIndex, &c_pItemData))
                return Py_BuildValue("ii", c_pItemData->aAttr[iAttrSlotIndex].bType, c_pItemData->aAttr[iAttrSlotIndex].sValue);
        }

        return Py_BuildValue("ii", 0, 0);
    }

    PyObject * shopClearOfflineShopStock(PyObject * poSelf, PyObject * poArgs)
    {
        CPythonShop::Instance().ClearOfflineShopStock();
        return Py_BuildNone();
    }
    PyObject * shopAddOfflineShopItemStock(PyObject * poSelf, PyObject * poArgs)
    {
        BYTE bItemWindowType;
        if (!PyTuple_GetInteger(poArgs, 0, &bItemWindowType))
            return Py_BuildException();
        WORD wItemSlotIndex;
        if (!PyTuple_GetInteger(poArgs, 1, &wItemSlotIndex))
            return Py_BuildException();
        int iDisplaySlotIndex;
        if (!PyTuple_GetInteger(poArgs, 2, &iDisplaySlotIndex))
            return Py_BuildException();
        int iPrice;
        if (!PyTuple_GetInteger(poArgs, 3, &iPrice))
            return Py_BuildException();

        CPythonShop::Instance().AddOfflineShopItemStock(TItemPos(bItemWindowType, wItemSlotIndex), iDisplaySlotIndex, iPrice);
        return Py_BuildNone();
    }
    PyObject * shopDelOfflineShopItemStock(PyObject * poSelf, PyObject * poArgs)
    {
        BYTE bItemWindowType;
        if (!PyTuple_GetInteger(poArgs, 0, &bItemWindowType))
            return Py_BuildException();
        WORD wItemSlotIndex;
        if (!PyTuple_GetInteger(poArgs, 1, &wItemSlotIndex))
            return Py_BuildException();

        CPythonShop::Instance().DelOfflineShopItemStock(TItemPos(bItemWindowType, wItemSlotIndex));
        return Py_BuildNone();
    }
    PyObject * shopGetOfflineShopItemPrice2(PyObject * poSelf, PyObject * poArgs)
    {
        BYTE bItemWindowType;
        if (!PyTuple_GetInteger(poArgs, 0, &bItemWindowType))
            return Py_BuildException();
        WORD wItemSlotIndex;
        if (!PyTuple_GetInteger(poArgs, 1, &wItemSlotIndex))
            return Py_BuildException();

        int iValue = CPythonShop::Instance().GetOfflineShopItemPrice(TItemPos(bItemWindowType, wItemSlotIndex));
        return Py_BuildValue("i", iValue);
    }
    PyObject * shopBuildOfflineShop(PyObject * poSelf, PyObject * poArgs)
    {
        char * szName;
        if (!PyTuple_GetString(poArgs, 0, &szName))
            return Py_BuildException();

        BYTE bTime;
        if (!PyTuple_GetInteger(poArgs, 1, &bTime))
            return Py_BuildException();

        CPythonShop::Instance().BuildOfflineShop(szName, bTime);
        return Py_BuildNone();
    }

     

     

     

  3. 18 hours ago, ds_aim said:

    Just add  enum from PythonPlayer.cpp to PythonPlayer.h as public

    749855117da54c7583e87475a78bc36e.png

    Then include PythonPlayer.h intro StdAfx.h if not work include directly just in that file where is needed.

    And use CPythonPlayer:: class.. above you have an example.

    0b4d03d3a3d6427aa574b91c566aea27.png

     

    This is because in new binary they moved enum from PythonPlayer.cpp to RaceData.h adn they renamed inseated of example :

    Old :

    MAIN_RACE_SHAMAN_M,

    new

    RACE_SHAMAN_M,

     

    same for wolfman.. you can  move entire enum intro RaceData class as public if you want to be accesed for all members and use CRaceData::

    I did all those some time ago.. 

     

    Intro the public source those enum is used just and just intro  DWORD CPythonPlayer::GetRaceStat()  FROM PythonPlayer.cpp  they moved enums and renmed to give another scope ..  

     

    Make it like this :

    RaceData.h

    79a67b0e7ed641b5a644f7ede43c610f.png

    PythonPlayer.cpp

    3d9b46b156f442d9b6d097e0cea3e412.png

    ActorInstance.cpp

    f5f419cbaad344acac40ab6a70867171.png

    but here there lican. xD

  4. Hello dev's

    I have a problem with my server.

    I would like to have information for potential problems.

    make video.

     

    syslog.txt server

     

    Aug 11 21:49:04 :: success to 192.168.1.60:13003
    Aug 11 21:49:04 :: success to 192.168.1.60:13002
    Aug 11 21:49:04 :: InputDB::login_success: betatest1
    Aug 11 21:49:04 :: SYSTEM: new connection from [192.168.1.2] fd: 21 handshake 2510938598 output input_len 0, ptr 0x29a86c00
    Aug 11 21:49:05 :: MARK_SERVER: Login
    Aug 11 21:49:05 :: LargePacket Size 148
    Aug 11 21:49:05 :: MARK_SERVER: GuildMarkIDXList 155 bytes sent.
    Aug 11 21:49:05 :: MARK_SERVER: Sending blocks. (imgIdx 0 diff 0 size 10)
    Aug 11 21:49:05 :: SYSTEM: closing socket. DESC #21
    Aug 11 21:49:11 :: SYSTEM: closing socket. DESC #20
    Aug 11 21:49:13 :: SYSTEM: new connection from [192.168.1.2] fd: 20 handshake 1060694070 output input_len 0, ptr 0x29a86800
    Aug 11 21:49:13 :: SYSTEM: closing socket. DESC #20
    Aug 11 21:49:20 :: GLOBAL_TIME: Aug 11 21:49:20 time_gap 0

  5. hey man. here fix:D

     

    Group    mounts
    {
        Vnum 10030
        1    71114    1    1
        2    71116    1    1
        3    71118    1    1
        4    71120    1    1
        5    71121    1    1
        6    71124    1    1
        7    71125    1    1
        8    71126    1    1
        9    71127    1    1
        10    71128    1    1
        11    71171    1    1
        12    71172    1    1    
        13    71125    1    1
    }

     

    add in special_item_group.txt

     

     

    • Love 2
×
×
  • 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.