I added code in attack.cpp
Code:
else if(IsNPC()&& !IsPet())
{
armor = spellbonuses.AC + itembonuses.AC + (CastToNPC()->GetRawAC() / RuleR(Combat, NPCACFactor)) + 1;
}
This had no effect that i can tell. I set pet ac to 15000, and flame lord hit him 34 times for max hit, rest of hits are 1-3 each.
The total code block is...
Code:
if(RuleB(Combat, UseIntervalAC))
{
float softcap = 0.0;
float mitigation_rating = 0.0;
float attack_rating = 0.0;
int shield_ac = 0;
int armor = 0;
float weight = 0.0;
if(IsClient())
{
armor = CastToClient()->GetRawACNoShield(shield_ac);
weight = (CastToClient()->CalcCurrentWeight() / 10.0);
}
else if(IsNPC()&& !IsPet())
{
armor = spellbonuses.AC + itembonuses.AC + (CastToNPC()->GetRawAC() / RuleR(Combat, NPCACFactor)) + 1;
}
if(GetClass() == WIZARD || GetClass() == MAGICIAN || GetClass() == NECROMANCER || GetClass() == ENCHANTER)
{
softcap = RuleI(Combat, ClothACSoftcap);
}
else if(GetClass() == MONK && weight <= 15.0)
{
softcap = RuleI(Combat, MonkACSoftcap);
}
else if(GetClass() == DRUID || GetClass() == BEASTLORD || GetClass() == MONK)
{
softcap = RuleI(Combat, LeatherACSoftcap);
}
else if(GetClass() == SHAMAN || GetClass() == ROGUE || GetClass() == BERSERKER || GetClass() == RANGER)
{
softcap = RuleI(Combat, ChainACSoftcap);
}
else
{
softcap = RuleI(Combat, PlateACSoftcap);
}
Which to me suggests that if you are client it works fine. If you are a pet it doesnt even get your AC with current code because of the !pet??. It also seems like if applies softcaps and all that to npc ac??!? On live they just used mob ac value, there was no softcaps for mobs, never was as far as i can recall.
Thanks for your help, if you have any other ideas im open to them, ill keep farting around with it.