PyObject * questGetQuestData(PyObject * poSelf, PyObject * poArgs)
{
int iIndex;
if (!PyTuple_GetInteger(poArgs, 0, &iIndex))
return Py_BadArgument();
CPythonQuest::SQuestInstance * pQuestInstance;
if (!CPythonQuest::Instance().GetQuestInstancePtr(iIndex, &pQuestInstance))
return Py_BuildException("Failed to find quest by index %d", iIndex);
CGraphicImage * pImage = NULL;
if (!pQuestInstance->strIconFileName.empty())
{
std::string strIconFileName;
strIconFileName = "d:/ymir work/ui/game/quest/questicon/";
strIconFileName += pQuestInstance->strIconFileName.c_str();
pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer(strIconFileName.c_str());
}
else
{
{
std::string strIconFileName = "season1/icon/scroll_open.tga"; // görev iconu <<<<<<
pImage = (CGraphicImage *)CResourceManager::Instance().GetResourcePointer(strIconFileName.c_str());
}
}
return Py_BuildValue("sisi", pQuestInstance->strTitle.c_str(),
pImage,
pQuestInstance->strCounterName.c_str(),
pQuestInstance->iCounterValue);
}