Skip to content

Commit

Permalink
CharacterFloatInfo-1.3.3
Browse files Browse the repository at this point in the history
修正编译错误,优化代码
  • Loading branch information
sth4nothing committed Dec 1, 2018
1 parent 8850155 commit c647487
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
27 changes: 9 additions & 18 deletions CharacterFloatInfo/CharacterFloatInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -448,39 +448,30 @@ public static string SetMoneyText(int actorId)
public static int GetActorScore(int actorId) // 生平遺惠
{
if (!DateFile.instance.actorGetScore.ContainsKey(actorId)) return 0;
List<int> list = new List<int>(DateFile.instance.actorGetScore[actorId].Keys);
int[] array = new int[7];
for (int i = 0; i < list.Count; i++)
foreach (var num2 in DateFile.instance.actorGetScore[actorId].Keys)
{
int num2 = list[i];
if (num2 != 0)
{
Dictionary<int, int> dictionary = new Dictionary<int, int>();
for (int j = 0; j < DateFile.instance.actorGetScore[actorId][num2].Count; j++)
foreach (var array2 in DateFile.instance.actorGetScore[actorId][num2])
{
int num3 = DateFile.instance.actorGetScore[actorId][num2][j][0];
int num4 = DateFile.instance.actorGetScore[actorId][num2][j][1];
if (dictionary.ContainsKey(num3))
if (dictionary.ContainsKey(array2[0]))
{
Dictionary<int, int> dictionary2;
int key;
(dictionary2 = dictionary)[key = num3] = dictionary2[key] + num4;
dictionary[array2[0]] += array2[1];
}
else
{
dictionary.Add(num3, num4);
dictionary[array2[0]] = array2[1];
}
}
List<int> list2 = new List<int>(dictionary.Keys);
for (int k = 0; k < list2.Count; k++)
foreach (var key2 in dictionary.Keys)
{
int key2 = list2[k];
int num5 = int.Parse(DateFile.instance.scoreValueDate[key2][3]);
int num6 = 100;
string[] array3 = DateFile.instance.scoreValueDate[key2][4].Split('|');
for (int l = 0; l < array3.Length; l++)
foreach (var str in DateFile.instance.scoreValueDate[key2][4].Split('|'))
{
switch (int.Parse(array3[l]))
switch (int.Parse(str))
{
case 1:
num6 += DateFile.instance.enemyBorn * DateFile.instance.enemyBorn * 40;
Expand All @@ -501,7 +492,7 @@ public static int GetActorScore(int actorId) // 生平遺惠
}
}
}
return array[0] + array[1] + array[2] + array[3] + array[4] + array[5] + array[6];
return array.Sum();
}

//标题栏
Expand Down
2 changes: 1 addition & 1 deletion CharacterFloatInfo/Info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Id": "CharacterFloatInfo",
"DisplayName": "人物浮动信息",
"Author": "Vallind",
"Version": "1.3.2",
"Version": "1.3.3",
"AssemblyName": "CharacterFloatInfo.dll",
"EntryMethod": "CharacterFloatInfo.Main.Load"
}

2 comments on commit c647487

@sth4nothing
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

@HY-Leung
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 謝謝你。
明白了,目標就是要把 https://travis-ci.org/phorcys/Taiwu_mods 內不要出現error / warning, 學習了
-2018-12-01- 4 06 36

Please sign in to comment.