mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-08-02 16:59:14 +08:00
Clean up all code
This commit is contained in:
parent
434ec7b2df
commit
2a8cebcbb5
@ -24,7 +24,7 @@ using GrasscutterTools.Utils;
|
|||||||
|
|
||||||
namespace GrasscutterTools.DispatchServer
|
namespace GrasscutterTools.DispatchServer
|
||||||
{
|
{
|
||||||
public static class DispatchServerAPI
|
internal static class DispatchServerAPI
|
||||||
{
|
{
|
||||||
public static async Task<ServerStatus> QueryServerStatus(string host)
|
public static async Task<ServerStatus> QueryServerStatus(string host)
|
||||||
{
|
{
|
||||||
|
@ -21,7 +21,7 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace GrasscutterTools.DispatchServer.Model
|
namespace GrasscutterTools.DispatchServer.Model
|
||||||
{
|
{
|
||||||
public class ServerStatus
|
internal class ServerStatus
|
||||||
{
|
{
|
||||||
[JsonProperty("playerCount")]
|
[JsonProperty("playerCount")]
|
||||||
public int PlayerCount { get; set; }
|
public int PlayerCount { get; set; }
|
||||||
@ -33,7 +33,7 @@ namespace GrasscutterTools.DispatchServer.Model
|
|||||||
public string Version { get; set; }
|
public string Version { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ServerStatusResponse
|
internal class ServerStatusResponse
|
||||||
{
|
{
|
||||||
[JsonProperty("retcode")]
|
[JsonProperty("retcode")]
|
||||||
public int RetCode { get; set; }
|
public int RetCode { get; set; }
|
||||||
|
@ -26,7 +26,7 @@ namespace GrasscutterTools.GOOD
|
|||||||
/// Doc: https://frzyc.github.io/genshin-optimizer/#/doc
|
/// Doc: https://frzyc.github.io/genshin-optimizer/#/doc
|
||||||
/// Modified from https://github.com/Andrewthe13th/Inventory_Kamera/blob/master/InventoryKamera/game/Artifact.cs
|
/// Modified from https://github.com/Andrewthe13th/Inventory_Kamera/blob/master/InventoryKamera/game/Artifact.cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Artifact
|
internal class Artifact
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// e.g. "GladiatorsFinale"
|
/// e.g. "GladiatorsFinale"
|
||||||
|
@ -26,7 +26,7 @@ namespace GrasscutterTools.GOOD
|
|||||||
/// Doc: https://frzyc.github.io/genshin-optimizer/#/doc
|
/// Doc: https://frzyc.github.io/genshin-optimizer/#/doc
|
||||||
/// Modified from https://github.com/Andrewthe13th/Inventory_Kamera/blob/master/InventoryKamera/game/Character.cs
|
/// Modified from https://github.com/Andrewthe13th/Inventory_Kamera/blob/master/InventoryKamera/game/Character.cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Character
|
internal class Character
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// e.g. "Rosaria"
|
/// e.g. "Rosaria"
|
||||||
|
@ -38,7 +38,7 @@ namespace GrasscutterTools.GOOD
|
|||||||
/// https://genshin.mingyulab.com/
|
/// https://genshin.mingyulab.com/
|
||||||
/// https://genshin-center.com/
|
/// https://genshin-center.com/
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GOOD
|
internal class GOOD
|
||||||
{
|
{
|
||||||
[JsonProperty("format")]
|
[JsonProperty("format")]
|
||||||
public string Format { get; set; }
|
public string Format { get; set; }
|
||||||
|
@ -26,7 +26,7 @@ using GrasscutterTools.Properties;
|
|||||||
|
|
||||||
namespace GrasscutterTools.GOOD
|
namespace GrasscutterTools.GOOD
|
||||||
{
|
{
|
||||||
public static class GOODData
|
internal static class GOODData
|
||||||
{
|
{
|
||||||
static GOODData()
|
static GOODData()
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,7 @@ namespace GrasscutterTools.GOOD
|
|||||||
/// Doc: https://frzyc.github.io/genshin-optimizer/#/doc
|
/// Doc: https://frzyc.github.io/genshin-optimizer/#/doc
|
||||||
/// Modified from https://github.com/Andrewthe13th/Inventory_Kamera/blob/master/InventoryKamera/game/Weapon.cs
|
/// Modified from https://github.com/Andrewthe13th/Inventory_Kamera/blob/master/InventoryKamera/game/Weapon.cs
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Weapon
|
internal class Weapon
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// e.g. "CrescentPike"
|
/// e.g. "CrescentPike"
|
||||||
|
@ -24,7 +24,7 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Game.Activity
|
namespace GrasscutterTools.Game.Activity
|
||||||
{
|
{
|
||||||
public class ActivityConfigItem
|
internal class ActivityConfigItem
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 活动ID
|
/// 活动ID
|
||||||
|
@ -1,4 +1,23 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
@ -10,4 +29,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
|
|
||||||
public bool IsUsed => !IsDisuse;
|
public bool IsUsed => !IsDisuse;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,23 @@
|
|||||||
using GrasscutterTools.Game.Props;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using GrasscutterTools.Game.Props;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
@ -11,4 +30,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("qualityType"), JsonConverter(typeof(StringEnumConverter))]
|
[JsonProperty("qualityType"), JsonConverter(typeof(StringEnumConverter))]
|
||||||
public QualityType QualityType { get; set; }
|
public QualityType QualityType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,23 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
@ -8,4 +27,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("sceneId")]
|
[JsonProperty("sceneId")]
|
||||||
public int SceneId { get; set; }
|
public int SceneId { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,21 @@
|
|||||||
using System;
|
/**
|
||||||
using System.Collections.Generic;
|
* Grasscutter Tools
|
||||||
using System.Linq;
|
* Copyright (C) 2023 jie65535
|
||||||
using System.Text;
|
*
|
||||||
using System.Threading.Tasks;
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
@ -10,4 +23,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
internal class GadgetData
|
internal class GadgetData
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,23 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
@ -11,4 +30,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("bgmNameTextMapHash")]
|
[JsonProperty("bgmNameTextMapHash")]
|
||||||
public long BgmNameTextMapHash { get; set; }
|
public long BgmNameTextMapHash { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,26 @@
|
|||||||
namespace GrasscutterTools.Game.Data.Excels
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
[ResourceType("HomeWorldFurnitureExcelConfigData.json")]
|
[ResourceType("HomeWorldFurnitureExcelConfigData.json")]
|
||||||
internal class HomeWorldFurnitureData : GameResource
|
internal class HomeWorldFurnitureData : GameResource
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,21 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
@ -6,4 +23,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
internal class MainQuestData : GameResource
|
internal class MainQuestData : GameResource
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,24 @@
|
|||||||
using System.Collections.Generic;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
using GrasscutterTools.Game.Inventory;
|
using GrasscutterTools.Game.Inventory;
|
||||||
using GrasscutterTools.Game.Props;
|
using GrasscutterTools.Game.Props;
|
||||||
|
|
||||||
@ -19,4 +39,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("itemUse")]
|
[JsonProperty("itemUse")]
|
||||||
public List<ItemUseData> ItemUse { get; set; }
|
public List<ItemUseData> ItemUse { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,24 @@
|
|||||||
using GrasscutterTools.Game.Props;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using GrasscutterTools.Game.Props;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
@ -12,4 +32,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("type")]
|
[JsonProperty("type")]
|
||||||
public MonsterType Type { get; set; }
|
public MonsterType Type { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,23 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
@ -14,4 +33,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("order")]
|
[JsonProperty("order")]
|
||||||
public int Order { get; set; }
|
public int Order { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,26 @@
|
|||||||
namespace GrasscutterTools.Game.Data.Excels
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
[ResourceType("ReliquaryExcelConfigData.json")]
|
[ResourceType("ReliquaryExcelConfigData.json")]
|
||||||
internal class ReliquaryData : GameResource
|
internal class ReliquaryData : GameResource
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,24 @@
|
|||||||
using GrasscutterTools.Game.Props;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using GrasscutterTools.Game.Props;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
@ -12,4 +32,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("scriptData")]
|
[JsonProperty("scriptData")]
|
||||||
public string ScriptData { get; set; }
|
public string ScriptData { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,23 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data.Excels
|
namespace GrasscutterTools.Game.Data.Excels
|
||||||
{
|
{
|
||||||
@ -8,4 +27,4 @@ namespace GrasscutterTools.Game.Data.Excels
|
|||||||
[JsonProperty("rankLevel")]
|
[JsonProperty("rankLevel")]
|
||||||
public int RankLevel { get; set; }
|
public int RankLevel { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,23 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data
|
namespace GrasscutterTools.Game.Data
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,23 @@
|
|||||||
using System;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
@ -6,10 +25,10 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
|
||||||
using GrasscutterTools.Game.Data.Excels;
|
using GrasscutterTools.Game.Data.Excels;
|
||||||
using GrasscutterTools.Game.Inventory;
|
using GrasscutterTools.Game.Inventory;
|
||||||
using GrasscutterTools.Game.Props;
|
using GrasscutterTools.Game.Props;
|
||||||
using GrasscutterTools.GOOD;
|
|
||||||
using GrasscutterTools.Utils;
|
using GrasscutterTools.Utils;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@ -27,7 +46,7 @@ namespace GrasscutterTools.Game.Data
|
|||||||
public Dictionary<int, DungeonData> DungeonData { get; set; }
|
public Dictionary<int, DungeonData> DungeonData { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, HomeWorldFurnitureData> HomeWorldFurnitureData { get; set; }
|
public Dictionary<int, HomeWorldFurnitureData> HomeWorldFurnitureData { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, MainQuestData> MainQuestData { get; set; }
|
public Dictionary<int, MainQuestData> MainQuestData { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, QuestData> QuestData { get; set; }
|
public Dictionary<int, QuestData> QuestData { get; set; }
|
||||||
@ -37,15 +56,13 @@ namespace GrasscutterTools.Game.Data
|
|||||||
public Dictionary<int, MonsterData> MonsterData { get; set; }
|
public Dictionary<int, MonsterData> MonsterData { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, ReliquaryData> ReliquaryData { get; set; }
|
public Dictionary<int, ReliquaryData> ReliquaryData { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, SceneData> SceneData { get; set; }
|
public Dictionary<int, SceneData> SceneData { get; set; }
|
||||||
|
|
||||||
public Dictionary<int, WeaponData> WeaponData { get; set; }
|
public Dictionary<int, WeaponData> WeaponData { get; set; }
|
||||||
|
|
||||||
public TextMapData TextMapData { get; set; }
|
public TextMapData TextMapData { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public GameResources(string resourcesDirPath, TextMapData textMapData)
|
public GameResources(string resourcesDirPath, TextMapData textMapData)
|
||||||
{
|
{
|
||||||
TextMapData = textMapData;
|
TextMapData = textMapData;
|
||||||
@ -63,7 +80,6 @@ namespace GrasscutterTools.Game.Data
|
|||||||
property.SetValue(this, data, null);
|
property.SetValue(this, data, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var illegalWeaponIds = new SparseSet(
|
var illegalWeaponIds = new SparseSet(
|
||||||
"10000-10008, 11411, 11506-11508, 12505, 12506, 12508, 12509," +
|
"10000-10008, 11411, 11506-11508, 12505, 12506, 12508, 12509," +
|
||||||
"13503, 13506, 14411, 14503, 14508, 15504-15506, 20001");
|
"13503, 13506, 14411, 14503, 14508, 15504-15506, 20001");
|
||||||
@ -110,8 +126,8 @@ namespace GrasscutterTools.Game.Data
|
|||||||
{
|
{
|
||||||
["zh-cn"] = "TextMapCHS",
|
["zh-cn"] = "TextMapCHS",
|
||||||
["zh-tw"] = "TextMapCHT",
|
["zh-tw"] = "TextMapCHT",
|
||||||
["en-us"] = "TextMapEN",
|
["en-us"] = "TextMapEN",
|
||||||
["ru-ru"] = "TextMapRU",
|
["ru-ru"] = "TextMapRU",
|
||||||
};
|
};
|
||||||
|
|
||||||
public void ConvertResources(string projectResourcesDir)
|
public void ConvertResources(string projectResourcesDir)
|
||||||
@ -195,7 +211,6 @@ namespace GrasscutterTools.Game.Data
|
|||||||
|
|
||||||
File.WriteAllText(Path.Combine(dir, "Item.txt"), sb.ToString(), Encoding.UTF8);
|
File.WriteAllText(Path.Combine(dir, "Item.txt"), sb.ToString(), Encoding.UTF8);
|
||||||
|
|
||||||
|
|
||||||
sb.Clear();
|
sb.Clear();
|
||||||
foreach (var monsterType in MonsterData.Values.OrderBy(it => it.Id)
|
foreach (var monsterType in MonsterData.Values.OrderBy(it => it.Id)
|
||||||
.GroupBy(it => it.Type)
|
.GroupBy(it => it.Type)
|
||||||
@ -247,7 +262,6 @@ namespace GrasscutterTools.Game.Data
|
|||||||
sb.ToString(),
|
sb.ToString(),
|
||||||
Encoding.UTF8);
|
Encoding.UTF8);
|
||||||
|
|
||||||
|
|
||||||
sb.Clear();
|
sb.Clear();
|
||||||
foreach (var it in DungeonData.Values)
|
foreach (var it in DungeonData.Values)
|
||||||
{
|
{
|
||||||
@ -275,7 +289,6 @@ namespace GrasscutterTools.Game.Data
|
|||||||
Encoding.UTF8);
|
Encoding.UTF8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
File.WriteAllLines(
|
File.WriteAllLines(
|
||||||
Path.Combine(projectResourcesDir, "AvatarColor.txt"),
|
Path.Combine(projectResourcesDir, "AvatarColor.txt"),
|
||||||
AvatarData.Values.Select(it => $"{it.Id % 1000 + 1000}:{(int)it.QualityType}"),
|
AvatarData.Values.Select(it => $"{it.Id % 1000 + 1000}:{(int)it.QualityType}"),
|
||||||
@ -285,7 +298,6 @@ namespace GrasscutterTools.Game.Data
|
|||||||
Path.Combine(projectResourcesDir, "WeaponColor.txt"),
|
Path.Combine(projectResourcesDir, "WeaponColor.txt"),
|
||||||
WeaponData.Values.Select(it => $"{it.Id}:{(it.RankLevel >= 5 ? "yellow" : it.RankLevel >= 4 ? "purple" : "blue")}"),
|
WeaponData.Values.Select(it => $"{it.Id}:{(it.RankLevel >= 5 ? "yellow" : it.RankLevel >= 4 ? "purple" : "blue")}"),
|
||||||
Encoding.UTF8);
|
Encoding.UTF8);
|
||||||
|
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
@ -293,4 +305,4 @@ namespace GrasscutterTools.Game.Data
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,9 +1,28 @@
|
|||||||
using System;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Data
|
namespace GrasscutterTools.Game.Data
|
||||||
{
|
{
|
||||||
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
||||||
public class ResourceTypeAttribute : Attribute
|
internal class ResourceTypeAttribute : Attribute
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
@ -12,4 +31,4 @@ namespace GrasscutterTools.Game.Data
|
|||||||
Name = name;
|
Name = name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,7 +28,7 @@ namespace GrasscutterTools.Game.Gacha
|
|||||||
/// 使用这个只需替换掉你原来的的data/banner.json文件,
|
/// 使用这个只需替换掉你原来的的data/banner.json文件,
|
||||||
/// 然后重启服务器和客户端,即可享受全卡池抽卡,卡池的选择方式是点击左右箭头进行切换
|
/// 然后重启服务器和客户端,即可享受全卡池抽卡,卡池的选择方式是点击左右箭头进行切换
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GachaBanner
|
internal class GachaBanner
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加卡池请从400开始增加id数值进行添加,这个id需要每个池子不一样,
|
/// 添加卡池请从400开始增加id数值进行添加,这个id需要每个池子不一样,
|
||||||
|
@ -25,7 +25,7 @@ namespace GrasscutterTools.Game.Gacha
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://github.com/Grasscutters/Grasscutter/pull/639
|
/// https://github.com/Grasscutters/Grasscutter/pull/639
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GachaBanner2
|
internal class GachaBanner2
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加卡池请从400开始增加id数值进行添加,这个id需要每个池子不一样,
|
/// 添加卡池请从400开始增加id数值进行添加,这个id需要每个池子不一样,
|
||||||
|
@ -28,7 +28,7 @@ namespace GrasscutterTools.Game.Gacha
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://github.com/Grasscutters/Grasscutter/pull/639
|
/// https://github.com/Grasscutters/Grasscutter/pull/639
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GachaBanner3
|
internal class GachaBanner3
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 备注
|
/// 备注
|
||||||
|
@ -22,7 +22,7 @@ using System.Text;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Game
|
namespace GrasscutterTools.Game
|
||||||
{
|
{
|
||||||
public class GameCommand
|
internal class GameCommand
|
||||||
{
|
{
|
||||||
public GameCommand(string name, string command)
|
public GameCommand(string name, string command)
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Game
|
namespace GrasscutterTools.Game
|
||||||
{
|
{
|
||||||
public class ItemMap
|
internal class ItemMap
|
||||||
{
|
{
|
||||||
public ItemMap(string idNamePairs)
|
public ItemMap(string idNamePairs)
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@ namespace GrasscutterTools.Game
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// ID映射组,Key为分类,双斜杠构造
|
/// ID映射组,Key为分类,双斜杠构造
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ItemMapGroup : Dictionary<string, ItemMap>
|
internal class ItemMapGroup : Dictionary<string, ItemMap>
|
||||||
{
|
{
|
||||||
public ItemMapGroup(string idNamePairs)
|
public ItemMapGroup(string idNamePairs)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ namespace GrasscutterTools.Game.Mail
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 邮件
|
/// 邮件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Mail
|
internal class Mail
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 发件人
|
/// 发件人
|
||||||
|
@ -1,4 +1,23 @@
|
|||||||
using Newtonsoft.Json;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Props
|
namespace GrasscutterTools.Game.Props
|
||||||
{
|
{
|
||||||
@ -7,4 +26,4 @@ namespace GrasscutterTools.Game.Props
|
|||||||
[JsonProperty("useParam")]
|
[JsonProperty("useParam")]
|
||||||
public string[] UseParam { get; set; }
|
public string[] UseParam { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -19,7 +37,6 @@ namespace GrasscutterTools.Game.Props
|
|||||||
MONSTER_PARTNER = 6,
|
MONSTER_PARTNER = 6,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal static class ItemTypeExtension
|
internal static class ItemTypeExtension
|
||||||
{
|
{
|
||||||
private static readonly Dictionary<MonsterType, string> TextMapCHS = new Dictionary<MonsterType, string>
|
private static readonly Dictionary<MonsterType, string> TextMapCHS = new Dictionary<MonsterType, string>
|
||||||
@ -32,6 +49,7 @@ namespace GrasscutterTools.Game.Props
|
|||||||
[MonsterType.MONSTER_FISH] = "鱼",
|
[MonsterType.MONSTER_FISH] = "鱼",
|
||||||
[MonsterType.MONSTER_PARTNER] = "友军",
|
[MonsterType.MONSTER_PARTNER] = "友军",
|
||||||
};
|
};
|
||||||
|
|
||||||
private static readonly Dictionary<MonsterType, string> TextMapEN = new Dictionary<MonsterType, string>
|
private static readonly Dictionary<MonsterType, string> TextMapEN = new Dictionary<MonsterType, string>
|
||||||
{
|
{
|
||||||
[MonsterType.MONSTER_NONE] = "None",
|
[MonsterType.MONSTER_NONE] = "None",
|
||||||
@ -48,4 +66,4 @@ namespace GrasscutterTools.Game.Props
|
|||||||
return language.StartsWith("zh") ? TextMapCHS[materialType] : TextMapEN[materialType];
|
return language.StartsWith("zh") ? TextMapCHS[materialType] : TextMapEN[materialType];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Props
|
namespace GrasscutterTools.Game.Props
|
||||||
@ -41,4 +59,4 @@ namespace GrasscutterTools.Game.Props
|
|||||||
//QUALITY_ORANGE_SP = 105,
|
//QUALITY_ORANGE_SP = 105,
|
||||||
QUALITY_ORANGE_SP = 5,
|
QUALITY_ORANGE_SP = 5,
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
// ReSharper disable InconsistentNaming
|
||||||
|
|
||||||
namespace GrasscutterTools.Game.Props
|
namespace GrasscutterTools.Game.Props
|
||||||
@ -13,4 +31,4 @@ namespace GrasscutterTools.Game.Props
|
|||||||
SCENE_HOME_ROOM = 5,
|
SCENE_HOME_ROOM = 5,
|
||||||
SCENE_ACTIVITY = 6,
|
SCENE_ACTIVITY = 6,
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -25,7 +25,7 @@ using Newtonsoft.Json.Converters;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Game.Shop
|
namespace GrasscutterTools.Game.Shop
|
||||||
{
|
{
|
||||||
public class ShopGoodsData
|
internal class ShopGoodsData
|
||||||
{
|
{
|
||||||
[JsonProperty("goodsId")]
|
[JsonProperty("goodsId")]
|
||||||
public int GoodsId { get; set; }
|
public int GoodsId { get; set; }
|
||||||
|
@ -26,7 +26,7 @@ using Newtonsoft.Json.Converters;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Game.Shop
|
namespace GrasscutterTools.Game.Shop
|
||||||
{
|
{
|
||||||
public class ShopInfo
|
internal class ShopInfo
|
||||||
{
|
{
|
||||||
public ShopInfo()
|
public ShopInfo()
|
||||||
{
|
{
|
||||||
|
@ -23,7 +23,7 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Game.Shop
|
namespace GrasscutterTools.Game.Shop
|
||||||
{
|
{
|
||||||
public class ShopTable
|
internal class ShopTable
|
||||||
{
|
{
|
||||||
[JsonProperty("shopId")]
|
[JsonProperty("shopId")]
|
||||||
public int ShopType { get; set; }
|
public int ShopType { get; set; }
|
||||||
|
@ -26,7 +26,7 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Game
|
namespace GrasscutterTools.Game
|
||||||
{
|
{
|
||||||
public class TextMapData
|
internal class TextMapData
|
||||||
{
|
{
|
||||||
public TextMapData(string resourcesDirPath)
|
public TextMapData(string resourcesDirPath)
|
||||||
{
|
{
|
||||||
|
@ -665,6 +665,7 @@
|
|||||||
<DependentUpon>Resources.resx</DependentUpon>
|
<DependentUpon>Resources.resx</DependentUpon>
|
||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<None Include="GrasscutterTools.licenseheader" />
|
||||||
<None Include="GrasscutterTools.snk" />
|
<None Include="GrasscutterTools.snk" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
|
19
Source/GrasscutterTools/GrasscutterTools.licenseheader
Normal file
19
Source/GrasscutterTools/GrasscutterTools.licenseheader
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
extensions: .cs
|
||||||
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
@ -26,7 +26,7 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace GrasscutterTools.OpenCommand
|
namespace GrasscutterTools.OpenCommand
|
||||||
{
|
{
|
||||||
public class OpenCommandAPI
|
internal class OpenCommandAPI
|
||||||
{
|
{
|
||||||
public OpenCommandAPI(string host, string token = "")
|
public OpenCommandAPI(string host, string token = "")
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,23 @@
|
|||||||
using System;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -9,7 +28,6 @@ using GrasscutterTools.Game;
|
|||||||
using GrasscutterTools.Game.Activity;
|
using GrasscutterTools.Game.Activity;
|
||||||
using GrasscutterTools.Game.CutScene;
|
using GrasscutterTools.Game.CutScene;
|
||||||
using GrasscutterTools.Game.Data;
|
using GrasscutterTools.Game.Data;
|
||||||
using GrasscutterTools.Game.Dungeon;
|
|
||||||
using GrasscutterTools.Properties;
|
using GrasscutterTools.Properties;
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
@ -122,10 +140,6 @@ namespace GrasscutterTools.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private TextMapData TextMapData;
|
private TextMapData TextMapData;
|
||||||
private GameResources GameResources;
|
private GameResources GameResources;
|
||||||
|
|
||||||
@ -134,7 +148,7 @@ namespace GrasscutterTools.Pages
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!CheckInputPaths()) return;
|
if (!CheckInputPaths()) return;
|
||||||
|
|
||||||
if (TextMapData == null)
|
if (TextMapData == null)
|
||||||
TextMapData = new TextMapData(TxtGcResRoot.Text);
|
TextMapData = new TextMapData(TxtGcResRoot.Text);
|
||||||
if (GameResources == null)
|
if (GameResources == null)
|
||||||
@ -149,13 +163,6 @@ namespace GrasscutterTools.Pages
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void BtnUpdateActivity_Click(object sender, EventArgs e)
|
private void BtnUpdateActivity_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -208,6 +215,5 @@ namespace GrasscutterTools.Pages
|
|||||||
// activityItems.Select(it => $"{it.ActivityId}:{TextMapData.GetText(it.NameTextMapHash)}"),
|
// activityItems.Select(it => $"{it.ActivityId}:{TextMapData.GetText(it.NameTextMapHash)}"),
|
||||||
// Encoding.UTF8);
|
// Encoding.UTF8);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -24,7 +24,7 @@ using System.Windows.Forms;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Utils
|
namespace GrasscutterTools.Utils
|
||||||
{
|
{
|
||||||
public static class AppHotKey
|
internal static class AppHotKey
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 注册热键
|
/// 注册热键
|
||||||
|
@ -1,4 +1,23 @@
|
|||||||
using System;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
|
||||||
using GrasscutterTools.Game;
|
using GrasscutterTools.Game;
|
||||||
|
@ -25,7 +25,7 @@ namespace GrasscutterTools.Utils
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// <see cref="https://stackoverflow.com/a/17534263"/>
|
/// <see cref="https://stackoverflow.com/a/17534263"/>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GuiRedirect
|
internal class GuiRedirect
|
||||||
{
|
{
|
||||||
[DllImport("kernel32.dll", SetLastError = true)]
|
[DllImport("kernel32.dll", SetLastError = true)]
|
||||||
private static extern bool AttachConsole(int dwProcessId);
|
private static extern bool AttachConsole(int dwProcessId);
|
||||||
|
@ -24,7 +24,7 @@ namespace GrasscutterTools.Utils
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 热键项
|
/// 热键项
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class HotKeyItem
|
internal class HotKeyItem
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the hot key identifier.
|
/// Gets or sets the hot key identifier.
|
||||||
|
@ -27,7 +27,7 @@ using Newtonsoft.Json;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Utils
|
namespace GrasscutterTools.Utils
|
||||||
{
|
{
|
||||||
public static class HttpHelper
|
internal static class HttpHelper
|
||||||
{
|
{
|
||||||
public static readonly HttpClient HttpClient = new HttpClient
|
public static readonly HttpClient HttpClient = new HttpClient
|
||||||
{
|
{
|
||||||
|
@ -261,7 +261,7 @@ namespace GrasscutterTools.Utils
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 热键触发事件参数
|
/// 热键触发事件参数
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class HotKeyTriggerEventArgs
|
internal class HotKeyTriggerEventArgs
|
||||||
{
|
{
|
||||||
public HotKeyItem HotKeyItem { get; set; }
|
public HotKeyItem HotKeyItem { get; set; }
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ using System.Windows.Forms;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Utils
|
namespace GrasscutterTools.Utils
|
||||||
{
|
{
|
||||||
public static class Logger
|
internal static class Logger
|
||||||
{
|
{
|
||||||
public static bool IsSaveLogs = false;
|
public static bool IsSaveLogs = false;
|
||||||
|
|
||||||
|
@ -1,44 +1,65 @@
|
|||||||
using System;
|
/**
|
||||||
|
* Grasscutter Tools
|
||||||
|
* Copyright (C) 2023 jie65535
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as published
|
||||||
|
* by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
**/
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace GrasscutterTools.Utils
|
namespace GrasscutterTools.Utils
|
||||||
{
|
{
|
||||||
public class SparseSet
|
internal class SparseSet
|
||||||
{
|
{
|
||||||
private struct Range
|
private readonly struct Range
|
||||||
{
|
{
|
||||||
public int Min;
|
private readonly int Min;
|
||||||
public int Max;
|
private readonly int Max;
|
||||||
|
|
||||||
public Range(int min, int max)
|
public Range(int min, int max)
|
||||||
{
|
{
|
||||||
Min = min;
|
Min = min;
|
||||||
Max = max;
|
Max = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Check(int value) =>
|
public bool Check(int value) =>
|
||||||
Min <= value && value <= Max;
|
Min <= value && value <= Max;
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly List<Range> rangeEntries;
|
private readonly List<Range> RangeEntries;
|
||||||
private readonly HashSet<int> denseEntries;
|
private readonly HashSet<int> DenseEntries;
|
||||||
|
|
||||||
public SparseSet(string csv)
|
public SparseSet(string csv)
|
||||||
{
|
{
|
||||||
rangeEntries = new List<Range>();
|
RangeEntries = new List<Range>();
|
||||||
denseEntries = new HashSet<int>();
|
DenseEntries = new HashSet<int>();
|
||||||
foreach (var token in csv.Replace("\n", "").Replace(" ", "").Split(','))
|
foreach (var token in csv.Replace("\n", "").Replace(" ", "").Split(','))
|
||||||
{
|
{
|
||||||
var tokens = token.Split('-');
|
var tokens = token.Split('-');
|
||||||
switch (tokens.Length)
|
switch (tokens.Length)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
denseEntries.Add(int.Parse(tokens[0]));
|
DenseEntries.Add(int.Parse(tokens[0]));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
rangeEntries.Add(new Range(int.Parse(tokens[0]), int.Parse(tokens[1])));
|
RangeEntries.Add(new Range(int.Parse(tokens[0]), int.Parse(tokens[1])));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new ArgumentException($"Invalid token passed to SparseSet initializer - {token} (split length {tokens.Length})");
|
throw new ArgumentException($"Invalid token passed to SparseSet initializer - {token} (split length {tokens.Length})");
|
||||||
}
|
}
|
||||||
@ -47,10 +68,7 @@ namespace GrasscutterTools.Utils
|
|||||||
|
|
||||||
public bool Contains(int i)
|
public bool Contains(int i)
|
||||||
{
|
{
|
||||||
foreach (var range in rangeEntries)
|
return RangeEntries.Any(range => range.Check(i)) || DenseEntries.Contains(i);
|
||||||
if (range.Check(i))
|
|
||||||
return true;
|
|
||||||
return denseEntries.Contains(i);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,7 +8,7 @@ using GrasscutterTools.Properties;
|
|||||||
|
|
||||||
namespace GrasscutterTools.Utils
|
namespace GrasscutterTools.Utils
|
||||||
{
|
{
|
||||||
public static class UIUtil
|
internal static class UIUtil
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 播放按钮完成动画
|
/// 播放按钮完成动画
|
||||||
|
Loading…
Reference in New Issue
Block a user