Skip to content

Commit

Permalink
NPCBots: Apply player-like damage from AP calculation only to bots in…
Browse files Browse the repository at this point in the history
…stead of all creatures

(cherry picked from commit 9b71a34c40f767d36c6b0eb7ce58f7e676b753c6)

# Conflicts:
#	src/server/game/Entities/Unit/StatSystem.cpp
  • Loading branch information
trickerer committed Aug 12, 2024
1 parent 8d85657 commit a7a6065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/game/Entities/Unit/StatSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,8 @@ void Creature::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized,
float basePct = GetModifierValue(unitMod, BASE_PCT) * attackSpeedMulti;
//npcbot
*/
float baseValue = GetModifierValue(unitMod, BASE_VALUE) + (attackPower / 14.0f) * variance * attackSpeedMulti;
float basePct = GetModifierValue(unitMod, BASE_PCT);
float baseValue = GetModifierValue(unitMod, BASE_VALUE) + (attackPower / 14.0f) * variance * (IsNPCBot() ? attackSpeedMulti : 1.0f);
float basePct = GetModifierValue(unitMod, BASE_PCT) * (!IsNPCBot() ? attackSpeedMulti : 1.0f);
//end npcbot
float totalValue = GetModifierValue(unitMod, TOTAL_VALUE);
float totalPct = addTotalPct ? GetModifierValue(unitMod, TOTAL_PCT) : 1.0f;
Expand Down

0 comments on commit a7a6065

Please sign in to comment.