+1 i cant understand the 70 to 76 changehttp://dolserver.svn.sourceforge.net/vi ... ision=1600
I don't understand this patch - can anyone explain? What was the problem? And is this really a good fix?
As far as I can tell there was a problem somewhere with high resists being mis-calculated. Instead of fixing that calculation, the resist cap was universally increased?? Am I missing something?
int buffBonus = CalcValueFromBuffs(living, property);
// Apply debuffs. 100% Effectiveness for player buffs, but only 50%
// effectiveness for item bonuses.
buffBonus -= Math.Abs(debuff);
if (buffBonus < 0)
{
itemBonus += buffBonus / 2;
buffBonus = 0;
if (itemBonus < 0)
itemBonus = 0;
}
You should have seen the previous version of the resist calc, would've made your head explode, this already is massively refactored. If I remember correctly I stuck with the debuff mechanics already in there, but I separated buffs and item bonuses, because I needed this distinction for summoning the necro pet. Unless you can come up with some solid facts it's better not to change anything in there - in my opinion.but why is there a 70% hardcap in the first place?
and what does this mean'?
50% effectiveness of what? of debuff? debuff from item?
- Code: Select all
int buffBonus = CalcValueFromBuffs(living, property);
// Apply debuffs. 100% Effectiveness for player buffs, but only 50%
// effectiveness for item bonuses.
buffBonus -= Math.Abs(debuff);
if (buffBonus < 0)
{
itemBonus += buffBonus / 2;
buffBonus = 0;
if (itemBonus < 0)
itemBonus = 0;
}
if buffbonus is < 0 then the half of that (negative) value is substracted from the itembonus
so debuff eats at first the buffed resists and the remaining value is used by 50% to reduce the itembonus
however it cant go below 0 - why?
and what about the race bonus?
if im debuffed with a 50% debuff with 10% resists from items and no buffs - i still keep my racial 5% resist?
i absolutely agree with you, thats why i ask here, before doing anything to it
You should have seen the previous version of the resist calc, would've made your head explode, this already is massively refactored. If I remember correctly I stuck with the debuff mechanics already in there, but I separated buffs and item bonuses, because I needed this distinction for summoning the necro pet. Unless you can come up with some solid facts it's better not to change anything in there - in my opinion.
Return to “%s” DOL Code Contributions
Users browsing this forum: No registered users and 1 guest