Skip to content

Commit

Permalink
MonsterCard Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagamia committed Aug 4, 2015
1 parent d7f2b4c commit 5a359c3
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 29 deletions.
4 changes: 2 additions & 2 deletions WzComparerR2.Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.50714")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.50804")]
1 change: 1 addition & 0 deletions WzComparerR2.MonsterCard/MobInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public MobInfo()
public bool DamagedByMob { get; set; }
public bool Invincible { get; set; }
public bool NotAttack { get; set; }
public int FixedDamage { get; set; }
public MobElemAttr ElemAttr { get; set; }

public int? Link { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions WzComparerR2.MonsterCard/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("WzComparerR2.MonsterCard")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Kagamia Studio")]
[assembly: AssemblyProduct("WzComparerR2.MonsterCard")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyCopyright("Copyright © 癫ω倒④ゞ 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -33,4 +33,4 @@
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.50804")]
6 changes: 5 additions & 1 deletion WzComparerR2.MonsterCard/UI/MobTooltipRender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public Bitmap Render(MobInfo mobInfo, Bitmap mobImg)
{
sbExt.Append("无法攻击 ");
}
if (mobInfo.FixedDamage > 0)
{
sbExt.Append("固定伤害" + mobInfo.FixedDamage + " ");
}

if (sbExt.Length > 1)
{
Expand Down Expand Up @@ -267,7 +271,7 @@ private string GetElemAttrResistString(ElemResistance resist)
{
case ElemResistance.Immune: e = "×"; break;
case ElemResistance.Resist: e = "△"; break;
case ElemResistance.Normal: e = ""; break;
case ElemResistance.Normal: e = ""; break;
case ElemResistance.Weak: e = "◎"; break;
}
return e ?? " ";
Expand Down
37 changes: 23 additions & 14 deletions WzComparerR2.MonsterCard/UI/MonsterCardForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ private void LoadMob(Wz_Node imgNode)
case "damagedByMob": mobInfo.DamagedByMob = node.GetValueEx<int>(0) != 0; break;
case "invincible": mobInfo.Invincible = node.GetValueEx<int>(0) != 0; break;
case "notAttack": mobInfo.NotAttack = node.GetValueEx<int>(0) != 0; break;
case "fixedDamage": mobInfo.FixedDamage = node.GetValueEx<int>(0); break;
case "elemAttr": mobInfo.ElemAttr = new MobElemAttr(node.GetValueEx<string>(null)); break;

case "link": mobInfo.Link = node.GetValueEx<int>(0); break;
Expand Down Expand Up @@ -330,7 +331,7 @@ private void ShowMobInfo()
return;
}
//基本信息
advTreeMobInfo.Nodes.Add(CreateNode("level", this.mobInfo.Level.ToString()));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("level", this.mobInfo.Level));
if (!string.IsNullOrEmpty(this.mobInfo.DefaultHP))
{
advTreeMobInfo.Nodes.Add(CreateNode("defaultHP", this.mobInfo.DefaultHP));
Expand All @@ -347,10 +348,10 @@ private void ShowMobInfo()
{
advTreeMobInfo.Nodes.Add(CreateNode("finalMaxMP", this.mobInfo.FinalMaxMP));
}
advTreeMobInfo.Nodes.Add(CreateNode("maxHP", this.mobInfo.MaxHP.ToString()));
advTreeMobInfo.Nodes.Add(CreateNode("maxMP", this.mobInfo.MaxMP.ToString()));
advTreeMobInfo.Nodes.Add(CreateNode("HPRecovery", this.mobInfo.HPRecovery.ToString()));
advTreeMobInfo.Nodes.Add(CreateNode("MPRecovery", this.mobInfo.MPRecovery.ToString()));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("maxHP", this.mobInfo.MaxHP));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("maxMP", this.mobInfo.MaxMP));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("HPRecovery", this.mobInfo.HPRecovery));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("MPRecovery", this.mobInfo.MPRecovery));
if (this.mobInfo.Speed == null && this.mobInfo.FlySpeed == null
&& !this.mobInfo.Animates.Contains("move") && !this.mobInfo.Animates.Contains("fly"))
{
Expand All @@ -360,22 +361,22 @@ private void ShowMobInfo()
{
if (this.mobInfo.Speed != null || this.mobInfo.Animates.Contains("move"))
{
advTreeMobInfo.Nodes.Add(CreateNode("speed", (this.mobInfo.Speed ?? 0).ToString()));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("speed", this.mobInfo.Speed ?? 0));
}
if (this.mobInfo.FlySpeed != null || this.mobInfo.Animates.Contains("fly"))
{
advTreeMobInfo.Nodes.Add(CreateNode("flySpeed", (this.mobInfo.FlySpeed ?? 0).ToString()));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("flySpeed", this.mobInfo.FlySpeed ?? 0));
}
}

