public override void SaveUnitName(string name) { short idx = BitConverter.ToInt16(this.Data, 2); if (PkdFile.AbilityText.Count > idx) { GGCRTblFile txtFile = new GGCRTblFile(GGCRStaticConfig.AbilityTxtFile); List <string> list = txtFile.ListAllText(); if (list.Count > idx) { list[idx] = name; txtFile.Save(list); PkdFile.ReloadAbilityText(); } } }
public static Dictionary <short, string> ListSeriesCode() { Dictionary <short, string> dic = new Dictionary <short, string>(); List <string> names = new GGCRTblFile(GGCRStaticConfig.PATH + @"\language\" + GGCRStaticConfig.Language + @"\MiscData.tbl").ListAllText(); GGCRPkdFile misc = new GGCRPkdFile(GGCRStaticConfig.PATH + @"\resident\MiscData.pkd"); int idx = misc.GetInnerFile("SeriesList.cdb").StartIndex; int count = BitConverter.ToInt32(misc.Data, idx + 8); for (int i = 0; i < count; i++) { short groupId = BitConverter.ToInt16(misc.Data, idx + 12 + i * GGCRStaticConfig.SeriesLength); dic.Add(groupId, names[i]); } return(dic); }
public override void Save() { string tmp = tempRemark; this.tempRemark = null; if (tmp != null && tmp != RemarkDetail) { GGCRTblFile txtFile = new GGCRTblFile(GGCRStaticConfig.AbilityTxtFile); List <string> list = txtFile.ListAllText(); if (list.Count > this.RemarkId) { list[this.RemarkId] = tmp; txtFile.Save(list); PkdFile.ReloadAbilityText(); } } base.Save(); }
public FrmEditText(string file) { InitializeComponent(); this.tblFile = new GGCRTblFile(file); tsmiFile.Text = tblFile.FileName; }