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!

Item Upgrade Visibility in Item Inventory with Colors

Banned
Banned
Joined
May 22, 2020
Messages
226
Reaction score
72
ItemSlot.cpp
Find: SetNumber
Add Below

C++:
void CItemSlot::SetNumber2 ( int nIndex, int nNumber )
{
    CString strNumber;
    strNumber.Format ( "+%d", nNumber );
    DWORD dwColor = NS_UITEXTCOLOR::WHITE;

    /*adding colors base on item upgrade, Jeey-, 5/26/2023 */
    switch(nNumber)
    {
    case 1:
    case 2:
    case 3:
    case 4:
        {
            dwColor = NS_UITEXTCOLOR::RED;
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    case 5:
        {
            dwColor = NS_UITEXTCOLOR::PALEGOLDENROD;
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    case 6:
        {
            dwColor = NS_UITEXTCOLOR::TOMATO;
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    case 7:
    case 8:
        {
            dwColor = NS_UITEXTCOLOR::DARKORANGE;
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    case 9:
        {
            dwColor = NS_UITEXTCOLOR::GOLD;
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    case 10:
        {
            dwColor = NS_UITEXTCOLOR::DARKTURQUOISE;
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    case 11:
        {
            dwColor = NS_UITEXTCOLOR::DARKLBUE;
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    default:
        {
            m_pNumberBoxArray[nIndex]->SetOneLineText ( strNumber, dwColor );
            m_pNumberBoxArray[nIndex]->SetVisibleSingle ( TRUE );
        }break;
    }
}

ItemSlot.h
Find: SetNumber
Add Below:
C++:
void    SetNumber2 ( int nIndex, int nNumber );

Update:
ItemSlot.cpp
Find: const WORD wTurnNum = m_InvenItem.sItemCustom.wTurnNum;
Add Below:
C++:
const WORD wAttackNum = m_InvenItem[i].sItemCustom.grade_damage();
const WORD wDefenseNum = m_InvenItem[i].sItemCustom.grade_defense();

Below: if ( wPileNum>1 || wTurnNum>1 )
Add:
C++:
WORD Higher;
                    if( wDefenseNum > wAttackNum )
                    Higher = wDefenseNum;
                    else
                    Higher = wAttackNum;

                    if ( Higher > 0 )
                    {
                        SetNumber2 ( i,  Higher );
                    }
 
Last edited:
Banned
Banned
Joined
Mar 8, 2019
Messages
84
Reaction score
41
WoozyFoozy - Item Upgrade Visibility in Item Inventory with Colors - RaGEZONE Forums
 
Newbie Spellweaver
Joined
Mar 30, 2021
Messages
61
Reaction score
2
let me add this to my bookmark thanks for sharing ts. great share!
 
Back
Top