Jump to content
Sign in to follow this  
Graf

Character Power

Recommended Posts

Character Power

image.png.3e44dc40d4204a6a9b3b128b7383ee53.png

Open file UIHeadSay.cpp and find:

#ifdef _LOG_NAME_                     //и§’и‰ІеђЌз§°
    if( CCharacter::IsShowLogName )
    {
		CChaStateMgr* pState = _pOwn->GetStateMgr();
		int nCount = pState->GetSkillStateNum();
		for( int i=0; i<nCount; i++ )
		{
			y -= 20;
			CGuiFont::s_Font.Render( pState->GetSkillState(i)->szName, x, y, COLOR_WHITE );
		}
    }
#endif

Insert it below:

// Вывод рейтинга
	if (_pOwn->IsPlayer()) {
	
		if (_IsShowName) {
			if (_pOwn->getGuildID())
				y -= 14;
			char RenderTextRating[32] = {0};
			sprintf(RenderTextRating, "- [%d] -", CalculateRating(_pOwn->getGameAttr()));
			int RatingLength =  CGuiFont::s_Font.GetWidth(RenderTextRating);
			CGuiFont::s_Font.Render(RenderTextRating, x - (RatingLength / 2), y - 28, 0xFF000000 );
			CGuiFont::s_Font.Render(RenderTextRating, x - (RatingLength / 2) - 1, y - 28 - 1, 0xFF00FFFF );	
		}
	
	}

 

Find function:

void CHeadSay::SetName( const char* name )
{
    _nChaNameOffX = 0 - CGuiFont::s_Font.GetWidth( name )/2;
}

Insert it below:

// Подсчет рейтинга
inline int CalculateRating(SGameAttr* attrArr) {
	int result = 0;
	result += attrArr->get(ATTR_HP);
	return result;
}

 

In this example, the rating outputs the number of ATTR_HP (HP of the character).

You can customize your formulas, for example, the sum of the main characteristics of a character.

 

P.S. Google translate)

Edited by Graf
  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...