diff options
Diffstat (limited to 'src/command.cpp')
-rw-r--r-- | src/command.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/command.cpp b/src/command.cpp index 4b6335744..7bf1b8cba 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -668,3 +668,14 @@ callb_err: ClearStorageChanges(false); return false; } + + +CommandCost CommandCost::AddCost(CommandCost ret) +{ + this->AddCost(ret.cost); + if (this->success && !ret.success) { + this->message = ret.message; + this->success = false; + } + return *this; +} |