I was looking at metin2client.bin about the new functions. I wanted to share one function with you. They're probably using this for new systems. So, let's do this
Open PythonPlayerModule.cpp
PyObject * playerWindowTypeToSlotType(PyObject * poSelf, PyObject * poArgs)
{
int iWindowType = 0;
if (!PyTuple_GetInteger(poArgs, 0, &iWindowType))
return Py_BuildException();
return Py_BuildValue("i", WindowTypeToSlotType(iWindowType));
}
Search this
{ "SendDragonSoulRefine", playerSendDragonSoulRefine, METH_VARARGS },
Add this
{ "WindowTypeToSlotType", playerWindowTypeToSlotType, METH_VARARGS },
Open GameType.h and search this
BYTE SlotTypeToInvenType(BYTE bSlotType);
After add this
BYTE WindowTypeToSlotType(BYTE bWindowType);
Open GameType.cpp and add this.
BYTE c_aWindowTypeToSlotType[WINDOW_TYPE_MAX] =
{
RESERVED_WINDOW, // SLOT_TYPE_NONE
SLOT_TYPE_INVENTORY, // SLOT_TYPE_INVENTORY
RESERVED_WINDOW, // SLOT_TYPE_NONE
SLOT_TYPE_SAFEBOX, // SLOT_TYPE_SAFEBOX
SLOT_TYPE_MALL, // SLOT_TYPE_MALL
SLOT_TYPE_DRAGON_SOUL_INVENTORY, // SLOT_TYPE_DRAGON_SOUL_INVENTORY
RESERVED_WINDOW, // SLOT_TYPE_NONE
RESERVED_WINDOW, // SLOT_TYPE_NONE
};
BYTE WindowTypeToSlotType(BYTE bWindowType)
{
if (bWindowType >= WINDOW_TYPE_MAX)
return RESERVED_WINDOW;
return c_aWindowTypeToSlotType[bWindowType];
}
- Jodie