Resist Calculator patch

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Resist Calculator patch

Postby Kakuri » Sun Apr 26, 2009 12:11 am

http://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?
User avatar
Kakuri
Developer
 
Posts: 803
Joined: Tue Oct 28, 2008 10:40 pm
Website: http://enlight.hostrator.com/

Re: Resist Calculator patch

Postby Tired » Sun Apr 26, 2009 12:32 am

Not sure... Looks like it had to do with the Tank ability Fury.
Database problem? Yea I can fix that.
User avatar
Tired
Server Team
 
Posts: 518
Joined: Thu Apr 20, 2006 5:29 am
Location: United States

Re: Resist Calculator patch

Postby Dunnerholl » Mon Apr 27, 2009 8:17 am

http://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?
+1 i cant understand the 70 to 76 change
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Resist Calculator patch

Postby Graveen » Mon Apr 27, 2009 8:41 am

I have to see Hxxride for this but in the best case, this is a poor fix for another problem we should correct correctly, not via a quickfix certainly having huge side effects.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: Resist Calculator patch

Postby Dunnerholl » Mon Apr 27, 2009 9:16 am

but why is there a 70% hardcap in the first place?

and what does this mean'?
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;
}
50% effectiveness of what? of debuff? debuff from item?

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?
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Resist Calculator patch

Postby Aredhel » Mon Apr 27, 2009 2:47 pm

but why is there a 70% hardcap in the first place?

and what does this mean'?
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;
}
50% effectiveness of what? of debuff? debuff from item?

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?
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.
User avatar
Aredhel
Inactive Staff Member
 
Posts: 1024
Joined: Sat Apr 14, 2007 1:49 pm
Location: Germany

Re: Resist Calculator patch

Postby Dunnerholl » Mon Apr 27, 2009 2:58 pm


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.
i absolutely agree with you, thats why i ask here, before doing anything to it :)
Dunnerholl
Developer
 
Posts: 1229
Joined: Mon Sep 08, 2008 8:39 pm

Re: Resist Calculator patch

Postby Hxxride52 » Thu Apr 30, 2009 8:19 pm

That was my bad - it was late and you get the picture..
Hxxride52
DOL Novice
 
Posts: 95
Joined: Tue Nov 13, 2007 1:48 am


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest