Get Level of selected char in TargetInfoNewUI
#1

Hello, I'd like to see level of selected character into UpdateTargetInfo function.

Anyway 

int nLevel = pInfo->GetTargetLevel(eTARGET);

returns always 0 (also trying different eTARGET type).

I've seen that also using pInfo->GetTargetEntity function can't get level number.

 

Anyone has faced with this?

#2

I think this should be enough to make it display the level of characters:

case CHARACTER:
{

bHideLevel = FALSE; //ADD ONLY THIS LINE

if( m_bShowPkHp )
{
// ¼­Ä¡ ¶óÀÌÇÁ ¹öÇÁ°¡ ÀÖ´ÂÁö °Ë»ç.
if (_pUIBuff->IsSkillBuff(475) == TRUE)
{
float fHealth = 0;

Add in in m_bShowPkHp if you only want players with life searcher to see it

File: TargetInfoNewUI.cpp

#3

I've already done this but iLevel field is always 0. 

Do you know wich back-end function is called to get infi about target?

#4

I don‘t know atm, next week I could look into it if still necessary

#5

/index.php?/profile/18894-desarija/&do=hovercard" data-mentionid="18894" href="/index.php?/profile/18894-desarija/" rel="">@Desarija as you can see

2

only healths field has valuee

#6

Yeah, maybe ilevel is initialized as 0 and then only gets a value from npc packet, and character packet doesnt include it at all, but it‘s just a guess

Edit: client needs to know character level to calculate mob name color tho, maybe u can take it from there

#7


11 hours ago, Desarija said:




Yeah, maybe ilevel is initialized as 0 and then only gets a value from npc packet, and character packet doesnt include it at all, but it‘s just a guess



Edit: client needs to know character level to calculate mob name color tho, maybe u can take it from there




/index.php?/profile/18894-desarija/&do=hovercard" data-mentionid="18894" href="/index.php?/profile/18894-desarija/" rel="">@Desarija Correct. Anyway If target is current player, level has value. If target is not current player, so other char hasn't value.

Could yould give me an hint to search in server for the npc packet and character packet? 

#8

ptype_appear.h i'd guess ?

#9


6 hours ago, Desarija said:




ptype_appear.h i'd guess ?




ptype files are files shared between server and client? I mean same classes? why aren't in a shared directory?

#10

After using bHideLevel = FALSE, and added level in server for struct

charStatusPc : public pTypeBase

can't get that struct back in target class.

I've seen that chasStatusPc Struct its used only in EntitiesMP project, then called in Network classes. What do you think?



Forum Jump:


Users browsing this thread: 1 Guest(s)