Jump to content

Recommended Posts

90e2070665b570847700025fdb3b1ff6.png

PythonSlotWindow.h

#ifdef WJ_ENABLE_TRADABLE_ICON
	void SetCanMouseEventSlot(DWORD dwIndex);
	void SetCantMouseEventSlot(DWORD dwIndex);
	void SetUsableSlotOnTopWnd(DWORD dwIndex);
	void SetUnusableSlotOnTopWnd(DWORD dwIndex);
#endif


PythonWindowManagerModule.cpp
  
  #ifdef WJ_ENABLE_TRADABLE_ICON
PyObject* wndMgrSetCanMouseEventSlot(PyObject* poSelf, PyObject* poArgs)
{
	UI::CWindow* pWnd;
	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
		return Py_BuildException();

	int iSlotIndex;
	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
		return Py_BuildException();

	if (!pWnd->IsType(UI::CSlotWindow::Type()))
		return Py_BuildException();

	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
	pSlotWnd->SetCanMouseEventSlot(iSlotIndex);
	return Py_BuildNone();
}

PyObject* wndMgrSetCantMouseEventSlot(PyObject* poSelf, PyObject* poArgs)
{
	UI::CWindow* pWnd;
	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
		return Py_BuildException();

	int iSlotIndex;
	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
		return Py_BuildException();

	if (!pWnd->IsType(UI::CSlotWindow::Type()))
		return Py_BuildException();

	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
	pSlotWnd->SetCantMouseEventSlot(iSlotIndex);
	return Py_BuildNone();
}

PyObject* wndMgrSetUsableSlotOnTopWnd(PyObject* poSelf, PyObject* poArgs)
{
	UI::CWindow* pWnd;
	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
		return Py_BuildException();

	int iSlotIndex;
	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
		return Py_BuildException();

	if (!pWnd->IsType(UI::CSlotWindow::Type()))
		return Py_BuildException();

	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
	pSlotWnd->SetUsableSlotOnTopWnd(iSlotIndex);
	return Py_BuildNone();
}

PyObject* wndMgrSetUnusableSlotOnTopWnd(PyObject* poSelf, PyObject* poArgs)
{
	UI::CWindow* pWnd;
	if (!PyTuple_GetWindow(poArgs, 0, &pWnd))
		return Py_BuildException();

	int iSlotIndex;
	if (!PyTuple_GetInteger(poArgs, 1, &iSlotIndex))
		return Py_BuildException();

	if (!pWnd->IsType(UI::CSlotWindow::Type()))
		return Py_BuildException();

	UI::CSlotWindow* pSlotWnd = (UI::CSlotWindow*)pWnd;
	pSlotWnd->SetUnusableSlotOnTopWnd(iSlotIndex);
	return Py_BuildNone();
}
#endif

Hello i dont know this error. i try to fix it for about 2 hours but it wont go away. please help

 

kind regards

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

PythonSlotWindow.cpp

#ifdef WJ_ENABLE_TRADABLE_ICON
void CSlotWindow::SetCanMouseEventSlot(DWORD dwIndex)
{
	TSlot* pSlot;
	if (!GetSlotPointer(dwIndex, &pSlot))
		return;

	REMOVE_BIT(pSlot->dwState, SLOT_STATE_CANT_MOUSE_EVENT);
	//pSlot->dwState |= SLOT_STATE_CANT_MOUSE_EVENT;
}

void CSlotWindow::SetCantMouseEventSlot(DWORD dwIndex)
{
	TSlot* pSlot;
	if (!GetSlotPointer(dwIndex, &pSlot))
		return;

	SET_BIT(pSlot->dwState, SLOT_STATE_CANT_MOUSE_EVENT);
	//pSlot->dwState ^= SLOT_STATE_CANT_MOUSE_EVENT;
}

void CSlotWindow::SetUsableSlotOnTopWnd(DWORD dwIndex)
{
	TSlot* pSlot;
	if (!GetSlotPointer(dwIndex, &pSlot))
		return;

	REMOVE_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
	//pSlot->dwState |= SLOT_STATE_UNUSABLE;
}

void CSlotWindow::SetUnusableSlotOnTopWnd(DWORD dwIndex)
{
	TSlot* pSlot;
	if (!GetSlotPointer(dwIndex, &pSlot))
		return;

	SET_BIT(pSlot->dwState, SLOT_STATE_UNUSABLE);
	//pSlot->dwState ^= SLOT_STATE_UNUSABLE;
}
#endif

Forgot this. i´m dumb.

 

But for those who are dumb too ;)

 

kind regards

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.