Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete unnessesary methods #2657

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
254 changes: 0 additions & 254 deletions .Lib9c.Tests/Model/ItemNotificationTest.cs

This file was deleted.

56 changes: 0 additions & 56 deletions Lib9c/Model/Item/Inventory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
using Libplanet.Common;
using Libplanet.Crypto;
using Nekoyume.Action;
using Nekoyume.Battle;
using Nekoyume.Extensions;
using Nekoyume.Model.State;
using Nekoyume.TableData;
using Serilog;

namespace Nekoyume.Model.Item
Expand Down Expand Up @@ -956,59 +953,6 @@ e.item is ITradableFungibleItem tradableFungibleItem &&

#endregion

public bool HasNotification(
int level,
long blockIndex,
ItemRequirementSheet requirementSheet,
EquipmentItemRecipeSheet recipeSheet,
EquipmentItemSubRecipeSheetV2 subRecipeSheet,
EquipmentItemOptionSheet itemOptionSheet)
{
var availableSlots = UnlockHelper.GetAvailableEquipmentSlots(level);

foreach (var (type, slotCount) in availableSlots)
{
var equipments = Equipments
.Where(e =>
e.ItemSubType == type &&
e.RequiredBlockIndex <= blockIndex)
.ToList();
var current = equipments.Where(e => e.equipped).ToList();
// When an equipment slot is empty.
if (current.Count < Math.Min(equipments.Count, slotCount))
{
return true;
}

// When any other equipments are stronger than current one.
foreach (var equipment in equipments)
{
if (equipment.equipped)
{
continue;
}

var cp = CPHelper.GetCP(equipment);
foreach (var i in current)
{
var requirementLevel = i.GetRequirementLevel(
requirementSheet,
recipeSheet,
subRecipeSheet,
itemOptionSheet);


if (level >= requirementLevel && CPHelper.GetCP(i) < cp)
{
return true;
}
}
}
}

return false;
}

public ITradableItem SellItem(Guid tradableId, long blockIndex, int count)
{
if (TryGetTradableItems(tradableId, blockIndex, count, out List<Item> items))
Expand Down
47 changes: 0 additions & 47 deletions Lib9c/TableData/UnlockHelper.cs

This file was deleted.

Loading