Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Loot Name & Count

Inactive
Joined
Jan 20, 2009
Messages
1,015
Reaction score
1,830
7tj95vr - Loot Name & Count - RaGEZONE Forums


Enjoy this replicated feature being sold by someone for 15 euro for absolutely free.

Item.cpp
Code:
void CItem::RenderName(LPDIRECT3DDEVICE9 pd3dDevice, CD3DFont* pFont, DWORD dwColor)
{
#ifndef __WORLDSERVER
#ifdef __NOT_WORTH_15EURO
	const ItemProp* const  iProp = GetProp();
	CItemElem* const itemElem = dynamic_cast<CItemElem*>(GetItemBase());
	std::string tempString;

	if (iProp && itemElem)
	{
		dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0;

		switch (iProp->dwReferStat1)
		{
		case WEAPON_GENERAL: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0; break;
		case WEAPON_UNIQUE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case WEAPON_ULTIMATE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName3; break;
		case ARMOR_SET: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case BARUNA_D:
		case BARUNA_C:
		case BARUNA_B:
		case BARUNA_A:
		case BARUNA_S:
			dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName4;
			break;
		default:
			break;
		}

		if (iProp->dwParts != static_cast<DWORD>(-1))
		{
			PRANDOMOPTITEM pRandomOptItem = CRandomOptItemGen::GetInstance()->GetRandomOptItem(itemElem->GetRandomOpt());
			if (pRandomOptItem)
				tempString = pRandomOptItem->pszString;
		}

		tempString += iProp->szName;
		if (itemElem->m_nItemNum > 1)
		{
			tempString += " (";
			tempString += std::to_string(itemElem->m_nItemNum);
			tempString += ")";
		}

	}
	if (tempString.empty())
		return;
#endif

	D3DXVECTOR3 vOut, vPos = GetPos(), vPosHeight;
	D3DVIEWPORT9 vp;
	const BOUND_BOX* pBB = m_pModel->GetBBVector();
	pd3dDevice->GetViewport(&vp);
	D3DXMATRIX matTrans;
	D3DXMATRIX matWorld;
	D3DXMatrixIdentity(&matWorld);
	D3DXMatrixTranslation(&matTrans, vPos.x, vPos.y, vPos.z);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matScale);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matRotation);
	D3DXMatrixMultiply(&matWorld, &matWorld, &matTrans);

	vPosHeight = pBB->m_vPos[0];
	vPosHeight.x = 0;
	vPosHeight.z = 0;
#ifdef __NOT_WORTH_15EURO
	vPosHeight.y += 0.3f;
#endif

	D3DXVec3Project(&vOut, &vPosHeight, &vp, &GetWorld()->m_matProj, &GetWorld()->m_pCamera->m_matView, &matWorld);
	vOut.x -= pFont->GetTextExtent(m_pItemBase->GetProp()->szName).cx / 2;
#ifdef __NOT_WORTH_15EURO
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0.9f, 0.9f, 0xff000000, tempString.c_str());
	pFont->DrawText(vOut.x, vOut.y, 0.9f, 0.9f, dwColor, tempString.c_str());
#else
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0xff000000, m_pItemBase->GetProp()->szName);
	pFont->DrawText(vOut.x, vOut.y, dwColor, m_pItemBase->GetProp()->szName);
#endif
	return;
#endif
}

