Core/Entities: Use the Ranged Attack Power multiplier from the DBC to calculate ranged attack power bonus from agility

This commit is contained in:
Subv
2012-09-26 10:50:44 -05:00
parent 424ac73766
commit df12eba820
3 changed files with 5 additions and 17 deletions

View File

@@ -706,9 +706,9 @@ struct ChrClassesEntry
//uint32 flags2; // 8 m_flags (0x08 HasRelicSlot)
uint32 CinematicSequence; // 9 m_cinematicSequenceID
uint32 expansion; // 10 m_required_expansion
uint32 APPerStrenth; // 11
uint32 APPerAgility; // 12
//uint32 // 13
uint32 APPerStrenth; // 11 Attack Power bonus per point of strength
uint32 APPerAgility; // 12 Attack Power bonus per point of agility
uint32 RAPPerAgility; // 13 Ranged Attack Power bonus per point of agility
};
struct ChrRacesEntry

View File

@@ -39,7 +39,7 @@ const char CharStartOutfitEntryfmt[]="diiiiiiiiiiiiiiiiiiiiiiiiixxxxxxxxxxxxxxxx
const char CharTitlesEntryfmt[]="nxsxix";
const char ChatChannelsEntryfmt[]="nixsx";
const char ChrClassesEntryfmt[]="nixsxxxixiiiix";
const char ChrClassesEntryfmt[]="nixsxxxixiiiii";
const char ChrRacesEntryfmt[]="nxixiixixxxxixsxxxxxixxx";
const char ChrClassesXPowerTypesfmt[]="nii";

View File

@@ -274,19 +274,7 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
if (ranged)
{
index = UNIT_FIELD_RANGED_ATTACK_POWER;
switch (getClass())
{
case CLASS_HUNTER:
val2 = level * 2.0f + GetStat(STAT_AGILITY) * 2.0f - 20.0f;
break;
case CLASS_ROGUE:
val2 = level + GetStat(STAT_AGILITY) - 10.0f;
break;
case CLASS_WARRIOR:
val2 = level + GetStat(STAT_AGILITY) - 10.0f;
break;
}
val2 = (level + std::max(GetStat(STAT_AGILITY) - 10.0f, 0.0f)) * entry->RAPPerAgility;
}
else
{