PDA

View Full Version : A Few small bugs


takatok
05-31-2009, 06:54 PM
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
REPLACE
chancetohit = ((chancetohit * modRangerBotAA) / 100);
WITH
chancetohit += ((chancetohit * modRangerBotAA) / 100);


In Zone\attack.cpp Line 365
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

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

KLS
06-01-2009, 02:37 PM
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