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/Skill Image Render in Info

Junior Spellweaver
Joined
Jan 2, 2014
Messages
166
Reaction score
29
@janmaru5555
how to fix about that :thumbup1:

janmaru5555 - Item/Skill Image Render in Info - RaGEZONE Forums
 
Newbie Spellweaver
Joined
Jul 5, 2017
Messages
54
Reaction score
1
Merry Christmas.
This is just only the Image of the Item

Screenshot:
Item
janmaru5555 - Item/Skill Image Render in Info - RaGEZONE Forums


Skill
janmaru5555 - Item/Skill Image Render in Info - RaGEZONE Forums


BasicVarTextBox.cpp
Search:
PHP:
#include "../EngineUIlib/GUInterface/UIDebugSet.h"

Add Below:
PHP:
#include "ItemImage.h"
#include "GLItemMan.h"
#include "GLItem.h"
#include "GLGaeaClient.h"

Search:
PHP:
m_pSelfDummy ( NULL ),

Add below:
PHP:
m_pItemImageRender ( NULL ),

Search:
PHP:
CBasicVarTextBox::~CBasicVarTextBox ()
{
}

Add Below:
PHP:
CItemImage*    CBasicVarTextBox::CreateItemImage ( const char* szControl )
{
    CItemImage* pItemImage = new CItemImage;
    pItemImage->CreateSub ( this, szControl );
    pItemImage->CreateSubControl ();
    pItemImage->SetUseRender ( TRUE );
    pItemImage->SetVisibleSingle ( FALSE );
    RegisterControl ( pItemImage );

    return pItemImage;
}

Search:
PHP:
CBasicTextBox* pTextBox = new CBasicTextBox;
pTextBox->CreateSub ( this, "VAR_TEXT_BOX", UI_FLAG_XSIZE | UI_FLAG_YSIZE );
pTextBox->SetFont ( m_pFont );
pTextBox->SetTextAlign ( TEXT_ALIGN_LEFT );
pTextBox->SetNoUpdate ( true );
RegisterControl ( pTextBox );
m_pTextBox = pTextBox;

Add Below:
PHP:
{
    CItemImage* pItemImage = new CItemImage;
    pItemImage->CreateSub ( this, "ITEM_IMAGE_RENDER" );
    pItemImage->CreateSubControl ();
    pItemImage->SetUseRender ( TRUE );
    pItemImage->SetVisibleSingle ( FALSE );
    RegisterControl ( pItemImage );
    m_pItemImageRender = pItemImage;
}


Search:
PHP:
void CBasicVarTextBox::SetBlockMouseTracking ( bool bBlock )
{
    m_bBLOCK_MOUSETRACKING = bBlock;
}

Add Below:
PHP:
//Item Image Render by NjD :: 07 / 08 / 2014
void CBasicVarTextBox::SetItemRender ( SNATIVEID sICONINDEX, const char* szTexture )
{
    SITEM* pItem = GLItemMan::GetInstance().GetItem ( sICONINDEX );
    if ( !pItem ) m_pItemImageRender->SetVisibleSingle ( FALSE );

    if ( m_pItemImageRender )
    {
        m_pItemImageRender->SetItem( sICONINDEX, szTexture );
        m_pItemImageRender->SetVisibleSingle ( TRUE );
    }
}
//Item Image Render by NjD :: 07 / 08 / 2014
void CBasicVarTextBox::ResetItemRender ()
{
    if ( m_pItemImageRender )
    {
        m_pItemImageRender->ResetItem();
        m_pItemImageRender->SetVisibleSingle ( FALSE );
    }
}

BasicVarTextBox.h
Search:
PHP:
class    CBasicTextBox;

Add Below:
PHP:
struct SNATIVEID;
class GLItem;
class CItemImage;

Search:
PHP:
private:
    CUIControl*            m_pSelfDummy;

Add Below:
PHP:
public:
 //Item Image Render by NjD :: 07 / 08 / 2014
CItemImage*    CreateItemImage ( const char* szControl );
CItemImage*    m_pItemImageRender; 
void    SetItemRender ( SNATIVEID sICONINDEX, const char* szTexture );
void    ResetItemRender ();

