peterekcze
Member
- Credits
- 1
Hi guys,
i have problem with polymorph item in inventory. Dropped item have name, the same item has no name in inventory. Where there could be a problem.
SF: Ephelion2
PythonNonPlayer.cpp
Only the longer name moba is displayed correctly
thank you for help
i have problem with polymorph item in inventory. Dropped item have name, the same item has no name in inventory. Where there could be a problem.
SF: Ephelion2
PythonNonPlayer.cpp
uiToolTip.pyconst char* CPythonNonPlayer::GetMonsterName(DWORD dwVnum)
{
const CPythonNonPlayer::TMobTable* c_pTable = GetTable(dwVnum);
if (!c_pTable)
{
static const char* sc_szEmpty = "";
return sc_szEmpty;
}
#ifdef ENABLE_GLOBAL_LANGUAGE
std::string translatedName = GetNameTranslation(dwVnum);
if (translatedName != "")
{
return translatedName.c_str();
}
#endif
return c_pTable->szLocaleName;
}
def _GetItemName(self):
if localeInfo.UserLang != "en":
if str(self.itemIndex) in localeInfo.itemTrans:
return localeInfo.itemTrans[str(self.itemIndex)]
else:
return item.GetItemName()
else:
return item.GetItemName()
def __SetPolymorphItemTitle(self, monsterVnum):
itemName=nonplayer.GetMonsterName(monsterVnum)
itemName+=" "
itemName+=self._GetItemName()
self.SetTitle(itemName)
Only the longer name moba is displayed correctly
thank you for help