| 1009 | |
| 1010 | template<bool IsGlobal, class _Pr> |
| 1011 | void ScriptExt::VariableOperationHandler(TeamClass* pTeam, int nVariable, int Number) |
| 1012 | { |
| 1013 | auto itr = ScenarioExt::Global()->Variables[IsGlobal].find(nVariable); |
| 1014 | |
| 1015 | if (itr != ScenarioExt::Global()->Variables[IsGlobal].end()) |
| 1016 | { |
| 1017 | itr->second.Value = _Pr()(itr->second.Value, Number); |
| 1018 | if (IsGlobal) |
| 1019 | TagClass::NotifyGlobalChanged(nVariable); |
| 1020 | else |
| 1021 | TagClass::NotifyLocalChanged(nVariable); |
| 1022 | } |
| 1023 | |
| 1024 | pTeam->StepCompleted = true; |
| 1025 | } |
| 1026 | |
| 1027 | template<bool IsSrcGlobal, bool IsGlobal, class _Pr> |
| 1028 | void ScriptExt::VariableBinaryOperationHandler(TeamClass* pTeam, int nVariable, int nVarToOperate) |