Changed [modify_turns] to work as the wiki says.
This commit is contained in:
parent
c6fa989643
commit
9d042d87da
1 changed files with 3 additions and 3 deletions
|
@ -497,11 +497,11 @@ bool event_handler::handle_event_command(const queued_event& event_info,
|
|||
}
|
||||
else if(cmd == "modify_turns") {
|
||||
const std::string& value = cfg["value"];
|
||||
const bool modify = cfg["add"] != "yes";
|
||||
const std::string& add = cfg["add"];
|
||||
|
||||
wassert(status_ptr != NULL);
|
||||
if(modify) {
|
||||
status_ptr->modify_turns(value);
|
||||
if(add != "") {
|
||||
status_ptr->modify_turns(add);
|
||||
} else {
|
||||
status_ptr->add_turns(lexical_cast_default<int>(value,0));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue