Skip to content

Commit

Permalink
Playerbots: Move durability loss logic into bot method
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete committed Apr 8, 2024
1 parent b788607 commit 62636be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/game/Entities/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4741,6 +4741,15 @@ void Player::DurabilityLossAll(double percent, bool inventory)

void Player::DurabilityLoss(Item* item, double percent)
{
#ifdef ENABLE_PLAYERBOTS
PlayerbotAI* bot = GetPlayerbotAI();
if (bot)
{
bot->DurabilityLoss(item, percent);
return;
}
#endif

if (!item)
return;

Expand Down

0 comments on commit 62636be

Please sign in to comment.