Evor 72 Posted November 6, 2014 Share Posted November 6, 2014 Hello folks. I don't know if it was "a feature" or not, but it was really annoying and it caused some bugs. So, let's begin. Firstly, we should go to the char.cpp (and we will stay here) Now, let's find the ApplyPoint function and then certain cases.. case APPLY_MAX_HP: case APPLY_MAX_HP_PCT: { int i = GetMaxHP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); float fRatio = (float)GetMaxHP() / (float)i; PointChange(POINT_HP, GetHP() * fRatio - GetHP()); } break; case APPLY_MAX_SP: case APPLY_MAX_SP_PCT: { int i = GetMaxSP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); float fRatio = (float)GetMaxSP() / (float)i; PointChange(POINT_SP, GetSP() * fRatio - GetSP()); } break; This part of code is written by Nova, which is used in novaline, but i know that some of you use it in other branches. It is causing the main problem, we should change it to look like this: case APPLY_MAX_HP: case APPLY_MAX_HP_PCT: { int i = GetMaxHP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); } break; case APPLY_MAX_SP: case APPLY_MAX_SP_PCT: { int i = GetMaxSP(); if(i == 0) break; PointChange(aApplyInfo[bApplyType].bPointType, iVal); } break; Done, now we should conern next problem, it will cause a disproportion between max_hp and current hp. Moving on, we should find PointChange function (still in char.cpp). Then, find case POINT_MAX_HP and POINT_MAX_SP, and change it like that: case POINT_MAX_HP: { SetPoint(type, GetPoint(type) + amount); int i = GetMaxHP(); int hp = GetRealPoint(POINT_MAX_HP); int add_hp = MIN(3500, hp * GetPoint(POINT_MAX_HP_PCT) / 100); add_hp += GetPoint(POINT_MAX_HP); add_hp += GetPoint(POINT_PARTY_TANKER_BONUS); SetMaxHP(hp + add_hp); float fRatio = (float)GetMaxHP() / (float)i; PointChange(POINT_HP, GetHP() * fRatio - GetHP()); val = GetMaxHP(); } break; case POINT_MAX_SP: { SetPoint(type, GetPoint(type) + amount); int i = GetMaxSP(); int sp = GetRealPoint(POINT_MAX_SP); int add_sp = MIN(800, sp * GetPoint(POINT_MAX_SP_PCT) / 100); add_sp += GetPoint(POINT_MAX_SP); add_sp += GetPoint(POINT_PARTY_SKILL_MASTER_BONUS); SetMaxSP(sp + add_sp); float fRatio = (float)GetMaxSP() / (float)i; PointChange(POINT_SP, GetSP() * fRatio - GetSP()); val = GetMaxSP(); } break; Short description: I'm using Nova method to calculate HP/SP ratio gain. It should prevent people from using it as a infinite source of hp (using affect.add(max_hp.. affect.add(hp... we would create another bug.) Kind regards, Evor. @DISCLAIMER This method was tested by me and my team. We find it fixing the whole problem, but whenever you find another bug, please report it. Ratio calculation courtesy of Nova. 1 10 Link to comment Share on other sites More sharing options...
Endymion 319 Posted November 6, 2014 Share Posted November 6, 2014 Works well. Link to comment Share on other sites More sharing options...
Premium Galet 510 Posted November 6, 2014 Premium Share Posted November 6, 2014 I guess it's usable in mainline too ? And, Who is Nova, I heard his name some times, I know he's a dev, novaline is from him, but... Who is Nova ? ^^ Link to comment Share on other sites More sharing options...
Evor 72 Posted November 7, 2014 Author Share Posted November 7, 2014 Nova has an account here on nickname "Alpha". Ask him for further information. Link to comment Share on other sites More sharing options...
Alpha 482 Posted November 10, 2014 Share Posted November 10, 2014 The code is not from me its from rtsummit I think (ymir developer) Novaline is a copy of devline (ongoing development) 1 Link to comment Share on other sites More sharing options...
xcsp 0 Posted November 12, 2014 Share Posted November 12, 2014 Bravo, Congratulations, finally someone posted solution to this problem !!!! Link to comment Share on other sites More sharing options...
loyein 18 Posted January 3, 2016 Share Posted January 3, 2016 Thx for solution. Link to comment Share on other sites More sharing options...
3bd0 181 Posted May 13, 2018 Share Posted May 13, 2018 when i use this fix every time I get off my horse while equipping any thing that has hp, I lose HP!! 1 Link to comment Share on other sites More sharing options...
Premium WeedHex 635 Posted May 15, 2018 Premium Share Posted May 15, 2018 Does it work good? Link to comment Share on other sites More sharing options...
Recommended Posts