mlan
06-09-2004, 10:09 AM
i haven't tested this code but i think it should work. i'll test it later tonight, think i got files to revert back and use 5.7DR3 since DR4 seems kinda borked for me.
not sure if theres some sort of skill cap at 252 or not but i went ahead and put in a little extra code to make sure the skill didn't go up forever
maxskill.h
mob monk dw - ln567
OLD
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
break
;
}
NEW
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
if (r_value > 252)
r_value = 252;
break;
}
same with this one in another file
maxskill.cpp
dw for monk - ln641
OLD
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
break;
NEW
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
if (r_value > 252)
r_value = 252;
break;
tried to work planar durability into the hp calc formula and took the hp from buffs out of the equation until after the aa calcs since they aren't added in on live servers.
client.cpp
PD AA hp - ln1504
OLD
sint32 Client::CalcMaxHP() {
max_hp = (CalcBaseHP() + itembonuses->HP + spellbonuses->HP);
if (GetAA(28) != 0) {
if (GetAA(28) == 1)
max_hp += (uint32)((float)max_hp/100.0f) * ((GetAA(120)!=0) ? 4.0f:2.0f);
if (GetAA(28) == 2)
max_hp += (uint32)((float)max_hp/100.0f) * ((GetAA(120)!=0) ? 7.0f:5.0f);
if (GetAA(28) == 3)
max_hp += (uint32)((float)max_hp/100.0f) * ((GetAA(120)!=0) ? 12.0f:10.0f);
}
/*
if (GetAA(120) != 0) {
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
max_hp += (uint32)((float)max_hp/100.0f) * 2.3f;
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
}
*/
if (cur_hp > max_hp)
cur_hp = max_hp;
return max_hp;
}
NEW
sint32 Client::CalcMaxHP() {
max_hp = CalcBaseHP() + itembonuses->HP;
if ((GetAA(28) != 0) || (GetAA(143) != 0) || (GetAA(120) != 0)) {
float hp_bonus = 0.0f;
if (GetAA(28) == 1)
hp_bonus += 2.0f;
if (GetAA(28) == 2)
hp_bonus += 5.0f;
if (GetAA(28) == 3)
hp_bonus += 10.0f;
if (GetAA(120) == 1)
hp_bonus += 2.0f;
if (GetAA(143) != 0)
hp_bonus += GetAA(143) * 1.5f;
max_hp += (uint32)((float)max_hp/100.0f) * hp_bonus;
}
/*
if (GetAA(120) != 0) {
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
max_hp += (uint32)((float)max_hp/100.0f) * 2.3f;
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
}
*/
max_hp += spellbonuses->HP;
if (cur_hp > max_hp)
cur_hp = max_hp;
return max_hp;
}
added in planar power into the stat cap code
client.cpp
statAA - ln270
OLD
// Return max stat value for level
sint16 Client::GetMaxStat() {
int level = GetLevel();
if (level < 61) {
return 255;
}
else if (level < 66) {
return 255 + 5 * (level - 60);
}
else {
return 280;
}
}
NEW
// Return max stat value for level
sint16 Client::GetMaxStat() {
int level = GetLevel();
if (level < 61) {
return 255;
}
else if (level < 66) {
return 255 + 5 * ((level - 60) + GetAA(142));
}
else {
return 280 + 5 * GetAA(142);
}
}
*edit* pasted the same code twice and didn't notice. repasted proper code.
*edit2* fixed a few compile errors that i overlooked
not sure if theres some sort of skill cap at 252 or not but i went ahead and put in a little extra code to make sure the skill didn't go up forever
maxskill.h
mob monk dw - ln567
OLD
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
break
;
}
NEW
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
if (r_value > 252)
r_value = 252;
break;
}
same with this one in another file
maxskill.cpp
dw for monk - ln641
OLD
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
break;
NEW
case MONK: case MONKGM:{
// 1 252 252
r_value = level*7; // This can't be right can it?
if (r_value > 252)
r_value = 252;
break;
tried to work planar durability into the hp calc formula and took the hp from buffs out of the equation until after the aa calcs since they aren't added in on live servers.
client.cpp
PD AA hp - ln1504
OLD
sint32 Client::CalcMaxHP() {
max_hp = (CalcBaseHP() + itembonuses->HP + spellbonuses->HP);
if (GetAA(28) != 0) {
if (GetAA(28) == 1)
max_hp += (uint32)((float)max_hp/100.0f) * ((GetAA(120)!=0) ? 4.0f:2.0f);
if (GetAA(28) == 2)
max_hp += (uint32)((float)max_hp/100.0f) * ((GetAA(120)!=0) ? 7.0f:5.0f);
if (GetAA(28) == 3)
max_hp += (uint32)((float)max_hp/100.0f) * ((GetAA(120)!=0) ? 12.0f:10.0f);
}
/*
if (GetAA(120) != 0) {
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
max_hp += (uint32)((float)max_hp/100.0f) * 2.3f;
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
}
*/
if (cur_hp > max_hp)
cur_hp = max_hp;
return max_hp;
}
NEW
sint32 Client::CalcMaxHP() {
max_hp = CalcBaseHP() + itembonuses->HP;
if ((GetAA(28) != 0) || (GetAA(143) != 0) || (GetAA(120) != 0)) {
float hp_bonus = 0.0f;
if (GetAA(28) == 1)
hp_bonus += 2.0f;
if (GetAA(28) == 2)
hp_bonus += 5.0f;
if (GetAA(28) == 3)
hp_bonus += 10.0f;
if (GetAA(120) == 1)
hp_bonus += 2.0f;
if (GetAA(143) != 0)
hp_bonus += GetAA(143) * 1.5f;
max_hp += (uint32)((float)max_hp/100.0f) * hp_bonus;
}
/*
if (GetAA(120) != 0) {
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
max_hp += (uint32)((float)max_hp/100.0f) * 2.3f;
LogFile->write(EQEMuLog::Debug, "Physical Enhancement: MaxHP=%i", max_hp);
}
*/
max_hp += spellbonuses->HP;
if (cur_hp > max_hp)
cur_hp = max_hp;
return max_hp;
}
added in planar power into the stat cap code
client.cpp
statAA - ln270
OLD
// Return max stat value for level
sint16 Client::GetMaxStat() {
int level = GetLevel();
if (level < 61) {
return 255;
}
else if (level < 66) {
return 255 + 5 * (level - 60);
}
else {
return 280;
}
}
NEW
// Return max stat value for level
sint16 Client::GetMaxStat() {
int level = GetLevel();
if (level < 61) {
return 255;
}
else if (level < 66) {
return 255 + 5 * ((level - 60) + GetAA(142));
}
else {
return 280 + 5 * GetAA(142);
}
}
*edit* pasted the same code twice and didn't notice. repasted proper code.
*edit2* fixed a few compile errors that i overlooked