Skip to content

Commit

Permalink
Nowar strategy: Removed redundant code.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r committed Nov 19, 2024
1 parent b27d5bc commit d57b764
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions playerbot/strategy/actions/CheckValuesAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,4 @@ bool CheckValuesAction::Execute(Event& event)
std::list<ObjectGuid> nfp = AI_VALUE(std::list<ObjectGuid>, "nearest friendly players");

return true;

if (ai->HasStrategy("nowar", BotState::BOT_STATE_NON_COMBAT))
{
ReputationMgr& mgr = bot->GetReputationMgr();
for (auto & faction : mgr.GetStateList())
{
uint32 factionId = faction.second.ID;
uint32 replistId = faction.first;

#ifndef MANGOSBOT_ONE
const FactionEntry* thisFactionEntry = sFactionStore.LookupEntry(factionId);
#else
const FactionEntry* thisFactionEntry = sFactionStore.LookupEntry<FactionEntry>(factionId);
#endif

if (!mgr.IsAtWar(factionId))
continue;

if (!thisFactionEntry)
continue;

if (bot->GetReputationMgr().GetRank(thisFactionEntry) > REP_HATED)
bot->GetReputationMgr().SetAtWar(replistId, false);
}
}

return true;
}

0 comments on commit d57b764

Please sign in to comment.