Jump to content

Function for Fish Event


Recommended Posts

Hey, I would like to share a small function for fish event. You can find this function in uiMiniGameFishEvent.py (The uncythonized root files) too.

Spoiler

 

Step 1:

Find this line in PythonWindowManagerModule.cpp



{ "SetAttachingFlag",			wndMgrSetAttachingFlag,								METH_VARARGS },

Then add this line



{ "SetDisableDeattach",			wndMgrSetDisableDeattach,							METH_VARARGS },

Step 2:

Find this line in PythonWindowManagerModule.cpp



PyObject * wndMgrSetAttachingFlag(PyObject * poSelf, PyObject * poArgs)
{
	BOOL bFlag;
	if (!PyTuple_GetInteger(poArgs, 0, &bFlag))
		return Py_BuildException();

	UI::CWindowManager::Instance().SetAttachingFlag(bFlag);
	return Py_BuildNone();
}

Then add this line



PyObject * wndMgrSetDisableDeattach(PyObject * poSelf, PyObject * poArgs)
{
	BOOL bFlag;
	if (!PyTuple_GetInteger(poArgs, 0, &bFlag))
		return Py_BuildException();

	UI::CWindowManager::Instance().SetDisableDeattach(bFlag);
	return Py_BuildNone();
}

 

Step 3:

Find this line in PythonWindowManager.h



void		SetAttachingFlag(BOOL bFlag);

Then add this line



void		SetDisableDeattach(BOOL bFlag);

Step 4:

Find this line in PythonWindowManager.h



			BOOL					m_bAttachingFlag;

Then add this line



			BOOL					m_disableDeattach;

Step 5:

Find this line in PythonWindowManager.cpp



m_bAttachingFlag(FALSE),

Then add this line



		m_disableDeattach(FALSE),

Step 6:

Find this line in PythonWindowManager.cpp



	void CWindowManager::SetAttachingFlag(BOOL bFlag)
	{
		m_bAttachingFlag = bFlag;
	}

Then add this line



	void CWindowManager::SetDisableDeattach(BOOL bFlag)
	{
		m_disableDeattach = bFlag;
	}

Final step:

Find void CWindowManager::DeattachIcon() in PythonWindowManager.cpp and replace with this.



	void CWindowManager::DeattachIcon()
	{
		if (!m_disableDeattach)
		{
			SetAttachingFlag(FALSE);
			if (m_poMouseHandler)
				PyCallClassMemberFunc(m_poMouseHandler, "DeattachObject", BuildEmptyTuple());
		}
	}

 

 

 

Best Regards

Ken

  • Love 6

Do not be sorry, be better.

Link to comment
Share on other sites

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.