InnerInterface.cpp
Add Below:
PHP:
void CInnerInterface::ADDITEM_RENDER ( SNATIVEID sICONINDEX, const char* szTexture )
{
    if ( m_bITEM_INFO_EX_DISPLAY_MODE ){
        m_pInfoDisplayEx->SetItemRender ( sICONINDEX, szTexture );
    }else{
        m_pInfoDisplay->SetItemRender ( sICONINDEX, szTexture );
    }
}
void CInnerInterface::RESETITEM_RENDER ()
{
    if ( m_bITEM_INFO_EX_DISPLAY_MODE ){
        m_pInfoDisplayEx->ResetItemRender ();
    }else{
        m_pInfoDisplay->ResetItemRender ();
    }
}

InnerInterface.h
Add Below:
PHP:
public:
void ADDITEM_RENDER ( SNATIVEID sICONINDEX, const char* szTexture );
void RESETITEM_RENDER ();

UIItemInfoLoader.cpp
Add Inside namespace NS_ITEMINFO {

PHP:
void AddItemRender ( SNATIVEID sICONINDEX, const char* szTexture )
{
    CInnerInterface::GetInstance().ADDITEM_RENDER ( sICONINDEX, szTexture );
}
void ResetItemRender ()
{
    CInnerInterface::GetInstance().RESETITEM_RENDER ();    
}

Add at the bottom of void LOAD ( const SITEMCUSTOM &sItemCustom, const BOOL bShopOpen, const BOOL bInMarket, const BOOL bInPrivateMarket, const BOOL bIsWEAR_ITEM, WORD wPosX, WORD wPosY, SNATIVEID sNpcNativeID )

PHP:
if ( sNpcNativeID != sItemCustom.sNativeID ) 
            {
                sNpcNativeID = sItemCustom.sNativeID;
        
                if ( sNpcNativeID.IsValidNativeID() )
                {
                    SITEM* pItem = GLItemMan::GetInstance().GetItem ( sNpcNativeID );
                    if ( !pItem )
                    {
                        GASSERT ( 0 && " " );
                        return ;
                        ResetItemRender ();
                    }    
                        ResetItemRender ();    
                        AddItemRender ( pItem->sBasicOp.sICONID, pItem->GetInventoryFile() );
                }
            }

UISkillInfoLoader.cpp

Search:
PHP:
namespace NS_SKILLINFO
{
    SNATIVEID    m_sNativeIDBack;
    BOOL        m_bNextLevel_BEFORE_FRAME = FALSE;

Add below:
PHP:
void AddItemRender ( SNATIVEID sICONINDEX, const char* szTexture )
{
    CInnerInterface::GetInstance().ADDITEM_RENDER ( sICONINDEX, szTexture );
}

void ResetItemRender ()
{
    CInnerInterface::GetInstance().RESETITEM_RENDER ();    
}

Search:
PHP:
void LOAD ( GLSKILL* const pSkill, SCHARSKILL* const pCharSkill, BOOL bNextLevel )
    {
        CString    strText;

        //    ?? ?? ??

        WORD wDispLevel = 0;            
        if ( pCharSkill )    //    ?? ??
        {
            wDispLevel = pCharSkill->wLevel + 1;                
        }

Add Below:
PHP:
if ( !pSkill )
        {    
            return ;
            ResetItemRender ();
        }

        AddItemRender ( pSkill->m_sEXT_DATA.sICONINDEX, pSkill->m_sEXT_DATA.strICONFILE.c_str() );

uiinnercfg01.xml

PHP:
<CONTROL Local="Common" Id="ITEM_IMAGE_RENDER">
        <WINDOW_POS X="7" Y="8" W="35" H="35" />
    </CONTROL>

Fix for Price bug:


Since my files have been leaked. Here's another update in your item info
Note: don't copy paste all, just copy what's needed.
You can have the following:
Big font for your item name
inside item icons of a box type item both Gift Box and Random Box
Resistance icon(if you can align then congratulations :) )
Download Link in attachment
Credits: To me
Enjoy.


Tnx it Work for Me..But how about Item Image in ItemLINK? I was Link the Item But no Image APPEARING..tnx in Advance
 
Back
Top