Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
davidonete committed Nov 2, 2023
1 parent fde657b commit ba0bcd2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions playerbot/strategy/actions/UseItemAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ namespace ai

bool Execute(Event& event) override
{
// Check the chance of using a potion
const bool shouldUsePotion = ai->IsInPvp() || frand(0.0f, 1.0f) < sPlayerbotAIConfig.usePotionChance;
// Check the chance of using a potion (only in pvp)
const bool shouldUsePotion = !ai->IsInPvp() || frand(0.0f, 1.0f) < sPlayerbotAIConfig.usePotionChance;
if (shouldUsePotion)
{
return UseItemIdAction::Execute(event);
Expand Down Expand Up @@ -216,8 +216,8 @@ namespace ai

bool Execute(Event& event) override
{
// Check the chance of using a healthstone
const bool shouldUsePotion = ai->IsInPvp() || frand(0.0f, 1.0f) < sPlayerbotAIConfig.usePotionChance;
// Check the chance of using a healthstone (only in pvp)
const bool shouldUsePotion = !ai->IsInPvp() || frand(0.0f, 1.0f) < sPlayerbotAIConfig.usePotionChance;
if (shouldUsePotion)
{
return UseItemIdAction::Execute(event);
Expand Down

0 comments on commit ba0bcd2

Please sign in to comment.