getting item name crash

07/08/2021 03:01 bimbum*#1
i was trying to make item linking , everything was going fine till that part

Code:
 CItemData* itemdata = g_CGlobalDataManager->m_itemDataMap[CurSlot->ItemInfo->ItemID];
 std::wstring ItemName = g_CTextStringManager->GetStringByNameStrID(&itemdata->m_nameStrId128)->c_str();
another fail try
Code:
 const wchar_t* ItemName = g_CTextStringManager->GetString(g_CGlobalDataManager->m_itemDataMap[CurSlot->ItemInfo->ItemID]->m_nameStrId128.c_str())->c_str();
07/08/2021 11:04 SubZero**#2
Code:
ObjectData* CGlobalDataManager::GetObjectData(unsigned int ObjID)
{
    return reinterpret_cast<ObjectData * (__thiscall*)(CGlobalDataManager*, unsigned int)>(0x0093F710)(this, ObjID);
}
07/08/2021 11:20 bimbum*#3
Quote:
Originally Posted by SubZero** View Post
Code:
ObjectData* CGlobalDataManager::GetObjectData(unsigned int ObjID)
{
    return reinterpret_cast<ObjectData * (__thiscall*)(CGlobalDataManager*, unsigned int)>(0x0093F710)(this, ObjID);
}
i fixed it but its still fishy since i just changed randomly variables types
07/09/2021 16:16 bimbum*#4
another issue
since c++ treat backslash as an escape. i gave up getting the associated icon from the client side , so i moved on and tried to get it from the server side.
i sent the server the itemid then the server responded with associated icon at this format
Code:
item\\\\xx\\\\xxx.ddj
now c++ will read it as
Code:
item\\xx\\xx.ddj
Code:
 std::n_string iconassc;
        *msg >> iconassc;
        CIFMainMenu::GlobalLinkGUI->m_custom_label10->TB_Func_13(iconassc.c_str(),0,0);
        msg->FlushRemaining();
i believe its variables types issue too
[Only registered and activated users can see links. Click Here To Register...]

edit**: thanks to vero it was a variable type issue
(objectdata -> associtemicon has to be std::string)
[Only registered and activated users can see links. Click Here To Register...]
07/09/2021 19:31 thaidu0ngpr0#5
Quote:
Originally Posted by bimbum* View Post
another issue
since c++ treat backslash as an escape. i gave up getting the associated icon from the client side , so i moved on and tried to get it from the server side.
i sent the server the itemid then the server responded with associated icon at this format
Code:
item\\\\xx\\\\xxx.ddj
now c++ will read it as
Code:
item\\xx\\xx.ddj
Code:
 std::n_string iconassc;
        *msg >> iconassc;
        CIFMainMenu::GlobalLinkGUI->m_custom_label10->TB_Func_13(iconassc.c_str(),0,0);
        msg->FlushRemaining();
i believe its variables types issue too
[Only registered and activated users can see links. Click Here To Register...]

edit**: thanks to vero it was a variable type issue
(objectdata -> associtemicon has to be std::string)
[Only registered and activated users can see links. Click Here To Register...]
in the original it was cifslotwithhelp . not cifstatic
07/09/2021 20:03 bimbum*#6
Quote:
Originally Posted by thaidu0ngpr0 View Post
in the original it was cifslotwithhelp . not cifstatic
who cares