mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-22 05:27:19 +00:00
Fix nested preconditions not evaluating costs (#618)
Fixed an issue with some builds that had preconditions not taking items from the players due to the evaluate costs parameter not being passed to nested conditions. Tested the build in Avant Gardens and it now correctly takes items from the player upon completion.
This commit is contained in:
parent
0734760d42
commit
22b2516107
@ -317,7 +317,7 @@ bool PreconditionExpression::Check(Entity* player, bool evaluateCosts) const
|
||||
GameMessages::SendNotifyClientFailedPrecondition(player->GetObjectID(), player->GetSystemAddress(), u"", condition);
|
||||
}
|
||||
|
||||
const auto b = next == nullptr ? true : next->Check(player);
|
||||
const auto b = next == nullptr ? true : next->Check(player, evaluateCosts);
|
||||
|
||||
return m_or ? a || b : a && b;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user