Jump to content
  • 0

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



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();


Link to post

2 answers to this question

Recommended Posts

  • 0
  • 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
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.