Skip to content

Commit

Permalink
restore Summon.HasNotification
Browse files Browse the repository at this point in the history
  • Loading branch information
sonohoshi committed Nov 22, 2024
1 parent 7d49010 commit dc8d3ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nekoyume/Assets/_Scripts/UI/Widget/CombinationMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private void UpdateNotification()
}

// summon
// summonNotificationImage.enabled = Summon.HasNotification;
summonNotificationImage.enabled = Summon.HasNotification;

// custom craft
customCraftNotificationImage.enabled = CustomCraft.HasNotification;
Expand Down
18 changes: 18 additions & 0 deletions nekoyume/Assets/_Scripts/UI/Widget/Summon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,24 @@ public class SummonObject
private readonly List<IDisposable> _disposables = new();
private int _selectedSummonCount = 10;

public static bool HasNotification
{
get
{
var result = false;
var equipmentSummonSheet = Game.Game.instance.TableSheets.EquipmentSummonSheet;
var runeSummonSheet = Game.Game.instance.TableSheets.RuneSummonSheet;
foreach (var summonRow in equipmentSummonSheet.Values.Concat(runeSummonSheet.Values))
{
var costType = (CostType)summonRow.CostMaterial;
var cost = summonRow.CostMaterialCount;
result |= SimpleCostButton.CheckCostOfType(costType, cost);
}

return result;
}
}

protected override void Awake()
{
infoButton.OnClickAsObservable()
Expand Down

0 comments on commit dc8d3ba

Please sign in to comment.