The Naid 119 Posted March 11, 2014 Share Posted March 11, 2014 Char_battle.cpp [ bool CHARACTER::Damage(LPCHARACTER pAttacker, int dam, EDamageType type) ] if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% Č®·ü { int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100; if (i) { CreateFly(FLY_HP_SMALL, pAttacker); pAttacker->PointChange(POINT_HP, i); } } Replace if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% Č®·ü { int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100; if (i && i > 0) { CreateFly(FLY_HP_SMALL, pAttacker); pAttacker->PointChange(POINT_HP, i); } } 9 Link to comment Share on other sites More sharing options...
Cilindro 14 Posted March 12, 2014 Share Posted March 12, 2014 hello very nice but its posivel make a dif for game_34083 8Mbs ? Thanks Link to comment Share on other sites More sharing options...
Socialized 42 Posted March 13, 2014 Share Posted March 13, 2014 Not the best way to fix it. Just multiply i * -1 and the lifesteal won't get lost.. :-) Link to comment Share on other sites More sharing options...
Cilindro 14 Posted March 13, 2014 Share Posted March 13, 2014 can you give this information for game 34083 ? Link to comment Share on other sites More sharing options...
.TeodorPL 22 Posted March 13, 2014 Share Posted March 13, 2014 can you give this information for game 34083 ? You must create a dif file. Change the byte 84 (!=) to 88 (>=). Link to comment Share on other sites More sharing options...
Cilindro 14 Posted March 13, 2014 Share Posted March 13, 2014 can you now create for my i habe game_34083 8 mbs Link to comment Share on other sites More sharing options...
.TeodorPL 22 Posted March 14, 2014 Share Posted March 14, 2014 can you now create for my i habe game_34083 8 mbs No, but you can replace this in function CHARACTER::Damage. Link to comment Share on other sites More sharing options...
Vanilla 1456 Posted March 14, 2014 Share Posted March 14, 2014 Taken from vanilla core: if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% Č®·ü { int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100; if (i) { if (i < 0) i *= -1; CreateFly(FLY_HP_SMALL, pAttacker); pAttacker->PointChange(POINT_HP, i); } } 7 We are the tortured. We're not your friends. As long as we're not visible. We are unfixable. Link to comment Share on other sites More sharing options...
Rumor 2608 Posted March 14, 2014 Share Posted March 14, 2014 Yeah would love a DIF for 34083. Mine is also 7.94MB. Link to comment Share on other sites More sharing options...
Bot Metin2 Dev 4887 Posted March 14, 2014 Bot Share Posted March 14, 2014 And now explain for the general public what does this FIX actually fix ? Link to comment Share on other sites More sharing options...
Rumor 2608 Posted March 14, 2014 Share Posted March 14, 2014 when you are a sura using the sword skill that makes the sword glow and you use normal attacks on an opponent you lose some of your own hp Link to comment Share on other sites More sharing options...
Cilindro 14 Posted March 14, 2014 Share Posted March 14, 2014 no body cann make on dif for this for the game 34083 8 mb ? Thanks Link to comment Share on other sites More sharing options...
Think 117 Posted March 14, 2014 Share Posted March 14, 2014 when you are a sura using the sword skill that makes the sword glow and you use normal attacks on an opponent you lose some of your own hp I have tried several times and I can't reproduce this. What else do you need to do besides using Enchanted Blade? (By the way this fix applies to whatever that recovers hp so it should happen with items that have the bonus, no?) Taken from vanilla core: if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% Č®·ü { int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100; if (i) { if (i < 0) i *= -1; CreateFly(FLY_HP_SMALL, pAttacker); pAttacker->PointChange(POINT_HP, i); } } Now I'm lost... so if the damage you do is negative, or the enemy's HP is negative (i.e is dead, or should be), you get HP? How does that make sense? Link to comment Share on other sites More sharing options...
Vanilla 1456 Posted March 15, 2014 Share Posted March 15, 2014 That's for example if an overkill is happening. The bug with the sura skill is when you overkill an enemy, the hp of the enemy goes > 0 and that's influencing this calculation as you can see: You loose hp. My fix will allow sura's to get the hp they earned by overkilling an enemy. Remember: You can't deal < 0 damage, as if it's < 0 it'll be normalized to a number between (afaik) 1-5. The overkill is the only thing producing this bug and the fix will not only prevent the bug but still letting suras get what they earned (if you choose to have the other fix you'll still have a bug: The bug that if you overkill an enemy, you won't get the hp even if you should). the bug he meantioned is simply the bug that's occuring when you overkill an enemy (which happens at least.. 99% of all kills you make since your last hit won't to damage equal to the hp left so you nullify his hp exactly). If you're leveling, you'll get hit hard by this bug if you're going to level at places where the enemies are low on def but high on damage. 1 We are the tortured. We're not your friends. As long as we're not visible. We are unfixable. Link to comment Share on other sites More sharing options...
Think 117 Posted March 15, 2014 Share Posted March 15, 2014 Yes the damage is normalized - I can't find where but I recall seeing it. Regardless, it's mathematically impossible for damage to be negative as there are no deductions from the initial value when you get to that point, so the negative part is the iCurHP indeed. I knew they could have negative but I thought they were marked as dead and nothing was further processed. Should have checked, my bad. However, that was not my point. I meant, what's the point of giving the player HP for killing an enemy which is already dead? I still don't find it logical... It's up to the implementation of course. I still prefer if(i > 0) Link to comment Share on other sites More sharing options...
Rumor 2608 Posted March 15, 2014 Share Posted March 15, 2014 That's for example if an overkill is happening. The bug with the sura skill is when you overkill an enemy, the hp of the enemy goes > 0 and that's influencing this calculation as you can see: You loose hp. My fix will allow sura's to get the hp they earned by overkilling an enemy. Remember: You can't deal < 0 damage, as if it's < 0 it'll be normalized to a number between (afaik) 1-5. The overkill is the only thing producing this bug and the fix will not only prevent the bug but still letting suras get what they earned (if you choose to have the other fix you'll still have a bug: The bug that if you overkill an enemy, you won't get the hp even if you should). the bug he meantioned is simply the bug that's occuring when you overkill an enemy (which happens at least.. 99% of all kills you make since your last hit won't to damage equal to the hp left so you nullify his hp exactly). If you're leveling, you'll get hit hard by this bug if you're going to level at places where the enemies are low on def but high on damage. Are you referring to mobs as enemies too? Because you should not be receiving HP when attacking players. Link to comment Share on other sites More sharing options...
Vanilla 1456 Posted March 15, 2014 Share Posted March 15, 2014 You'd get hp from players too. I refer to both mobs and players. The point is: You can't damage a already defeated character/mob. But as I said, if you overkill him/it, you'll surely make his hp go < 0. You can see it in duels, just make one and after you died you'd check your hp before reviving -> there you can see the negative values. Same goes with mobs. And as soon as you hit the hp into negative values, you'll loose hp. And that's not fair, you made the damage and you'd be rewarded for the things you managed to do. That's why I reverted it back, so if you manage to overkill someone (which happens everytime) you shouldn't be punished by not getting the bonus you earned from maxing your magic sword. 1 We are the tortured. We're not your friends. As long as we're not visible. We are unfixable. Link to comment Share on other sites More sharing options...
Trial 234 Posted December 14, 2018 Share Posted December 14, 2018 *= -1 makes no sense because there is no "overkill" the bug happens because you hit already dead (by hp) character, here's how it should be fixed //HP and SP recovery bug fix if (iCurHP > 0) { // Ä¥ ¶§¸¶´Ù HPȸº¹ if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% È®·ü { int i = MIN(dam, iCurHP) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100; if (i) { CreateFly(FLY_HP_SMALL, pAttacker); pAttacker->PointChange(POINT_HP, i); } } } Link to comment Share on other sites More sharing options...
Active Member Exygo 1091 Posted December 15, 2018 Active Member Share Posted December 15, 2018 You can simply be a good person and not be greedy. Put this if (iCurHP >= iHP) and you won't apply life steal if victim doesn't have that much HP. Dude why do we reply on a 2014 topic 0_0 2 https://www.youtube.com/channel/UCQ8mAeda9TWq6SsTzB53emw/videos Link to comment Share on other sites More sharing options...
spectrum 7 Posted June 1, 2019 Share Posted June 1, 2019 for all guys don't understend . take the good cod if (pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) && number(0, 4) > 0) // 80% E¢ç¡¤u { int i = ((iCurHP>=0)?MIN(dam, iCurHP):dam) * pAttacker->GetPoint(POINT_HIT_HP_RECOVERY) / 100; //@fixme107 if (i) { CreateFly(FLY_HP_SMALL, pAttacker); pAttacker->PointChange(POINT_HP, i); } } if (pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) && number(0, 4) > 0) // 80% E¢ç¡¤u { int i = ((iCurHP>=0)?MIN(dam, iCurHP):dam) * pAttacker->GetPoint(POINT_HIT_SP_RECOVERY) / 100; //@fixme107 if (i) { CreateFly(FLY_SP_SMALL, pAttacker); pAttacker->PointChange(POINT_SP, i); } } 1 Link to comment Share on other sites More sharing options...
Recommended Posts