Skip to content

Commit

Permalink
0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
linkaixiang4883 committed Oct 3, 2022
1 parent 09fe7fe commit 98f0e5d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
8 changes: 7 additions & 1 deletion LKXMods.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ VisualStudioVersion = 17.3.32901.215
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LKXModsGongFaGridCost", "LKXModsGongFaGridCost\LKXModsGongFaGridCost.csproj", "{CBB708F7-9C6A-42FB-9C0F-DDE2BACEFA9E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LKXModsWarehouseAndBag", "LKXModsWarehouseAndBag\LKXModsWarehouseAndBag.csproj", "{5D52981A-65F9-48EF-9B7E-26E4A206E146}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LKXModsWarehouseAndBag", "LKXModsWarehouseAndBag\LKXModsWarehouseAndBag.csproj", "{5D52981A-65F9-48EF-9B7E-26E4A206E146}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LKXModsGongFaGridCostBackend", "LKXModsGongFaGridCostBackend\LKXModsGongFaGridCostBackend.csproj", "{D754DC98-DA6D-4312-920B-252A4FFE3558}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -21,6 +23,10 @@ Global
{5D52981A-65F9-48EF-9B7E-26E4A206E146}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5D52981A-65F9-48EF-9B7E-26E4A206E146}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5D52981A-65F9-48EF-9B7E-26E4A206E146}.Release|Any CPU.Build.0 = Release|Any CPU
{D754DC98-DA6D-4312-920B-252A4FFE3558}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D754DC98-DA6D-4312-920B-252A4FFE3558}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D754DC98-DA6D-4312-920B-252A4FFE3558}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D754DC98-DA6D-4312-920B-252A4FFE3558}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
12 changes: 12 additions & 0 deletions LKXModsGongFaGridCost/LKXModsGongFaGridCost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,22 @@
<HintPath>E:\SteamLibrary\steamapps\common\The Scroll Of Taiwu\The Scroll of Taiwu_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:\SteamLibrary\steamapps\common\The Scroll Of Taiwu\The Scroll of Taiwu_Data\Managed\Newtonsoft.Json.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="TaiwuModdingLib">
<HintPath>E:\SteamLibrary\steamapps\common\The Scroll Of Taiwu\The Scroll of Taiwu_Data\Managed\TaiwuModdingLib.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine">
<HintPath>E:\SteamLibrary\steamapps\common\The Scroll Of Taiwu\The Scroll of Taiwu_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>E:\SteamLibrary\steamapps\common\The Scroll Of Taiwu\The Scroll of Taiwu_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
3 changes: 2 additions & 1 deletion LKXModsGongFaGridCost/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using HarmonyLib;
using System.Collections.Generic;
using TaiwuModdingLib.Core.Plugin;
using UnityEngine;

namespace LKXModsGongFaGridCost
{
Expand Down Expand Up @@ -45,7 +46,7 @@ public override void Initialize()
/// </summary>
/// <param name="____dataArray"></param>
[HarmonyPostfix, HarmonyPatch(typeof(CombatSkill), "GetAllKeys")]
public static void PatchSkill(ref List<CombatSkillItem> ____dataArray)
public static void CombatSkill_Patch(ref List<CombatSkillItem> ____dataArray)
{
if (Loaded)
{
Expand Down
11 changes: 4 additions & 7 deletions LKXModsGongFaGridCostBackend/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,28 @@ public override void Dispose()
public override void Initialize()
{
harmony = Harmony.CreateAndPatchAll(typeof(Run));
AdaptableLog.Info("测试1");
CombatSkill.Instance.GetAllKeys();
}

/// <summary>
/// patch功法修改
/// 功法格子
/// </summary>
/// <param name="__instance"></param>
/// <param name="__result"></param>
/// <param name="____dataArray"></param>
[HarmonyPostfix, HarmonyPatch(typeof(CombatSkill), "GetAllKeys")]
public static void CombatSkill_GetAllKeys_Patch(CombatSkill __instance, ref List<CombatSkillItem> ____dataArray)
{
if (Loaded)
{
return;
}
AdaptableLog.Info("测试2");
foreach (CombatSkillItem item in ____dataArray)
{
AdaptableLog.Info(item.Name + ":" + item.GridCost + "-" + item.GenericGrid);
/*typeof(CombatSkillItem).GetField("GridCost").SetValue(item, (sbyte)1);
typeof(CombatSkillItem).GetField("GridCost").SetValue(item, (sbyte)1);
if (item.Type == GameData.Domains.CombatSkill.CombatSkillType.Neigong)
{
typeof(CombatSkillItem).GetField("GenericGrid").SetValue(item, (sbyte)12);
}*/
}
}

Loaded = true;
Expand Down

0 comments on commit 98f0e5d

Please sign in to comment.