[Release] Show uid and create date time in Item Info

Results 1 to 1 of 1
  1. #1
    Apprentice PhatLA is offline
    MemberRank
    Oct 2020 Join Date
    On EarthLocation
    23Posts

    happy [Release] Show uid and create date time in Item Info

    Hi all,

    In this post i show you how i'm show item Uid and Create Datetime in Item Info
    Hope it will help little for who need it




    1. Add new define

    Code:
    #define STRITEM_INFO_UID         "\\eItem Uid: \\r%I64d\\r"  // for player
    #define STRITEM_INFO_IDX         "\\eItem Uid: \\r%I64d (ID: %d)\\r" // show ID for GM

    2.INFItemInfo.cpp

    Code:
    void CINFItemInfo::SetItemUnique(int nParameterIndex)
    {
        if (COMPARE_RACE(g_pShuttleChild->m_myShuttleInfo.Race, RACE_OPERATION | RACE_GAMEMASTER)) 
        {
            wsprintf(m_strItemInfo[nParameterIndex], STRITEM_INFO_IDX, m_pRefItemInfo->UniqueNumber, m_pRefItemInfo->ItemNum);
        }
        else
        {
            wsprintf(m_strItemInfo[nParameterIndex], STRITEM_INFO_UID, m_pRefItemInfo->UniqueNumber);
        }
    }
    
    void CINFItemInfo::SetItemDate(int nParameterIndex)
    {
         wsprintf(m_strItemInfo[nParameterIndex], STRITEM_INFO_TIME,
            m_pRefItemInfo->CreatedTime.Day, 
            m_pRefItemInfo->CreatedTime.Month, 
            m_pRefItemInfo->CreatedTime.Year,
            m_pRefItemInfo->CreatedTime.Hour,
            m_pRefItemInfo->CreatedTime.Minute,
            m_pRefItemInfo->CreatedTime.Second);
    }
    And all you need is call new function in all Set Attribute Function (SetPrimaryWeaponInfo, SetSecondaryWeaponInfo,..) like this and fix bug your self

    Code:
    SetItemUnique(index++);
    SetItemDate(index++);
    Last edited by PhatLA; 12-07-21 at 04:35 AM.




Advertisement