Is there any way to call a function that will return how much AC a CLIENT has been buffed for by SPELLS ALONE? How exactly would i call this and where is it if it exists?
thinking about replacing line 1271 and down in attack.cpp with this..
Code:
}
if (mylevel <= 5) {
if (min_dmg==0)
min_dmg=1;
if (max_dmg==0)
max_dmg = mylevel+4;
// 1 = 2, 27 = 54
}
if(max_dmg != 0 && min_dmg <= max_dmg) {
int DI = ((max_dmg) - (min_dmg)) / 19;
int DB = (min_dmg) - DI;
int XX = ((float)rand()/RAND_MAX)*20;
if (other->IsClient()){
dmgbonusmod += (float)(((this->spellbonuses->ATK + this->itembonuses->ATK)/2)*.05);
dmgbonusmod -= ((((float)other->CastToClient()->GetRawItemAC())/2)*.05);
}
else if (other->IsNPC()) {
dmgbonusmod += (float)(((this->spellbonuses->ATK + this->itembonuses->ATK)/2)*.05);
dmgbonusmod += (float)(((this->GetAC())/2)*.05);
}
XX = XX + dmgbonusmod;
basedamage = DB + (XX*DI);
}
else if (other->GetOwnerID()!=0) {
// FIXME Shouldn't nerf the damage of charmed pets
basedamage = mylevel*1.9f*clmod;
}
else { // Default calculation
basedamage = mylevel*level_mod*clmod;
}
damage = (int)basedamage;
So far ive tested it on my server and it seems in the neighborhood of what i want, but a ways to go. It DOES mitigate dmg similar to eq by armor worn, but i cant get spell AC buffs factored in yet. I also have to factor in mitigating down to a miss which happens in real eq. The formulas used are based off of work from link below if anyone is interested...
http://www.thesteelwarrior.org/forum...mp;threadid=13