protected override void Perform(BooterHelper.BootFile file, XmlDbRow row) { BooterHelper.DataBootFile careerFile = new BooterHelper.DataBootFile(file.ToString(), row.GetString("Careers"), false); if (!careerFile.IsValid) { BooterLogger.AddError(file.ToString() + ": Unknown Careers File " + row.GetString("Careers")); return; } BooterHelper.DataBootFile careerEventsFile = new BooterHelper.DataBootFile(careerFile.ToString(), row.GetString("CareerEvents"), false); if (careerEventsFile.IsValid) { foreach (Career career in CareerManager.CareerList) { XmlDbTable table3 = careerEventsFile.GetTable(career.Guid.ToString ()); if (table3 != null) { LoadCareerEvents(career, careerEventsFile, table3); } } } BooterHelper.DataBootTable table = new BooterHelper.DataBootTable(careerFile, "CareerList"); if (!table.IsValid) { BooterLogger.AddError(file.ToString() + ": No CareerList " + careerFile.ToString()); return; } table.Load(new CareerLoader(careerEventsFile).LoadCareer); }
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row) { BooterHelper.DataBootFile dataFile = file as BooterHelper.DataBootFile; if (dataFile == null) { return; } ParseSkillData(dataFile.Data, row, true); }
protected static bool LoadSocializingActionAvailability(BooterHelper.DataBootFile actionAvailability) { if (actionAvailability.GetTable("ActiveTopic") == null) { BooterLogger.AddError(actionAvailability + ": No ActiveTopic"); return(false); } SocialManager.ParseStcActionAvailability(actionAvailability.Data); SocialManager.ParseActiveTopic(actionAvailability.Data); return(true); }
protected override bool Perform(BooterHelper.BootFile file) { if (base.Perform(file)) return true; BooterHelper.DocumentBootFile docfile = file as BooterHelper.DocumentBootFile; if (docfile == null) return false; BooterHelper.DataBootFile availability = new BooterHelper.DataBootFile(file.ToString(), VersionStamp.sNamespace + ".SocializingActionAvailability", false); if (!availability.IsValid) { return false; } Load(docfile, availability); return true; }
protected static bool Load(BooterHelper.DocumentBootFile socialData, BooterHelper.DataBootFile actionAvailability) { bool result = true; if (!LoadSocialData(socialData)) { result = false; } if (!LoadSocializingActionAvailability(actionAvailability)) { result = false; } return(result); }
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row) { BooterHelper.DocumentBootFile socialData = new BooterHelper.DocumentBootFile(file.ToString(), row.GetString("SocialData"), false); if (!socialData.IsValid) { BooterLogger.AddTrace(file + ": No SocialData"); return; } BooterHelper.DataBootFile availability = new BooterHelper.DataBootFile(file.ToString(), row.GetString("SocializingActionAvailability"), false); if (!availability.IsValid) { BooterLogger.AddTrace(file + ": No SocializingActionAvailability"); return; } Load(socialData, availability); }
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row) { BooterHelper.DocumentBootFile socialData = new BooterHelper.DocumentBootFile(file.ToString(), row.GetString("SocialData"), false); if (!socialData.IsValid) { BooterLogger.AddTrace(file + ": No SocialData"); return; } BooterHelper.DataBootFile availability = new BooterHelper.DataBootFile(file.ToString(), row.GetString("SocializingActionAvailability"), false); if (!availability.IsValid) { BooterLogger.AddTrace(file + ": No SocializingActionAvailability"); return; } Load(socialData, availability); }
protected override bool Perform(BooterHelper.BootFile file) { if (base.Perform(file)) { return(true); } BooterHelper.DocumentBootFile docfile = file as BooterHelper.DocumentBootFile; if (docfile == null) { return(false); } BooterHelper.DataBootFile availability = new BooterHelper.DataBootFile(file.ToString(), VersionStamp.sNamespace + ".SocializingActionAvailability", false); if (!availability.IsValid) { return(false); } Load(docfile, availability); return(true); }
protected override void PerformFile(BooterHelper.BootFile file) { BooterHelper.DataBootFile dataFile = file as BooterHelper.DataBootFile; if (dataFile == null) { return; } if ((dataFile.GetTable("BuffList") == null) && (dataFile.GetTable("Buffs") == null)) { return; } try { BuffManager.ParseBuffData(dataFile.Data, true); } catch (Exception e) { Common.Exception(file.ToString(), e); BooterLogger.AddError(file + ": ParseBuffData Error"); } }
public CareerLoader(BooterHelper.DataBootFile careerEventsFile) { mCareerEventsFile = careerEventsFile; }
protected override void Perform(BooterHelper.BootFile file, XmlDbRow row) { BooterHelper.DataBootFile dataFile = file as BooterHelper.DataBootFile; if (dataFile == null) { return; } bool success = false; mIndex++; try { string methodName = row.GetString("Name"); if (string.IsNullOrEmpty(methodName)) { BooterLogger.AddError(file + " : Method " + mIndex + " Unnamed"); } else if (ScoringLookup.GetScoring(methodName, false) != null) { BooterLogger.AddError(methodName + " Name already in use"); return; } else { Type classType = row.GetClassType("FullClassName"); if (classType == null) { BooterLogger.AddError(methodName + " Unknown FullClassName: " + row.GetString("FullClassName")); } else { IListedScoringMethod scoring = null; try { scoring = classType.GetConstructor(new Type[0]).Invoke(new object[0]) as IListedScoringMethod; } catch { } if (scoring == null) { BooterLogger.AddError(methodName + ": Constructor Fail " + row.GetString("FullClassName")); } else { XmlDbTable scoringTable = dataFile.GetTable(methodName); if (scoringTable == null) { BooterLogger.AddError(methodName + ": Table Missing"); } else { if (scoring.Parse(row, scoringTable)) { BooterLogger.AddTrace("Added Scoring : " + methodName); ScoringLookup.AddScoring(methodName, scoring); success = true; } else { BooterLogger.AddError(methodName + ": Parsing Fail"); } } } } } } finally { if (!success) { foreach (string column in row.ColumnNames) { BooterLogger.AddError(column + "= " + row[column]); } } } }
public void ParseIntervals() { mIntervals = new List<SpeedInterval>(); BooterHelper.DataBootFile speedFile = new BooterHelper.DataBootFile("NRaas.RelativityTuning", "NRaas.RelativityTuning", false); if (!speedFile.IsValid) return; BooterHelper.DataBootTable table = new BooterHelper.DataBootTable(speedFile, "Speeds"); if (!table.IsValid) return; table.Load(Perform); mIntervals.Sort(new Comparison<SpeedInterval>(SpeedInterval.OnSort)); }