mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Entities: Use the Ranged Attack Power multiplier from the DBC to calculate ranged attack power bonus from agility
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user