Skip to content

Commit

Permalink
chore: fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyupe committed Oct 22, 2024
1 parent 0b37ced commit b3a2ae5
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
8 changes: 3 additions & 5 deletions Cafe.Matcha.Packer/Program.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// <copyright file="Program.cs" company="FFCafe">
// Copyright (c) FFCafe. All rights reserved.
// Copyright (c) FFCafe. All rights reserved.
// Licensed under the AGPL-3.0 license. See LICENSE file in the project root for full license information.
// </copyright>

namespace Cafe.Matcha.Packer
{
Expand Down Expand Up @@ -30,7 +28,8 @@ private static void GenerateAssembly()
namespace Cafe.Matcha
{
partial class Data {
public partial class Data
{
public const string Version = ""{0}"";
}
}
Expand Down Expand Up @@ -85,6 +84,5 @@ private static void Main(string[] args)
Bundle(env);
}
}

}
}
4 changes: 1 addition & 3 deletions Cafe.Matcha.Packer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// <copyright file="AssemblyInfo.cs" company="FFCafe">
// Copyright (c) FFCafe. All rights reserved.
// Copyright (c) FFCafe. All rights reserved.
// Licensed under the AGPL-3.0 license. See LICENSE file in the project root for full license information.
// </copyright>

using System.Reflection;
using System.Runtime.InteropServices;
Expand Down
4 changes: 2 additions & 2 deletions Cafe.Matcha/Network/State.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ private void Fate_OnChanged(uint id, FateState state)
private void Fate_OnRemoved(uint id, FateState state)
{
// Emit only on progress=100 or expired
if (state.Progress == 100 || isFateNearEnd(state))
if (state.Progress == 100 || IsFateNearEnd(state))
{
state.Progress = -1;
fateTelemetry.Send(id, state);
}
}

private bool isFateNearEnd(FateState state)
private bool IsFateNearEnd(FateState state)
{
if (state.StartTime == 0 || state.Duration == 0)
{
Expand Down
4 changes: 4 additions & 0 deletions Cafe.Matcha/Network/Structures/MarketBoardCurrentOfferings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public static MarketBoardCurrentOfferings Read(byte[] data)
};

if (materiaEntry.MateriaId != 0)
{
materiaList.Add(materiaEntry);
}
}

listingEntry.Materia = materiaList;
Expand All @@ -97,7 +99,9 @@ public static MarketBoardCurrentOfferings Read(byte[] data)
reader.ReadBytes(0x4); // Padding

if (listingEntry.CatalogId != 0)
{
listings.Add(listingEntry);
}
}

output.InternalItemListings = listings;
Expand Down
4 changes: 2 additions & 2 deletions Cafe.Matcha/Telemetry/Npc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace Cafe.Matcha.Telemetry
using Cafe.Matcha.Utils;
using Newtonsoft.Json;

class NpcDTO : Models.TelemetryData
internal class NpcDTO : Models.TelemetryData
{
public NpcDTO(uint id, Network.NpcState state) : base()
{
Expand Down Expand Up @@ -145,7 +145,7 @@ public override bool TryMerge(TelemetryData data)
}
}

class Npc : TelemetryWorker<NpcDTO>
internal class Npc : TelemetryWorker<NpcDTO>
{
public Npc() : base(Constant.Secret.TelemetryNpc) { }

Expand Down
1 change: 1 addition & 0 deletions Cafe.Matcha/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ public string World
}
}
}

public ListBindingTarget<Models.Template> Templates { get; set; } = Data.Instance.Templates != null ? new ListBindingTarget<Models.Template>(Data.Instance.Templates) : null;
public Models.Template SelectedTemplate { get; set; } = null;
public ListBindingTarget<FateTreeNodeWithChildren> Fates { get; set; } = FateTreeNodeWithChildren.Create(null);
Expand Down
2 changes: 1 addition & 1 deletion Cafe.Matcha/Views/MainControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ private bool ShouldSendNotice(BaseDTO dto)
notifiedDynamicEvent.Remove(deDto.Event);
return false;
}

default:
return false;
}
Expand Down Expand Up @@ -353,7 +354,6 @@ private void BSettingInstTest_Click(object sender, RoutedEventArgs e)
}
}


private void BSettingSetTemplate_Click(object sender, RoutedEventArgs e)
{
var template = ViewModel.SelectedTemplate;
Expand Down

0 comments on commit b3a2ae5

Please sign in to comment.