Jump to content

Recommended Posts

static const std::list<UINT> affectContainer { CInstanceBase::AFFECT_INVISIBILITY
, CInstanceBase::AFFECT_POISON, CInstanceBase::AFFECT_FIRE
#ifdef ENABLE_WOLFMAN_CHARACTER
, CInstanceBase::AFFECT_BLEEDING
#endif
};

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

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

	if (std::find(affectContainer.begin(), affectContainer.end(), (UINT)uAffect) == affectContainer.end())
		return Py_BuildValue("b", false);

	auto pInstance = CPythonCharacterManager::Instance().GetInstancePtr(iVID);
	return Py_BuildValue("b", pInstance ? pInstance->IsAffect((UINT)uAffect) : false);
}

 

  • Love 2
  • Active Member

WJjMtE0.png

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
vor 2 Stunden schrieb Exygo:

WJjMtE0.png

 

I think i dont have to write what i posted on the Thread before - stop spaming.

 

 

btw still a crap server

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.