Skip to content

Commit

Permalink
NPCBots: Fix a regression from a8d4540
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer committed Oct 13, 2024
1 parent 9876fd7 commit 884c57f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13354,7 +13354,7 @@ float bot_ai::_getTotalBotStat(BotStatMods stat) const

uint8 lvl = me->GetLevel();
Stats fstat = STAT_STRENGTH;
UnitMods fmod = UNIT_MOD_STAT_STRENGTH;
UnitMods fmod = UNIT_MOD_END;
float fpct = 0.0f;
float fval = float(value);

Expand Down Expand Up @@ -13585,9 +13585,12 @@ float bot_ai::_getTotalBotStat(BotStatMods stat) const
break;
}

fpct += me->GetPctModifierValue(fmod, TOTAL_PCT);
fval *= fpct;
fval += me->GetTotalStatValue(fstat);
if (fmod != UNIT_MOD_END)
{
fpct += me->GetPctModifierValue(fmod, TOTAL_PCT);
fval *= fpct;
fval += me->GetTotalStatValue(fstat);
}
return fval;
}

Expand Down

0 comments on commit 884c57f

Please sign in to comment.