World3D.cpp
Code:
        pObj = m_aobjCull[ i ];
        if( pObj && m_bViewName && pFont )
        {
#ifdef __NOT_WORTH_15EURO
            if (pObj->GetType() == OT_ITEM)
            {
                CItem* itemDrop = dynamic_cast<CItem*>(pObj);
                if (itemDrop)
                    itemDrop->RenderName(m_pd3dDevice, pFont);
            }
            else    
#endif
            if( pObj->GetType() == OT_MOVER )
            {
                CMover* pMover = (CMover*) pObj;

Define...
Code:
#define __NOT_WORTH_15EURO
 

Attachments

You must be registered for see attachments list
Last edited:
Initiate Mage
Joined
Mar 14, 2020
Messages
16
Reaction score
3
Good job lul :) Pretty funny and I'm interested what a genius selling it, and what's more smart ppl who paying for this useless things
 
Last edited:
Skilled Illusionist
Joined
Apr 21, 2010
Messages
378
Reaction score
96
not working actually..

Yeah.. good to know..

How about you actually post your error code's..

Your implying that the code released is not working, but maybe you did something wrong?

Edit: Ok, I was wrong (see Fenris post below). But please share error code's if something isn't working.
 
Last edited:
Initiate Mage
Joined
Jul 1, 2019
Messages
13
Reaction score
2
Yeah.. good to know..

How about you actually post your error code's..

Your implying that the code released is not working, but maybe you did something wrong?

Edit: Ok, I was wrong (see @Fenris post below). But please share error code's if something isn't working.
my bad g. I didn’t explained it more. But yeah, I don’t have any problems with the copy and paste thing but the codes isnt complete. Anyway thanks!
 
Inactive
Joined
Jan 20, 2009
Messages
1,015
Reaction score
1,830
Good job lul :) Pretty funny and I'm interested what a genius selling it, and what's more smart ppl who paying for this useless things

Florist

He forgot to share this part.

CWorld::RenderObject
-> this is close to pMover->RenderName

