Jump to content

Question about GetName in char.cpp by vnum (GetName(189) for example)


Recommended Posts

Hey guys, is it possible to return the name from a item in char.cpp by vnum? For example.

 

LC_TEXT("%s was added to your Inventory", GetName(189));

 

Here is my function :)

 

const char* CHARACTER::GetName() const
{
	BYTE bLocale = GetDesc() ? GetDesc()->GetLanguage() : LOCALE_YMIR;
	return m_stName.empty() ? (m_pkMobData ? LC_LOCALE_MOB_TEXT(GetRaceNum(), bLocale) : "") : m_stName.c_str();
}

 

  • Bot
TItemTable* pTable = ITEM_MANAGER::instance().GetTable(189);
if (pTable)
	ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s was added to your Inventory"), pTable->szLocaleName);

probably something like this

  • Love 1

english_banner.gif

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.