advTreeMobInfo.Nodes.Add(CreateNode("PADamage", this.mobInfo.PADamage.ToString()));
advTreeMobInfo.Nodes.Add(CreateNode("MADamage", this.mobInfo.MADamage.ToString()));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("PADamage", this.mobInfo.PADamage));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("MADamage", this.mobInfo.MADamage));
advTreeMobInfo.Nodes.Add(CreateNode("PDRate", this.mobInfo.PDRate + "%"));
advTreeMobInfo.Nodes.Add(CreateNode("MDRate", this.mobInfo.MDRate + "%"));
advTreeMobInfo.Nodes.Add(CreateNode("Acc", this.mobInfo.Acc.ToString()));
advTreeMobInfo.Nodes.Add(CreateNode("Eva", this.mobInfo.Eva.ToString()));
advTreeMobInfo.Nodes.Add(CreateNode("KnockBack", this.mobInfo.Pushed.ToString()));
advTreeMobInfo.Nodes.Add(CreateNode("Exp", this.mobInfo.Exp.ToString()));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("Acc", this.mobInfo.Acc));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("Eva", this.mobInfo.Eva));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("KnockBack", this.mobInfo.Pushed));
advTreeMobInfo.Nodes.Add(CreateNodeWithValue("Exp", this.mobInfo.Exp));

Node treeNode;

Expand All @@ -389,7 +390,10 @@ private void ShowMobInfo()
treeNode.Nodes.Add(CreateNodeWithValue("只受怪物伤害(damagedByMob)", this.mobInfo.DamagedByMob));
treeNode.Nodes.Add(CreateNodeWithValue("无敌(Invincible)", this.mobInfo.Invincible));
treeNode.Nodes.Add(CreateNodeWithValue("无法攻击(NotAttack)", this.mobInfo.NotAttack));
treeNode.Expand();
if (this.mobInfo.FixedDamage > 0)
{
treeNode.Nodes.Add(CreateNodeWithValue("只受固定伤害(FixedDamage)", this.mobInfo.FixedDamage));
}
advTreeMobInfo.Nodes.Add(treeNode);


Expand Down Expand Up @@ -474,6 +478,11 @@ private Node CreateNodeWithValue(string propName, ElemResistance resist)
return node;
}

private Node CreateNodeWithValue(string propName, int value)
{
return CreateNode(propName, value.ToString());
}

private void ShowAnimes()
{
try
Expand Down
6 changes: 3 additions & 3 deletions WzComparerR2.PluginBase/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Kagamia Studio")]
[assembly: AssemblyProduct("WzComparerR2.PluginBase")]
[assembly: AssemblyCopyright("Copyright © 癫ω倒④ゞ 2013")]
[assembly: AssemblyCopyright("Copyright © 癫ω倒④ゞ 2013-2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: InternalsVisibleTo("WzComparerR2")]
Expand All @@ -33,5 +33,5 @@
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.41204")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.40804")]
6 changes: 3 additions & 3 deletions WzComparerR2.WzLib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Kagamia Studio")]
[assembly: AssemblyProduct("WzComparerR2.WzLib")]
[assembly: AssemblyCopyright("Copyright © 癫ω倒④ゞ 2013")]
[assembly: AssemblyCopyright("Copyright © 癫ω倒④ゞ 2013-2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.0")]
[assembly: AssemblyFileVersion("1.0.2.50714")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.2.50804")]
4 changes: 3 additions & 1 deletion WzComparerR2.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WzComparerR2", "WzComparerR2\WzComparerR2.csproj", "{5E883BE2-2009-4517-8026-4B90DEB83884}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CharaSimResource", "..\CharaSimResource\CharaSimResource.csproj", "{54797F38-A12C-4202-92A4-1A3DDCE914B7}"
Expand Down
24 changes: 24 additions & 0 deletions WzComparerR2/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.IO;

namespace WzComparerR2
{
Expand All @@ -11,6 +12,29 @@ static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Program.StartMainForm();
}

static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Exception ex = e.ExceptionObject as Exception;
if (ex != null)
{
string logFile = Path.Combine(Application.StartupPath, "error.log");
try
{
string content = DateTime.UtcNow.ToString() + "\r\n" + ex.ToString() + "\r\n";
File.AppendAllText(logFile, content);
}
catch
{
}
}
}

static void StartMainForm()
{
using (Form frm = new MainForm())
{
Application.Run(frm);
Expand Down
4 changes: 2 additions & 2 deletions WzComparerR2/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.4.0")]
[assembly: AssemblyFileVersion("1.0.4.50703")]
[assembly: AssemblyVersion("1.0.5.0")]
[assembly: AssemblyFileVersion("1.0.5.50804")]

0 comments on commit 5a359c3

Please sign in to comment.