// ------------------------------------------------------------------------------- // Load // ------------------------------------------------------------------------------- public override void Load(BaseDataTable data) { syncStatus.Clear(); for (int i = 0; i < data.Rows.Count; ++i) { TemplateStatus tmpl; if (DataManager.dictStatus.TryGetValue(data.GetIdHash(i), out tmpl)) { SStatus sStatus = new SStatus(tmpl.GetId, data.GetLongAsInt(DatabaseManager.fieldLevel, i), data.GetDouble(DatabaseManager.fieldDuration, i)); syncStatus.Add(sStatus); } else { Debug.LogWarning("Skipped template '" + data.GetString(DatabaseManager.fieldName) + "' as it was not found in Library."); } } data.Cleanup(); }