Get Level of selected char in TargetInfoNewUI
#16


18 hours ago, Dimaflash said:





ObjectBase* pObject2 = ACTORMGR()->GetObject(eOBJ_CHARACTER, pInfo->GetTargetLevel(eTARGET));


Oh, I didn't look at that line of yours.





the GetTargetLevel() function does not need to be called, you will receive information about the level in a different way, through the class pointer CCharacterTarget* :




ObjectBase* pObject2 = ACTORMGR()->GetObject(eOBJ_CHARACTER, pInfo->GetTargetServerIdx(eTARGET));
CCharacterTarget* ptrTarget = static_cast< CCharacterTarget* >(pObject2);





As you can see, in your screenshots, there is no level variable in the CCharacterTarget class, which I specified as your_var_for_level .



And of course you need to create it and fill it with the SetData() method. I wrote about this above.



On the server side you also need to create a variable in ptype_appear.h - struct appearPc{ } And fill it in void AppearMsg() .





 




Thank you. Understood and it works.

As far I know, AppearMsg is sent when a client login, so the client stores the 'new_lavel_value' on client side. But how to update it in case of level up of players? I've seen that in party when someone level up level is automatically updated. Any hint how to achieve that?



Messages In This Thread
[No subject] - by Andrein95 - 04-25-2022, 04:28 PM
[No subject] - by Desarija - 04-25-2022, 09:50 PM
[No subject] - by Andrein95 - 04-25-2022, 10:17 PM
[No subject] - by Desarija - 04-26-2022, 12:05 PM
[No subject] - by Andrein95 - 04-27-2022, 07:30 PM
[No subject] - by Desarija - 04-27-2022, 08:57 PM
[No subject] - by Andrein95 - 04-28-2022, 08:10 AM
[No subject] - by Desarija - 04-28-2022, 08:43 AM
[No subject] - by Andrein95 - 04-28-2022, 03:32 PM
[No subject] - by Andrein95 - 04-28-2022, 08:31 PM
[No subject] - by Dimaflash - 04-28-2022, 09:05 PM
[No subject] - by Andrein95 - 04-29-2022, 07:52 PM
[No subject] - by Dimaflash - 04-29-2022, 08:05 PM
[No subject] - by Andrein95 - 04-30-2022, 01:01 PM
[No subject] - by Dimaflash - 04-30-2022, 09:33 PM
[No subject] - by Andrein95 - 05-01-2022, 03:47 PM
[No subject] - by Andrein95 - 05-03-2022, 06:04 AM
[No subject] - by Dimaflash - 05-03-2022, 06:52 AM
[No subject] - by Andrein95 - 05-04-2022, 09:34 PM
[No subject] - by Andrein95 - 05-06-2022, 10:18 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)