Istny's post in Level in trade was marked as the answer
In InstanceBase.cpp add
const char * CInstanceBase::GetLevelString()
{
char * str = new char[3];
sprintf(str,"%d",m_dwLevel);
return str;
}
in InstanceBase.h add
const char * GetLevelString();
Next in PythonNetworkStreamPhaseGame.cpp add in "if (pCharacterInstance){}"
CPythonExchange::Instance().SetTargetLevel(pCharacterInstance->GetLevelString());
Open PythonExchange.cpp and add
void CPythonExchange::SetTargetLevel(const char *name)
{
strncpy(m_victim.level, name, 3);
}
char * CPythonExchange::GetLevelFromTarget()
{
return m_victim.level;
}
In PythonExchange.h inside "typedef struct trade{}" add
char level[3];
elsewhere in PythonExchange.h add too
void SetTargetLevel(const char *name);
char *GetLevelFromTarget();
In PythonExchangeModule.cpp add inside "static PyMethodDef s_methods[] = {}"
{"GetLevelFromTarget", exchangeGetLevelFromTarget, METH_VARARGS},
elsewhere in this file add to
PyObject * exchangeGetLevelFromTarget(PyObject * poTarget, PyObject * poArgs)
{
return Py_BuildValue("s", CPythonExchange::Instance().GetLevelFromTarget());
}
Finally in python you can use
exchange.GetLevelFromTarget()