Posts: 150
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2021
Reputation:
0
This is my code:
switch( pInfo->GetTargetType(eTARGET) )
{
case MOB:
{
// Text color
nColorIdx = 4;
m_bShowHpBar = TRUE;
bHideHpString = FALSE;
// [2010/10/20 : Sora] ¸ó½ºÅÍ ¿ëº´ Ä«µå
if( pInfo->GetTargetEntity(eTARGET)->IsFirstExtraFlagOn(ENF_EX1_MONSTER_MERCENARY) )
{
strName = _S( 5151, "[¿ëº´]") + strName;
nColorIdx = 12;
}
else if ( pInfo->GetTargetEntity(eTARGET)->GetFirstExFlags() & ( ENF_EX1_TOTEM | ENF_EX1_TRAP | ENF_EX1_SUICIDE ) )
{
nColorIdx = 13;
}
else
{
int nLevelDiff = nLevel - _pNetwork->MyCharacterInfo.level;
if( nLevelDiff > 5 ) nColorIdx = 0;
else if( nLevelDiff > 2 ) nColorIdx = 1;
else if( nLevelDiff > -3 ) nColorIdx = 2;
else if( nLevelDiff > -6 ) nColorIdx = 3;
}
// Mob Level
if ( !( pInfo->GetTargetEntity(eTARGET)->GetFirstExFlags() & ( ENF_EX1_TOTEM | ENF_EX1_TRAP | ENF_EX1_SUICIDE ) ) )
{ // ÅäÅÛ, Æ®·¦, ÆÐ·¯»çÀÌÆ®´Â ·¹º§À» Ç¥½ÃÇÏÁö ¾Ê´Â´Ù.
bHideLevel = FALSE;
}
// rendering degli hp...
float fHealth = 0;
fHealth = pInfo->GetTargetCurHP(eTARGET);
strHp.PrintF("%d", (int)fHealth);
m_pText[eTEXT_HP]->SetText(strHp);
}
break;
Posts: 150
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2021
Reputation:
0
On 5/16/2021 at 1:57 AM, Desarija said:
I think in earlier versions of the client there was only uitargetinfo.cpp, and then they basically replaced it with targetinfonewui.cpp so that’s the file it uses now
After moving on november source still can't make update string of HP after damage.
Do you know how I can handle the damage calculation and monster life bar so I can upate HP string value? /index.php?/profile/18894-desarija/&do=hovercard" data-mentionid="18894" href="/index.php?/profile/18894-desarija/" rel="">@Desarija /index.php?/profile/21802-scura/&do=hovercard" data-mentionid="21802" href="/index.php?/profile/21802-scura/" rel="">@Scura
Posts: 275
Threads: 10
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Sep 2013
Reputation:
0
Add it into void CTargetInfoUI::UpdateHPInfo() I'd say
Posts: 150
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2021
Reputation:
0
34 minutes ago, Desarija said:
Add it into void CTargetInfoUI::UpdateHPInfo() I'd say
That function is not called. How to force call it?
Posts: 275
Threads: 10
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: Sep 2013
Reputation:
0
In my source it is called ? i think from myinfo.cpp, look for UpdateHPInfo there
Posts: 150
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2021
Reputation:
0
/index.php?/profile/18894-desarija/&do=hovercard" data-mentionid="18894" href="/index.php?/profile/18894-desarija/" rel="">@Desarija Sorry bro, I'll debug better later and let u know
Posts: 150
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2021
Reputation:
0
/index.php?/profile/18894-desarija/&do=hovercard" data-mentionid="18894" href="/index.php?/profile/18894-desarija/" rel="">@Desarija Thank you, it works! In this file where can I change the color of the bar (default red) ?
Posts: 150
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2021
Reputation:
0
On 5/5/2022 at 1:45 AM, Desarija said:
TargetInfo.tex
How to swap character of mob target with this:
/monthly_2022_05/image.png.f7f57a1ca4395368c1f08a69677bfd06.png" />
and do you know where HP decrease/increase handler is defined?
Posts: 150
Threads: 20
Thanks Received:
0 in 0 posts
Thanks Given: 0
Joined: May 2021
Reputation:
0
/index.php?/profile/18894-desarija/&do=hovercard" data-mentionid="18894" href="/index.php?/profile/18894-desarija/" rel="">@Desarija /index.php?/profile/21749-dimaflash/&do=hovercard" data-mentionid="21749" href="/index.php?/profile/21749-dimaflash/" rel="">@Dimaflash
In the end everything works, the only thing that I can't make it works is to update current target while regenerating HP (example sit down), the HP regenerated of other characters does not trigger UpdateHPInfo().
Do you have any hint?