Code:
        pObj = m_aobjCull[ i ];
        if( pObj && m_bViewName && pFont )
        {
#ifdef __NOT_WORTH_15EURO
            if (pObj->GetType() == OT_ITEM)
            {
                CItem* itemDrop = dynamic_cast<CItem*>(pObj);
                if (itemDrop)
                    itemDrop->RenderName(m_pd3dDevice, pFont);
            }
            else    
#endif
            if( pObj->GetType() == OT_MOVER )
            {
                CMover* pMover = (CMover*) pObj;

Updated, my bad.

my bad g. I didn’t explained it more. But yeah, I don’t have any problems with the copy and paste thing but the codes isnt complete. Anyway thanks!

 
Initiate Mage
Joined
Feb 15, 2020
Messages
45
Reaction score
8
Update:

Add Show/Hide Option




Lodelight - Loot Name & Count - RaGEZONE Forums

WndOption.cpp
After:
Code:
#if __VER >= 11 // __ADD_ZOOMOPT
    CWndButton* pWndZoomLimit   = (CWndButton*)GetDlgItem( WIDC_CHECK5 );
#endif

Add:
Code:
#ifdef
    [COLOR=#666666]__NOT_WORTH_15EURO
[/COLOR]CWndButton* pWndPutDropName = (CWndButton*)GetDlgItem(WIDC_CHECK11);
#endif

After:
Code:
pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_CHECK2 );
    pWndButton[ 0 ]->SetCheck(g_Option.m_bDamageRender);

Add:
Code:
#ifdef
    [COLOR=#666666]__NOT_WORTH_15EURO
[/COLOR]pWndButton[0] = (CWndButton*)GetDlgItem(WIDC_CHECK11);
    pWndButton[0]->SetCheck(g_Option.putDropName);
#endif

After:
Code:
#if __VER >= 12 // __UPDATE_OPT
    CWndButton* pWndCamearaLock = (CWndButton*)GetDlgItem( WIDC_CHECK5 );
#endif

Add:
Code:
#ifdef
    [COLOR=#666666]__NOT_WORTH_15EURO
[/COLOR]CWndButton* pWndPutDropName = (CWndButton*)GetDlgItem(WIDC_CHECK11);
#endif

After:
Code:
case WIDC_CHECK8:
        pWndButton = (CWndButton*)GetDlgItem( WIDC_CHECK8 );
        g_Option.m_nMonName = pWndButton->GetCheck();
        break;

Add:
Code:
#ifdef
    [COLOR=#666666]__NOT_WORTH_15EURO
[/COLOR]case WIDC_CHECK11:        pWndButton = (CWndButton*)GetDlgItem(WIDC_CHECK11);
        g_Option.putDropName = pWndButton->GetCheck();
        break;
#endif

HwOption.cpp
After:
Code:
#if __VER >= 11 // __ADD_ZOOMOPT
    m_bZoomLimit = TRUE;
#endif

Add:
Code:
#ifdef [COLOR=#666666]__NOT_WORTH_15EURO[/COLOR]
    putDropName = FALSE;
#endif

After:
Code:
else if(scan.Token == _T( "VIEWMASK" ))
    {
        m_bViewMask = scan.GetNumber();
    }

Add:
Code:
#ifdef [COLOR=#666666]__NOT_WORTH_15EURO[/COLOR]
                else if(scan.Token == _T("showDropName"))
                {
                    putDropName = scan.GetNumber();
                }
#endif

After:
Code:
#if __VER >= 12 // __UPDATE_OPT
    _ftprintf(fp, _T( "VIEWMASK %d\n" ), m_bViewMask );
#endif

Add:
Code:
#ifdef [COLOR=#666666]__NOT_WORTH_15EURO[/COLOR]
    _ftprintf(fp, _T("showDropName %d\n"), putDropName);
#endif

HwOption.h
After:
Code:
#if __VER >= 11 // __ADD_ZOOMOPT
    BOOL    m_bZoomLimit;        // ÁÜ Á¦ÇÑ ¿©ºÎ
#endif

Add:
Code:
#ifdef [COLOR=#666666]__NOT_WORTH_15EURO[/COLOR]
BOOL putDropName;
#endif

World3D.cpp
Replace:
Code:
if (pObj->GetType() == OT_ITEM)
                {
                    CItem* itemDrop = dynamic_cast<CItem*>(pObj);
                    if (itemDrop)
                        itemDrop->RenderName(m_pd3dDevice, pFont);
                }
To:
Code:
#ifdef [COLOR=#666666]__NOT_WORTH_15EURO[/COLOR]
            if (g_Option.putDropName == TRUE)
            {
                if (pObj->GetType() == OT_ITEM)
                {
                    CItem* itemDrop = dynamic_cast<CItem*>(pObj);
                    if (itemDrop)
                        itemDrop->RenderName(m_pd3dDevice, pFont);
                }
            }
            else
            {
                //empty
            }
#endif

UPDATE:
Add:
Code:
WIDC_CHECK11

In:
Code:
APP_OPTEX_AV12

Using GUIEditor
Feel free to improve the coding, this is just a minimal.

Thanks Ketchup and Fenris!
 
Last edited:
Initiate Mage
Joined
Sep 2, 2008
Messages
27
Reaction score
2
Error C2664 "HRESULT CD3DFont :: DrawTextA (FLOAT, FLOAT, FLOAT, FLOAT, DWORD, CEditString &, int, int, int, DWORD)": Conversion of argument 4 from "float" to "const char *" not possible Neuz C : \ FlyffServerNeu \ K18 \ Source \ Source \ _Common \ Item.cpp 665


Error C2065 "tempString": undeclared identifier Neuz C: \ FlyffServerNeu \ K18 \ Source \ Source \ _Common \ Item.cpp 666

i've get this 2 errors when trying to import the system, the World3D.cpp part works fine, just having problems with Item.cpp, im sure i did everything right, i use the v18 Ketchup Files.
 
Initiate Mage
Joined
Feb 15, 2020
Messages
45
Reaction score
8
Error C2664 "HRESULT CD3DFont :: DrawTextA (FLOAT, FLOAT, FLOAT, FLOAT, DWORD, CEditString &, int, int, int, DWORD)": Conversion of argument 4 from "float" to "const char *" not possible Neuz C : \ FlyffServerNeu \ K18 \ Source \ Source \ _Common \ Item.cpp 665


Error C2065 "tempString": undeclared identifier Neuz C: \ FlyffServerNeu \ K18 \ Source \ Source \ _Common \ Item.cpp 666

i've get this 2 errors when trying to import the system, the World3D.cpp part works fine, just having problems with Item.cpp, im sure i did everything right, i use the v18 Ketchup Files.


You don't need to be stress adding this Loot Name Feature.

Replace the whole function:

Code:
void CItem::RenderName(LPDIRECT3DDEVICE9 pd3dDevice, CD3DFont* pFont, DWORD dwColor)

With:
Code:
void CItem::RenderName(LPDIRECT3DDEVICE9 pd3dDevice, CD3DFont* pFont, DWORD dwColor)
{
#ifndef __WORLDSERVER
#ifdef __NOT_WORTH_15EURO
	const ItemProp* const  iProp = GetProp();
	CItemElem* const itemElem = dynamic_cast<CItemElem*>(GetItemBase());
	std::string tempString;

	if (iProp && itemElem)
	{
		dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0;

		switch (iProp->dwReferStat1)
		{
		case WEAPON_GENERAL: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0; break;
		case WEAPON_UNIQUE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case WEAPON_ULTIMATE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName3; break;
		case ARMOR_SET: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case BARUNA_D:
		case BARUNA_C:
		case BARUNA_B:
		case BARUNA_A:
		case BARUNA_S:
			dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName4;
			break;
		default:
			break;
		}

		if (iProp->dwParts != static_cast<DWORD>(-1))
		{
			PRANDOMOPTITEM pRandomOptItem = CRandomOptItemGen::GetInstance()->GetRandomOptItem(itemElem->GetRandomOpt());
			if (pRandomOptItem)
				tempString = pRandomOptItem->pszString;
		}

		tempString += iProp->szName;
		if (itemElem->m_nItemNum > 1)
		{
			tempString += " (";
			tempString += std::to_string(itemElem->m_nItemNum);
			tempString += ")";
		}

	}
	if (tempString.empty())
		return;
#endif

	D3DXVECTOR3 vOut, vPos = GetPos(), vPosHeight;
	D3DVIEWPORT9 vp;
	const BOUND_BOX* pBB = m_pModel->GetBBVector();
	pd3dDevice->GetViewport(&vp);
	D3DXMATRIX matTrans;
	D3DXMATRIX matWorld;
	D3DXMatrixIdentity(&matWorld);
	D3DXMatrixTranslation(&matTrans, vPos.x, vPos.y, vPos.z);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matScale);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matRotation);
	D3DXMatrixMultiply(&matWorld, &matWorld, &matTrans);

	vPosHeight = pBB->m_vPos[0];
	vPosHeight.x = 0;
	vPosHeight.z = 0;
#ifdef __NOT_WORTH_15EURO
	vPosHeight.y += 0.3f;
#endif

	D3DXVec3Project(&vOut, &vPosHeight, &vp, &GetWorld()->m_matProj, &GetWorld()->m_pCamera->m_matView, &matWorld);
	vOut.x -= pFont->GetTextExtent(m_pItemBase->GetProp()->szName).cx / 2;
#ifndef __NOT_WORTH_15EURO
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0.9f, 0.9f, 0xff000000, tempString.c_str());
	pFont->DrawText(vOut.x, vOut.y, 0.9f, 0.9f, dwColor, tempString.c_str());
#else
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0xff000000, m_pItemBase->GetProp()->szName);
	pFont->DrawText(vOut.x, vOut.y, dwColor, m_pItemBase->GetProp()->szName);
#endif
	return;
#endif
}

I am sure that there is no other edit inside your "CItem::RenderName"
 
Initiate Mage
Joined
Sep 2, 2008
Messages
27
Reaction score
2
You don't need to be stress adding this Loot Name Feature.

Replace the whole function:

Code:
void CItem::RenderName(LPDIRECT3DDEVICE9 pd3dDevice, CD3DFont* pFont, DWORD dwColor)

With:
Code:
void CItem::RenderName(LPDIRECT3DDEVICE9 pd3dDevice, CD3DFont* pFont, DWORD dwColor)
{
#ifndef __WORLDSERVER
#ifdef __NOT_WORTH_15EURO
	const ItemProp* const  iProp = GetProp();
	CItemElem* const itemElem = dynamic_cast<CItemElem*>(GetItemBase());
	std::string tempString;

	if (iProp && itemElem)
	{
		dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0;

		switch (iProp->dwReferStat1)
		{
		case WEAPON_GENERAL: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0; break;
		case WEAPON_UNIQUE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case WEAPON_ULTIMATE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName3; break;
		case ARMOR_SET: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case BARUNA_D:
		case BARUNA_C:
		case BARUNA_B:
		case BARUNA_A:
		case BARUNA_S:
			dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName4;
			break;
		default:
			break;
		}

		if (iProp->dwParts != static_cast<DWORD>(-1))
		{
			PRANDOMOPTITEM pRandomOptItem = CRandomOptItemGen::GetInstance()->GetRandomOptItem(itemElem->GetRandomOpt());
			if (pRandomOptItem)
				tempString = pRandomOptItem->pszString;
		}

		tempString += iProp->szName;
		if (itemElem->m_nItemNum > 1)
		{
			tempString += " (";
			tempString += std::to_string(itemElem->m_nItemNum);
			tempString += ")";
		}

	}
	if (tempString.empty())
		return;
#endif

	D3DXVECTOR3 vOut, vPos = GetPos(), vPosHeight;
	D3DVIEWPORT9 vp;
	const BOUND_BOX* pBB = m_pModel->GetBBVector();
	pd3dDevice->GetViewport(&vp);
	D3DXMATRIX matTrans;
	D3DXMATRIX matWorld;
	D3DXMatrixIdentity(&matWorld);
	D3DXMatrixTranslation(&matTrans, vPos.x, vPos.y, vPos.z);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matScale);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matRotation);
	D3DXMatrixMultiply(&matWorld, &matWorld, &matTrans);

	vPosHeight = pBB->m_vPos[0];
	vPosHeight.x = 0;
	vPosHeight.z = 0;
