修復傷害字型載入異常

This commit is contained in:
Elem8100 2022-11-02 18:19:53 +08:00 committed by GitHub
parent 7a64e3fe1d
commit 3fea0e5fed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1323 additions and 1303 deletions

View File

@ -1532,6 +1532,8 @@ void LoadFamiliar()
void LoadDamageSkin()
{
Bitmap Icon = null, Sample = null;
Bitmap bb = new Bitmap(20, 20);
foreach (var Iter in GetNode("String/Consume.img").Nodes)
{
var Name = Iter.GetValue2("name", "");
@ -1545,11 +1547,20 @@ void LoadDamageSkin()
var Entry = GetNode("Item/Consume/" + imgs[i] + "/0" + Iter.Text + "/info/icon");
if (Entry != null)
Icon = Entry.ExtractPng();
Entry = GetNode("Item/Consume/" + imgs[i] + "/0" + Iter.Text + "/info/sample");
if(Entry != null)
Sample = Entry.ExtractPng();
var Entry2 = GetNode("Item/Consume/" + imgs[i] + "/0" + Iter.Text + "/info/sample");
if (Entry2 != null)
{
if (Entry2.GetNode("0") != null)
Sample = Entry2.GetNode("0").ExtractPng();
else
Sample = Entry2.ExtractPng();
}
}
var Desc = Iter.GetValue2("desc", "");
Grid.Rows.Add(ID, Icon, Name, Sample, Desc);
}
}
@ -2295,22 +2306,31 @@ void ShowMap(Wz_Node MapImg)
// this.mapRenderGame2.form.Visible = false;
this.mapRenderGame2.Dispose();
this.mapRenderGame2 = null;
}
else
{
this.mapRenderGame2 = new FrmMapRender2(img) { StringLinker = sl };
this.mapRenderGame2.Window.Title = "MapRender ";
this.mapRenderGame2.form.TopMost = true;
}
try
{
using (this.mapRenderGame2)
{
this.mapRenderGame2.Run();
}
}
finally
{
this.mapRenderGame2.Dispose();
// this.mapRenderGame2 = null;
}
}
@ -2352,8 +2372,8 @@ void CellClick(DataViewer DataGrid,DataGridViewCellEventArgs e)
var imgNode = GetNode("Map/Map/Map" + LeftStr(SelectID, 1)).FindNodeByPath(SelectID + ".img");
if (this.mapRenderGame2 != null)
{
this.mapRenderGame2.Dispose();
this.mapRenderGame2 = null;
// this.mapRenderGame2.Dispose();
// this.mapRenderGame2 = null;
}
ShowMap(imgNode);
if (imgNode != null)