Add Gadget(zh-cn only)!!

Update Spawns page, Subdivided monster types
This commit is contained in:
2022-10-29 21:10:03 +08:00
parent 8d42ddee10
commit aa075f5f91
31 changed files with 22301 additions and 5829 deletions

View File

@@ -16,6 +16,8 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
**/
using System.Collections.Generic;
using GrasscutterTools.Properties;
namespace GrasscutterTools.Game
@@ -24,7 +26,6 @@ namespace GrasscutterTools.Game
{
public static void LoadResources()
{
Animals = new ItemMap(Resources.Animal);
Artifacts = new ItemMap(Resources.Artifact);
ArtifactCats = new ItemMap(Resources.ArtifactCat);
ArtifactMainAttribution = new ItemMap(Resources.ArtifactMainAttribution);
@@ -32,8 +33,8 @@ namespace GrasscutterTools.Game
Avatars = new ItemMap(Resources.Avatar);
AvatarColors = new ItemMap(Resources.AvatarColor);
Items = new ItemMap(Resources.Item);
Monsters = new ItemMap(Resources.Monster);
//NPCs = new ItemMap(Resources.NPC);
Monsters = new ItemMapGroup(Resources.Monsters);
Gatgets = new ItemMapGroup(Resources.Gadget);
Scenes = new ItemMap(Resources.Scene);
Weapons = new ItemMap(Resources.Weapon);
WeaponColors = new ItemMap(Resources.WeaponColor);
@@ -41,7 +42,6 @@ namespace GrasscutterTools.Game
Quests = new ItemMap(Resources.Quest);
}
public static ItemMap Animals { get; private set; }
public static ItemMap Artifacts { get; private set; }
@@ -57,9 +57,9 @@ namespace GrasscutterTools.Game
public static ItemMap Items { get; private set; }
public static ItemMap Monsters { get; private set; }
public static ItemMapGroup Monsters { get; private set; }
//public static ItemMap NPCs { get; private set; }
public static ItemMapGroup Gatgets { get; private set; }
public static ItemMap Scenes { get; private set; }

View File

@@ -0,0 +1,48 @@
using System.Collections.Generic;
using System.Linq;
namespace GrasscutterTools.Game
{
/// <summary>
/// ID映射组Key为分类双斜杠构造
/// </summary>
public class ItemMapGroup : Dictionary<string, ItemMap>
{
public ItemMapGroup(string idNamePairs)
{
for (int i = 0; i < idNamePairs.Length;)
{
var categoryLineStartIndex = idNamePairs.IndexOf("//", i);
if (categoryLineStartIndex == -1)
break;
var categoryLineEndIndex = idNamePairs.IndexOf('\n', categoryLineStartIndex);
if (categoryLineEndIndex == -1)
break;
var category = idNamePairs.Substring(categoryLineStartIndex+2, categoryLineEndIndex - categoryLineStartIndex - 3).Trim();
var nextStartIndex = idNamePairs.IndexOf("//", categoryLineEndIndex);
if (nextStartIndex == -1)
{
var itemMap = new ItemMap(idNamePairs.Substring(categoryLineEndIndex + 1));
if (itemMap.Count > 0)
Add(category, itemMap);
break;
}
else
{
var pairs = idNamePairs.Substring(categoryLineEndIndex + 1, nextStartIndex - categoryLineEndIndex - 1);
var itemMap = new ItemMap(pairs);
if (itemMap.Count > 0)
Add(category, itemMap);
i = nextStartIndex;
}
}
}
/// <summary>
/// 获取所有行
/// </summary>
public IEnumerable<string> AllLines => Values.SelectMany(it => it.Lines);
}
}

View File

@@ -0,0 +1,24 @@
namespace GrasscutterTools.Game.Player
{
/// <summary>
/// 玩家数据
/// </summary>
internal class PlayerData
{
/// <summary>
/// 升到下一级所需经验,索引为当前等级
/// </summary>
public static int[] LevelExp = new int[]
{
0, 375, 500, 625, 725, 850, 950, 1075, 1200, 1300, 1425, 1525, 1650, 1775, 1875, 2000, 2375, 2500, 2625,
2775, 2825, 3425, 3725, 4000, 4300, 4575, 4875, 5150, 5450, 5725, 6025, 6300, 6600, 6900, 7175, 7475, 7750,
8050, 8325, 8625, 10550, 11525, 12475, 13450, 14400, 15350, 16325, 17275, 18250, 19200, 26400, 28800, 31200,
33600, 36000, 232350, 258950, 285750, 312825, 340125, 0,
};
/// <summary>
/// 玩家最大等级数
/// </summary>
public const int PlayerMaxLevel = 60;
}
}