Skip to content

Commit

Permalink
NPCBots: Fix build 1
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer committed Oct 31, 2024
1 parent 5d3e5b6 commit d44adde
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18794,7 +18794,7 @@ WanderNode const* bot_ai::GetNextWanderNode(Position const* fromPos, uint8 lvl,
llinks.push_back(&wpl);
}
if (llinks.size() > 1 && _travel_node_last && !_travel_node_cur->HasFlag(BotWPFlags::BOTWP_FLAG_CAN_BACKTRACK_FROM))
llinks.remove_if([=](WanderNodeLink const* wpl) { return wpl->wp == _travel_node_last; });
llinks.remove_if([this](WanderNodeLink const* wpl) { return wpl->wp == _travel_node_last; });
if (!llinks.empty())
{
WanderNodeLink const* wpl = llinks.size() == 1u ? llinks.front() : *Acore::Containers::SelectRandomWeightedContainerElement(llinks, LinkWeightExtractor());
Expand Down Expand Up @@ -18859,7 +18859,7 @@ WanderNode const* bot_ai::GetNextBGTravelNode() const
links.push_back(wpl);
}
if (links.size() > 1 && _travel_node_last && !curNode->HasFlag(BotWPFlags::BOTWP_FLAG_CAN_BACKTRACK_FROM))
links.remove_if([=](WanderNodeLink const& wpl) { return wpl.Id() == _travel_node_last->GetWPId(); });
links.remove_if([this](WanderNodeLink const& wpl) { return wpl.Id() == _travel_node_last->GetWPId(); });

BattlegroundAV* av = dynamic_cast<BattlegroundAV*>(bg);
// Above all: check conditions to rush final boss
Expand Down Expand Up @@ -19210,7 +19210,7 @@ WanderNode const* bot_ai::GetNextBGTravelNode() const
links.push_back(wpl);
}
if (links.size() > 1 && _travel_node_last && !curNode->HasFlag(BotWPFlags::BOTWP_FLAG_CAN_BACKTRACK_FROM))
links.remove_if([=](WanderNodeLink const& wpl) { return wpl.Id() == _travel_node_last->GetWPId(); });
links.remove_if([this](WanderNodeLink const& wpl) { return wpl.Id() == _travel_node_last->GetWPId(); });

BattlegroundWS* ws = dynamic_cast<BattlegroundWS*>(bg);

Expand Down
2 changes: 1 addition & 1 deletion src/server/game/AI/NpcBots/bot_rogue_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ class rogue_bot : public CreatureScript
if (mytar->IsControlledByPlayer() || me->GetHealthPct() < 25.f)
{
//Vanish (no GCD)
if (IsSpellReady(VANISH_1, diff, false) && !stealthed && !shadowdance && !IsTank() && Rand() < 45 && !me->HasAuraType(SPELL_AURA_PERIODIC_DAMAGE) || !IsFlagCarrier(me))
if (IsSpellReady(VANISH_1, diff, false) && !stealthed && !shadowdance && !IsTank() && Rand() < 45 && !me->HasAuraType(SPELL_AURA_PERIODIC_DAMAGE) && !IsFlagCarrier(me))
{
bool cast = false;
//case 1: restealth for opener
Expand Down

0 comments on commit d44adde

Please sign in to comment.