MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / SetVariableToByID

Method SetVariableToByID

src/Ext/Scenario/Body.cpp:10–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8bool ScenarioExt::CellParsed = false;
9
10void ScenarioExt::ExtData::SetVariableToByID(bool bIsGlobal, int nIndex, char bState)
11{
12 auto& dict = Global()->Variables[bIsGlobal];
13
14 auto itr = dict.find(nIndex);
15
16 if (itr != dict.end() && itr->second.Value != bState)
17 {
18 itr->second.Value = bState;
19 ScenarioClass::Instance->VariablesChanged = true;
20 if (!bIsGlobal)
21 TagClass::NotifyLocalChanged(nIndex);
22 else
23 TagClass::NotifyGlobalChanged(nIndex);
24 }
25}
26
27void ScenarioExt::ExtData::GetVariableStateByID(bool bIsGlobal, int nIndex, char* pOut)
28{

Callers 1

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected