Fix whitespace

Convert to tabs and remove trailing whitespace
This commit is contained in:
TheMatt2
2022-01-15 14:02:14 -05:00
parent 4ff84e0730
commit 9dfa401b27
8 changed files with 108 additions and 108 deletions

View File

@@ -16,18 +16,18 @@
std::map<uint32_t, Precondition*> Preconditions::cache = {};
Precondition::Precondition(const uint32_t condition) {
auto query = CDClientDatabase::CreatePreppedStmt(
"SELECT type, targetLOT, targetCount FROM Preconditions WHERE id = ?;");
auto query = CDClientDatabase::CreatePreppedStmt(
"SELECT type, targetLOT, targetCount FROM Preconditions WHERE id = ?;");
query.bind(1, (int) condition);
auto result = query.execQuery();
auto result = query.execQuery();
if (result.eof())
{
this->type = PreconditionType::ItemEquipped;
this->count = 1;
this->values = { 0 };
Game::logger->Log("Precondition", "Failed to find precondition of id (%i)!\n", condition);
return;
@@ -98,11 +98,11 @@ bool Precondition::Check(Entity* player, bool evaluateCosts) const
}
auto passedAny = false;
for (const auto value : values)
{
const auto passed = CheckValue(player, value, evaluateCosts);
if (passed && any)
{
return true;
@@ -221,7 +221,7 @@ PreconditionExpression::PreconditionExpression(const std::string& conditions)
return;
}
std::stringstream a;
std::stringstream b;
@@ -309,16 +309,16 @@ bool PreconditionExpression::Check(Entity* player, bool evaluateCosts) const
{
return true;
}
const auto a = Preconditions::Check(player, condition, evaluateCosts);
if (!a)
{
GameMessages::SendNotifyClientFailedPrecondition(player->GetObjectID(), player->GetSystemAddress(), u"", condition);
}
const auto b = next == nullptr ? true : next->Check(player);
return m_or ? a || b : a && b;
}