#ifdef __NOT_WORTH_15EURO
	vPosHeight.y += 0.3f;
#endif

	D3DXVec3Project(&vOut, &vPosHeight, &vp, &GetWorld()->m_matProj, &GetWorld()->m_pCamera->m_matView, &matWorld);
	vOut.x -= pFont->GetTextExtent(m_pItemBase->GetProp()->szName).cx / 2;
#ifndef __NOT_WORTH_15EURO
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0.9f, 0.9f, 0xff000000, tempString.c_str());
	pFont->DrawText(vOut.x, vOut.y, 0.9f, 0.9f, dwColor, tempString.c_str());
#else
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0xff000000, m_pItemBase->GetProp()->szName);
	pFont->DrawText(vOut.x, vOut.y, dwColor, m_pItemBase->GetProp()->szName);
#endif
	return;
#endif
}

I am sure that there is no other edit inside your "CItem::RenderName"

i did, same error. did you changed anything from the ketchup item.cpp? i replaced the whole function and got the error from that, also replaced the function again with your function, same problem.
 
Initiate Mage
Joined
Feb 15, 2020
Messages
45
Reaction score
8
i did, same error. did you changed anything from the ketchup item.cpp? i replaced the whole function and got the error from that, also replaced the function again with your function, same problem.

Changes inside Item.cpp only inside the CItem::RenderName function.
You must have miss on something
 
