diff --git a/.Lib9c.Tests/Action/ItemEnhancementTest.cs b/.Lib9c.Tests/Action/ItemEnhancementTest.cs index 7bf9e0d824..a5883993fd 100644 --- a/.Lib9c.Tests/Action/ItemEnhancementTest.cs +++ b/.Lib9c.Tests/Action/ItemEnhancementTest.cs @@ -432,7 +432,7 @@ public void Execute_With_Hammer(bool oldStart) _avatarState.inventory.AddItem( ItemFactory.CreateMaterial(_tableSheets.MaterialItemSheet[hammerId]), 3); - var hammerExp = Equipment.GetHammerExp(hammerId, _tableSheets.EnhancementCostSheetV3) * 3; + var hammerExp = _tableSheets.EnhancementCostSheetV3.GetHammerExp(hammerId) * 3; var result = new CombinationConsumable5.ResultModel() { diff --git a/.Lib9c.Tests/Model/Item/EquipmentTest.cs b/.Lib9c.Tests/Model/Item/EquipmentTest.cs index e40e560db2..78c8c28b24 100644 --- a/.Lib9c.Tests/Model/Item/EquipmentTest.cs +++ b/.Lib9c.Tests/Model/Item/EquipmentTest.cs @@ -83,7 +83,7 @@ public void GetHammerExp() { var id = costRow.Id; Assert.True(costRow.Exp > 0L); - Assert.Equal(costRow.Exp, Equipment.GetHammerExp(id, costSheet)); + Assert.Equal(costRow.Exp, costSheet.GetHammerExp(id)); } } } diff --git a/Lib9c/Action/ItemEnhancement.cs b/Lib9c/Action/ItemEnhancement.cs index 26bae16d55..ab726465aa 100644 --- a/Lib9c/Action/ItemEnhancement.cs +++ b/Lib9c/Action/ItemEnhancement.cs @@ -336,7 +336,7 @@ public override IWorld Execute(IActionContext context) { if (avatarState.inventory.RemoveMaterial(hammerId, context.BlockIndex, hammerCount)) { - var exp = Equipment.GetHammerExp(hammerId, enhancementCostSheet); + var exp = enhancementCostSheet.GetHammerExp(hammerId); hammerExp += exp * hammerCount; } else diff --git a/Lib9c/Model/Item/Equipment.cs b/Lib9c/Model/Item/Equipment.cs index a8b02be9b6..3e0493f98a 100644 --- a/Lib9c/Model/Item/Equipment.cs +++ b/Lib9c/Model/Item/Equipment.cs @@ -222,11 +222,6 @@ public long GetRealExp(EquipmentItemSheet itemSheet, EnhancementCostSheetV3 cost r.Level == level).Exp; } - public static long GetHammerExp(int hammerId, EnhancementCostSheetV3 costSheet) - { - return costSheet[hammerId].Exp; - } - public List GetOptions() { var options = new List(); diff --git a/Lib9c/TableData/Cost/EnhancementCostSheetV3.cs b/Lib9c/TableData/Cost/EnhancementCostSheetV3.cs index b4834bc9f9..903b1b36f0 100644 --- a/Lib9c/TableData/Cost/EnhancementCostSheetV3.cs +++ b/Lib9c/TableData/Cost/EnhancementCostSheetV3.cs @@ -38,5 +38,10 @@ public override void Set(IReadOnlyList fields) public EnhancementCostSheetV3() : base(nameof(EnhancementCostSheetV2)) { } + + public long GetHammerExp(int hammerId) + { + return this[hammerId].Exp; + } } }