public void LoadFromStreamExtended_Old1802(EraDataReader reader) { Dictionary <string, string> strDic = reader.ReadStringExtended(); Dictionary <string, Int64> intDic = reader.ReadInt64Extended(); Dictionary <string, List <string> > strListDic = reader.ReadStringArrayExtended(); Dictionary <string, List <Int64> > intListDic = reader.ReadInt64ArrayExtended(); List <VariableCode> codeList = null; string sfound = null; long lfound = 0; List <string> listfound = null; List <long> listlongfound = null; codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__STRING__); foreach (VariableCode code in codeList) { if (strDic.TryGetValue(code.ToString(), out sfound)) { dataString[(int)VariableCode.__LOWERCASE__ & (int)code] = sfound; } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__INTEGER__); foreach (VariableCode code in codeList) { if (intDic.TryGetValue(code.ToString(), out lfound)) { dataInteger[(int)VariableCode.__LOWERCASE__ & (int)code] = lfound; } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ | VariableCode.__STRING__); foreach (VariableCode code in codeList) { if (strListDic.TryGetValue(code.ToString(), out listfound)) { copyListToArray(listfound, dataStringArray[(int)VariableCode.__LOWERCASE__ & (int)code]); } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ | VariableCode.__INTEGER__); foreach (VariableCode code in codeList) { if (intListDic.TryGetValue(code.ToString(), out listlongfound)) { copyListToArray(listlongfound, dataIntegerArray[(int)VariableCode.__LOWERCASE__ & (int)code]); } } }
public void LoadFromStreamExtended_Old1802(EraDataReader reader) { var strDic = reader.ReadStringExtended(); var intDic = reader.ReadInt64Extended(); var strListDic = reader.ReadStringArrayExtended(); var intListDic = reader.ReadInt64ArrayExtended(); List <VariableCode> codeList = null; codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__STRING__); foreach (var code in codeList) { if (strDic.ContainsKey(code.ToString())) { DataString[(int)VariableCode.__LOWERCASE__ & (int)code] = strDic[code.ToString()]; } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__INTEGER__); foreach (var code in codeList) { if (intDic.ContainsKey(code.ToString())) { DataInteger[(int)VariableCode.__LOWERCASE__ & (int)code] = intDic[code.ToString()]; } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ | VariableCode.__STRING__); foreach (var code in codeList) { if (strListDic.ContainsKey(code.ToString())) { copyListToArray(strListDic[code.ToString()], DataStringArray[(int)VariableCode.__LOWERCASE__ & (int)code]); } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ | VariableCode.__INTEGER__); foreach (var code in codeList) { if (intListDic.ContainsKey(code.ToString())) { copyListToArray(intListDic[code.ToString()], DataIntegerArray[(int)VariableCode.__LOWERCASE__ & (int)code]); } } }
public void LoadFromStream(EraDataReader reader) { for (int i = 0; i < strCount; i++) { dataString[i] = reader.ReadString(); } for (int i = 0; i < intCount; i++) { dataInteger[i] = reader.ReadInt64(); } for (int i = 0; i < intArrayCount; i++) { reader.ReadInt64Array(dataIntegerArray[i]); } for (int i = 0; i < strArrayCount; i++) { reader.ReadStringArray(dataStringArray[i]); } }
public void LoadFromStreamExtended(EraDataReader reader) { Dictionary <string, string> strDic = reader.ReadStringExtended(); Dictionary <string, Int64> intDic = reader.ReadInt64Extended(); Dictionary <string, List <string> > strListDic = reader.ReadStringArrayExtended(); Dictionary <string, List <Int64> > intListDic = reader.ReadInt64ArrayExtended(); Dictionary <string, List <string[]> > str2DListDic = reader.ReadStringArray2DExtended(); Dictionary <string, List <Int64[]> > int2DListDic = reader.ReadInt64Array2DExtended(); List <VariableCode> codeList = null; codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__STRING__); foreach (VariableCode code in codeList) { if (strDic.ContainsKey(code.ToString())) { dataString[(int)VariableCode.__LOWERCASE__ & (int)code] = strDic[code.ToString()]; } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__INTEGER__); foreach (VariableCode code in codeList) { if (intDic.ContainsKey(code.ToString())) { dataInteger[(int)VariableCode.__LOWERCASE__ & (int)code] = intDic[code.ToString()]; } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ | VariableCode.__STRING__); foreach (VariableCode code in codeList) { if (strListDic.ContainsKey(code.ToString())) { copyListToArray(strListDic[code.ToString()], dataStringArray[(int)VariableCode.__LOWERCASE__ & (int)code]); } } codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_1D__ | VariableCode.__INTEGER__); foreach (VariableCode code in codeList) { if (intListDic.ContainsKey(code.ToString())) { copyListToArray(intListDic[code.ToString()], dataIntegerArray[(int)VariableCode.__LOWERCASE__ & (int)code]); } } //dataStringArray2D codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_2D__ | VariableCode.__STRING__); foreach (VariableCode code in codeList) { if (int2DListDic.ContainsKey(code.ToString())) { copyListToArray2D(str2DListDic[code.ToString()], dataStringArray2D[(int)VariableCode.__LOWERCASE__ & (int)code]); } } //dataIntegerArray2D codeList = VariableIdentifier.GetExtSaveList(VariableCode.__CHARACTER_DATA__ | VariableCode.__ARRAY_2D__ | VariableCode.__INTEGER__); foreach (VariableCode code in codeList) { if (int2DListDic.ContainsKey(code.ToString())) { copyListToArray2D(int2DListDic[code.ToString()], dataIntegerArray2D[(int)VariableCode.__LOWERCASE__ & (int)code]); } } }