Initiate Mage
Joined
Sep 2, 2008
Messages
27
Reaction score
2
post here your whole CItem::RenderName function.

put it inside the
Code:
.[/QUOTE]

[CODE]
void CItem::RenderName(LPDIRECT3DDEVICE9 pd3dDevice, CD3DFont* pFont, DWORD dwColor)
{
#ifndef __WORLDSERVER
#ifdef __NOT_WORTH_15EURO
	const ItemProp* const  iProp = GetProp();
	CItemElem* const itemElem = dynamic_cast<CItemElem*>(GetItemBase());
	std::string tempString;

	if (iProp && itemElem)
	{
		dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0;

		switch (iProp->dwReferStat1)
		{
		case WEAPON_GENERAL: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0; break;
		case WEAPON_UNIQUE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case WEAPON_ULTIMATE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName3; break;
		case ARMOR_SET: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
		case BARUNA_D:
		case BARUNA_C:
		case BARUNA_B:
		case BARUNA_A:
		case BARUNA_S:
			dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName4;
			break;
		default:
			break;
}

		if (iProp->dwParts != static_cast<DWORD>(-1))
		{
			PRANDOMOPTITEM pRandomOptItem = CRandomOptItemGen::GetInstance()->GetRandomOptItem(itemElem->GetRandomOpt());
			if (pRandomOptItem)
				tempString = pRandomOptItem->pszString;
		}

		tempString += iProp->szName;
		if (itemElem->m_nItemNum > 1)
		{
			tempString += " (";
			tempString += std::to_string(itemElem->m_nItemNum);
			tempString += ")";
		}

	}
	if (tempString.empty())
		return;
#endif

	D3DXVECTOR3 vOut, vPos = GetPos(), vPosHeight;
	D3DVIEWPORT9 vp;
	const BOUND_BOX* pBB = m_pModel->GetBBVector();
	pd3dDevice->GetViewport(&vp);
	D3DXMATRIX matTrans;
	D3DXMATRIX matWorld;
	D3DXMatrixIdentity(&matWorld);
	D3DXMatrixTranslation(&matTrans, vPos.x, vPos.y, vPos.z);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matScale);
	D3DXMatrixMultiply(&matWorld, &matWorld, &m_matRotation);
	D3DXMatrixMultiply(&matWorld, &matWorld, &matTrans);

	vPosHeight = pBB->m_vPos[0];
	vPosHeight.x = 0;
	vPosHeight.z = 0;
