EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   A Few small bugs (https://www.eqemulator.org/forums/showthread.php?t=28404)

takatok 05-31-2009 06:54 PM

A Few small bugs
 
The following lines set the chance to hit to 2,4,6% of the current chance instead of adding 2,4,6 to it.

In Zone\attack.cpp Line 347
Code:

REPLACE
chancetohit = ((chancetohit * modRangerBotAA) / 100);
WITH
chancetohit += ((chancetohit * modRangerBotAA) / 100);

In Zone\attack.cpp Line 365
Code:

REPLACE
chancetohit = ((chancetohit * modAA) / 100);
WITH
chancetohit += ((chancetohit * modAA) / 100);

The Defender's Mitigation from AGI is being deducted 2x.
In Zone\attack.cpp Line 207 and Line 384

Code:

REMOVE ONE OF THESE
chancetohit -= ((float)defender->GetAGI() * RuleR(Combat, AgiHitFactor));
chancetohit -= defender->GetAGI() * RuleR(Combat, AgiHitFactor);


KLS 06-01-2009 02:37 PM

Code:

        if (attacker->IsClient()) {
                int modAA = 100;
                switch (attacker->CastToClient()->GetAA(aaPrecisionofthePathfinder)) {
                        case 1:
                                modAA += 2;
                                break;
                        case 2:
                                modAA += 4;
                                break;
                        case 3:
                                modAA += 6;
                                break;
                }
                chancetohit = ((chancetohit * modAA) / 100);
        }

In regards to the first two it is correct because mod starts at 100. So with rank 3 you would have a mod of 106. Assume you have 50% chance to hit: ((50 * 106) / 100) = 53 chance to hit.

takatok 06-01-2009 03:49 PM

Ah oops. Missed that initialization there. Still getting use to that on the fly initilization sytle.. esp to non zero value :)

Tony


All times are GMT -4. The time now is 02:07 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.