Hp is displaying wrong information

Results 1 to 1 of 1
  1. #1
    Member kloklojul is offline
    MemberRank
    Sep 2008 Join Date
    83Posts

    Hp is displaying wrong information

    I'm currently trying to fix a bug in the infinity flyff (ketchup edition) where the hp bar is beeing displayed wrong.

    The Issue looks like this:



    I check the code and it seems the code itself is correct:
    Code:
    nWidth = (int)( (__int64)nWidthClient * (__int64)pMover->GetHitPoint() / (__int64)pMover->GetMaxHitPoint() );
    After some debugging i found out that the client itself seems to be getting the wrong info? Because both methods (GetHipoint and GetMaxHitPoint) are beeing used in other places aswell and they work their.

    I displayed the info the client gets like this:

    Code:
    				TCHAR	str1[128];
    				sprintf(str1, "GetParam( DST_HP_MAX, 0 ):  %d", pMover->GetParam(DST_HP_MAX, 0));
    				TCHAR	str2[128];
    				sprintf(str2, "pMover->GetHitPoint():  %d", pMover->GetHitPoint());
    				TCHAR	str3[128];
    				sprintf(str3, "pMover->GetHPTEST():  %d", pMover->GetHPTEST());
    				TCHAR	str4[128];
    				sprintf(str4, "pMover->getname:  %s", pMover->GetName());
    And the HP Values i am getting are nowhere near the real hp. It seems that the client is always using a base value of 150 atleast according to str1. pMover->GetHPTEST() is a test function i wrote that simply returns the current hp directly. When ever a character enters the render distance getHPTEST reports the correct hp value untill the HP gets an update (through healing or hp regen, etc). I assume the server is sending wrong values to the client to prevent the client from getting to much info over other players? Anyone knows a fix or has a hint on where to look for next?

    Bonus question:
    Anyone knows how to apply code changes while debugging` in Visual Studio? When ever i click on "Apply and continue" i get the error message "Can't compile the code changes while running yadda yadda".
    Last edited by kloklojul; 20-12-21 at 03:37 AM.




Advertisement