#ifdef __NOT_WORTH_15EURO
	vPosHeight.y += 0.3f;
#endif

	D3DXVec3Project(&vOut, &vPosHeight, &vp, &GetWorld()->m_matProj, &GetWorld()->m_pCamera->m_matView, &matWorld);
	vOut.x -= pFont->GetTextExtent(m_pItemBase->GetProp()->szName).cx / 2;
#ifndef __NOT_WORTH_15EURO
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0.9f, 0.9f, 0xff000000, tempString.c_str());
	pFont->DrawText(vOut.x, vOut.y, 0.9f, 0.9f, dwColor, tempString.c_str());
#else
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0xff000000, m_pItemBase->GetProp()->szName);
	pFont->DrawText(vOut.x, vOut.y, dwColor, m_pItemBase->GetProp()->szName);
#endif
	return;
#endif
}
and problem are this 2 lines
Code:
	pFont->DrawText(vOut.x + 1, vOut.y + 1, 0.9f, 0.9f, 0xff000000, tempString.c_str());
	pFont->DrawText(vOut.x, vOut.y, 0.9f, 0.9f, dwColor, tempString.c_str());
 
Initiate Mage
Joined
Feb 15, 2020
Messages
45
Reaction score
8
Code:
void CItem::RenderName(LPDIRECT3DDEVICE9 pd3dDevice, CD3DFont* pFont, DWORD dwColor)
{
#ifndef __WORLDSERVER
#ifdef __NOT_WORTH_15EURO
    const ItemProp* const  iProp = GetProp();
    CItemElem* const itemElem = dynamic_cast<CItemElem*>(GetItemBase());
    std::string tempString;

    if (iProp && itemElem)
    {
        dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0;

        switch (iProp->dwReferStat1)
        {
        case WEAPON_GENERAL: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName0; break;
        case WEAPON_UNIQUE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
        case WEAPON_ULTIMATE: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName3; break;
        case ARMOR_SET: dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName1; break;
        case BARUNA_D:
        case BARUNA_C:
        case BARUNA_B:
        case BARUNA_A:
        case BARUNA_S:
            dwColor = g_WndMng.dwItemColor[g_Option.m_nToolTipText].dwName4;
            break;
        default:
            break;
}

        if (iProp->dwParts != static_cast<DWORD>(-1))
        {
            PRANDOMOPTITEM pRandomOptItem = CRandomOptItemGen::GetInstance()->GetRandomOptItem(itemElem->GetRandomOpt());
            if (pRandomOptItem)
                tempString = pRandomOptItem->pszString;
        }

        tempString += iProp->szName;
        if (itemElem->m_nItemNum > 1)
        {
            tempString += " (";
            tempString += std::to_string(itemElem->m_nItemNum);
            tempString += ")";
        }

    }
    if (tempString.empty())
        return;
#endif

    D3DXVECTOR3 vOut, vPos = GetPos(), vPosHeight;
    D3DVIEWPORT9 vp;
    const BOUND_BOX* pBB = m_pModel->GetBBVector();
    pd3dDevice->GetViewport(&vp);
    D3DXMATRIX matTrans;
    D3DXMATRIX matWorld;
    D3DXMatrixIdentity(&matWorld);
    D3DXMatrixTranslation(&matTrans, vPos.x, vPos.y, vPos.z);
    D3DXMatrixMultiply(&matWorld, &matWorld, &m_matScale);
    D3DXMatrixMultiply(&matWorld, &matWorld, &m_matRotation);
    D3DXMatrixMultiply(&matWorld, &matWorld, &matTrans);

    vPosHeight = pBB->m_vPos[0];
    vPosHeight.x = 0;
    vPosHeight.z = 0;
#ifdef __NOT_WORTH_15EURO
    vPosHeight.y += 0.3f;
#endif

    D3DXVec3Project(&vOut, &vPosHeight, &vp, &GetWorld()->m_matProj, &GetWorld()->m_pCamera->m_matView, &matWorld);
    vOut.x -= pFont->GetTextExtent(m_pItemBase->GetProp()->szName).cx / 2;
#ifndef __NOT_WORTH_15EURO
    pFont->DrawText(vOut.x + 1, vOut.y + 1, 0.9f, 0.9f, 0xff000000, tempString.c_str());
    pFont->DrawText(vOut.x, vOut.y, 0.9f, 0.9f, dwColor, tempString.c_str());
#else
    pFont->DrawText(vOut.x + 1, vOut.y + 1, 0xff000000, m_pItemBase->GetProp()->szName);
    pFont->DrawText(vOut.x, vOut.y, dwColor, m_pItemBase->GetProp()->szName);
#endif
    return;
#endif
}
and problem are this 2 lines
Code:
    pFont->DrawText(vOut.x + 1, vOut.y + 1, 0.9f, 0.9f, 0xff000000, tempString.c_str());
    pFont->DrawText(vOut.x, vOut.y, 0.9f, 0.9f, dwColor, tempString.c_str());

I tried yours and it works on me. Try to add this.

Neuz/VersionCommon.h

Code:
#define [COLOR=#666666]__NOT_WORTH_15EURO
[/COLOR]
 
Initiate Mage
Joined
Sep 2, 2008
Messages
27
Reaction score
2
I tried yours and it works on me. Try to add this.

Neuz/VersionCommon.h

Code:
#define [COLOR=#666666]__NOT_WORTH_15EURO
[/COLOR]

omg are u fkn kidding me? i thought its enough to put it in the kCommon.h ... thank you its working perfectly now... ^^
 
Initiate Mage
Joined
Feb 15, 2020
Messages
45
Reaction score
8
omg are u fkn kidding me? i thought its enough to put it in the kCommon.h ... thank you its working perfectly now... ^^

Trial and error is the key. lol

Like you may lose now and learn from it so the next time you fight you already know what to do.
 
Back
Top