Skip to content

Commit ed3e357

Browse files
committed
Merge branch develop v1.5.0.3911-Stable
2 parents 3c399b2 + 158bf49 commit ed3e357

File tree

10 files changed

+175
-69
lines changed

10 files changed

+175
-69
lines changed

CURRENT_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.4.13.5419-Stable
1+
v1.5.0.3911-Stable

RELEASE_NOTES.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -609,4 +609,14 @@
609609
* [Minor] チャットログの話者の分解の精度を改善した
610610
</description>
611611
</note>
612+
613+
<note>
614+
<version>1.5.0.3911</version>
615+
<channel>Stable</channel>
616+
<timestamp>2021-09-09T11:13:28.5913948+09:00</timestamp>
617+
<uri>https://github.com/anoyetta/RINGS/releases/download/v1.5.0.3911-Stable/RINGS_v1_5_0_3911_Stable.zip</uri>
618+
<description>
619+
* [Major] Sharlayanを最新バージョンに更新した
620+
</description>
621+
</note>
612622
</release_notes>

source/RINGS/Controllers/SharlayanController.cs

Lines changed: 47 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Diagnostics;
4-
using System.IO;
5-
using System.Linq;
6-
using System.Threading;
7-
using System.Threading.Tasks;
81
using aframe;
92
using Gma.System.MouseKeyHook;
103
using RINGS.Common;
114
using RINGS.Models;
125
using Sharlayan;
136
using Sharlayan.Core;
7+
using Sharlayan.Enums;
148
using Sharlayan.Models;
9+
using System;
10+
using System.Collections.Generic;
11+
using System.Diagnostics;
12+
using System.IO;
13+
using System.Linq;
14+
using System.Threading;
15+
using System.Threading.Tasks;
1516

1617
namespace RINGS.Controllers
1718
{
@@ -35,17 +36,18 @@ private SharlayanController()
3536

3637
private Thread subscribeFFXIVProcessThread;
3738
private Thread subscribeChatLogThread;
39+
private MemoryHandler _memoryHandler;
3840
private int handledProcessID;
3941
private int previousArrayIndex = 0;
4042
private int previousOffset = 0;
41-
private CurrentPlayer currentPlayer;
43+
private ActorItem currentPlayer;
4244
private string[] currentPlayerNames;
4345

4446
public int HandledProcessID => this.handledProcessID;
4547

4648
public bool IsAttached => this.handledProcessID != 0;
4749

48-
public CurrentPlayer CurrentPlayer => this.currentPlayer;
50+
public ActorItem CurrentPlayer => this.currentPlayer;
4951

5052
public async Task StartAsync() => await Task.Run(() =>
5153
{
@@ -98,7 +100,7 @@ public async Task StartAsync() => await Task.Run(() =>
98100

99101
private void SubscribeFFXIVProcess()
100102
{
101-
var language = "Japanese";
103+
var language = GameLanguage.Japanese;
102104

103105
Thread.Sleep(TimeSpan.FromSeconds(DetectProcessInterval));
104106
AppLogger.Write("FFXIV process subscriber started.");
@@ -130,18 +132,28 @@ private void SubscribeFFXIVProcess()
130132

131133
var ffxiv = processes[0];
132134

133-
if (!MemoryHandler.Instance.IsAttached ||
135+
if (this._memoryHandler == null ||
134136
this.handledProcessID != ffxiv.Id)
135137
{
136138
ClearLocalCaches();
137-
MemoryHandler.Instance.SetProcess(
138-
new ProcessModel
139+
140+
var config = new SharlayanConfiguration()
141+
{
142+
ProcessModel = new ProcessModel()
139143
{
140-
Process = ffxiv,
141-
IsWin64 = true,
144+
Process = ffxiv
142145
},
143-
gameLanguage: language,
144-
useLocalCache: true);
146+
GameLanguage = language,
147+
GameRegion = language switch
148+
{
149+
GameLanguage.Korean => GameRegion.Korea,
150+
GameLanguage.Chinese => GameRegion.China,
151+
_ => GameRegion.Global
152+
},
153+
UseLocalCache = true,
154+
};
155+
156+
this._memoryHandler = SharlayanMemoryManager.Instance.AddHandler(config);
145157

146158
this.handledProcessID = ffxiv.Id;
147159
this.previousArrayIndex = 0;
@@ -171,42 +183,45 @@ private void SubscribeFFXIVProcess()
171183

172184
private static readonly string[] LocalCacheFiles = new[]
173185
{
174-
"actions.json",
175-
"signatures-x64.json",
176-
"statuses.json",
177-
"structures-x64.json",
178-
"zones.json"
186+
"actions*.json",
187+
"signatures*.json",
188+
"statuses*.json",
189+
"structures*.json",
190+
"zones*.json",
179191
};
180192

181193
private static void ClearLocalCaches()
182194
{
183195
var dir = Directory.GetCurrentDirectory();
184196
foreach (var f in LocalCacheFiles)
185197
{
186-
var file = Path.Combine(dir, f);
187-
if (File.Exists(file))
198+
foreach (var file in Directory.EnumerateFiles(dir, f))
188199
{
189-
File.Delete(file);
200+
if (File.Exists(file))
201+
{
202+
File.Delete(file);
203+
}
190204
}
191205
}
192206
}
193207

194208
private void RefreshActiveProfile()
195209
{
196-
if (!Reader.CanGetPlayerInfo())
210+
if (this._memoryHandler == null)
197211
{
198-
this.ClearActiveProfile();
199212
return;
200213
}
201214

202-
var result = Reader.GetCurrentPlayer();
203-
if (result == null)
215+
var result = this._memoryHandler.Reader.GetCurrentPlayer();
216+
if (result == null ||
217+
result.PlayerInfo == null ||
218+
result.Entity == null)
204219
{
205220
this.ClearActiveProfile();
206221
return;
207222
}
208223

209-
var newPlayer = result.CurrentPlayer;
224+
var newPlayer = result.Entity;
210225
if (newPlayer != null &&
211226
!string.IsNullOrEmpty(newPlayer.Name) &&
212227
this.currentPlayer?.Name != newPlayer.Name)
@@ -282,7 +297,7 @@ private void SubscribeChatLog()
282297
}
283298

284299
if (!this.IsAttached ||
285-
!Reader.CanGetChatLog())
300+
!this._memoryHandler.Reader.CanGetChatLog())
286301
{
287302
interval = TimeSpan.FromSeconds(DetectProcessInterval);
288303
continue;
@@ -315,7 +330,7 @@ private void SubscribeChatLog()
315330
previousPlayerName = this.CurrentPlayer.Name;
316331
}
317332

318-
var result = Reader.GetChatLog(this.previousArrayIndex, this.previousOffset);
333+
var result = this._memoryHandler.Reader.GetChatLog(this.previousArrayIndex, this.previousOffset);
319334
if (result == null)
320335
{
321336
continue;

source/RINGS/FodyWeavers.xsd

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
1212
</xs:annotation>
1313
</xs:attribute>
14+
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
15+
<xs:annotation>
16+
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
17+
</xs:annotation>
18+
</xs:attribute>
19+
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
20+
<xs:annotation>
21+
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
22+
</xs:annotation>
23+
</xs:attribute>
1424
<xs:attribute name="EventInvokerNames" type="xs:string">
1525
<xs:annotation>
1626
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>
@@ -56,6 +66,16 @@
5666
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
5767
</xs:annotation>
5868
</xs:element>
69+
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeRuntimeAssemblies" type="xs:string">
70+
<xs:annotation>
71+
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
72+
</xs:annotation>
73+
</xs:element>
74+
<xs:element minOccurs="0" maxOccurs="1" name="IncludeRuntimeAssemblies" type="xs:string">
75+
<xs:annotation>
76+
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
77+
</xs:annotation>
78+
</xs:element>
5979
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
6080
<xs:annotation>
6181
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
@@ -82,6 +102,16 @@
82102
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
83103
</xs:annotation>
84104
</xs:attribute>
105+
<xs:attribute name="IncludeRuntimeReferences" type="xs:boolean">
106+
<xs:annotation>
107+
<xs:documentation>Controls if runtime assemblies are also embedded.</xs:documentation>
108+
</xs:annotation>
109+
</xs:attribute>
110+
<xs:attribute name="UseRuntimeReferencePaths" type="xs:boolean">
111+
<xs:annotation>
112+
<xs:documentation>Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.</xs:documentation>
113+
</xs:annotation>
114+
</xs:attribute>
85115
<xs:attribute name="DisableCompression" type="xs:boolean">
86116
<xs:annotation>
87117
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
@@ -112,6 +142,16 @@
112142
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
113143
</xs:annotation>
114144
</xs:attribute>
145+
<xs:attribute name="ExcludeRuntimeAssemblies" type="xs:string">
146+
<xs:annotation>
147+
<xs:documentation>A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
148+
</xs:annotation>
149+
</xs:attribute>
150+
<xs:attribute name="IncludeRuntimeAssemblies" type="xs:string">
151+
<xs:annotation>
152+
<xs:documentation>A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
153+
</xs:annotation>
154+
</xs:attribute>
115155
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
116156
<xs:annotation>
117157
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>

source/RINGS/RINGS.csproj

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -254,18 +254,18 @@
254254
</ItemGroup>
255255
<ItemGroup>
256256
<PackageReference Include="Costura.Fody">
257-
<Version>4.1.0</Version>
257+
<Version>5.6.0</Version>
258+
<PrivateAssets>all</PrivateAssets>
258259
</PackageReference>
259260
<PackageReference Include="Discord.Net">
260-
<Version>2.2.0</Version>
261+
<Version>2.4.0</Version>
261262
</PackageReference>
262263
<PackageReference Include="Fody">
263-
<Version>6.1.1</Version>
264-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
264+
<Version>6.5.2</Version>
265265
<PrivateAssets>all</PrivateAssets>
266266
</PackageReference>
267267
<PackageReference Include="Hardcodet.NotifyIcon.Wpf">
268-
<Version>1.0.8</Version>
268+
<Version>1.1.0</Version>
269269
</PackageReference>
270270
<PackageReference Include="Hjson">
271271
<Version>3.0.0</Version>
@@ -277,10 +277,10 @@
277277
<Version>4.0.0</Version>
278278
</PackageReference>
279279
<PackageReference Include="MaterialDesignColors">
280-
<Version>1.2.4</Version>
280+
<Version>1.2.7</Version>
281281
</PackageReference>
282282
<PackageReference Include="MaterialDesignThemes">
283-
<Version>3.1.1</Version>
283+
<Version>2.6.0</Version>
284284
</PackageReference>
285285
<PackageReference Include="MaterialDesignThemes.MahApps">
286286
<Version>0.1.0</Version>
@@ -289,19 +289,20 @@
289289
<Version>5.6.0</Version>
290290
</PackageReference>
291291
<PackageReference Include="Newtonsoft.Json">
292-
<Version>12.0.3</Version>
292+
<Version>13.0.1</Version>
293293
</PackageReference>
294294
<PackageReference Include="NLog">
295-
<Version>4.7.0</Version>
295+
<Version>4.7.11</Version>
296296
</PackageReference>
297297
<PackageReference Include="Prism.Wpf">
298-
<Version>7.2.0.1422</Version>
298+
<Version>8.1.97</Version>
299299
</PackageReference>
300300
<PackageReference Include="PropertyChanged.Fody">
301-
<Version>3.2.8</Version>
301+
<Version>3.4.0</Version>
302+
<PrivateAssets>all</PrivateAssets>
302303
</PackageReference>
303304
<PackageReference Include="Sharlayan">
304-
<Version>5.0.5</Version>
305+
<Version>7.0.1</Version>
305306
</PackageReference>
306307
</ItemGroup>
307308
<ItemGroup>

source/RINGS/Version.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
using System.Reflection;
22

3-
[assembly: AssemblyVersion("1.4.13.5419")]
3+
[assembly: AssemblyVersion("1.5.0.3911")]
44
[assembly: AssemblyConfiguration("Stable")]

source/aframe/source/aframe.Core/FodyWeavers.xsd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@
1111
<xs:documentation>Used to control if the On_PropertyName_Changed feature is enabled.</xs:documentation>
1212
</xs:annotation>
1313
</xs:attribute>
14+
<xs:attribute name="TriggerDependentProperties" type="xs:boolean">
15+
<xs:annotation>
16+
<xs:documentation>Used to control if the Dependent properties feature is enabled.</xs:documentation>
17+
</xs:annotation>
18+
</xs:attribute>
19+
<xs:attribute name="EnableIsChangedProperty" type="xs:boolean">
20+
<xs:annotation>
21+
<xs:documentation>Used to control if the IsChanged property feature is enabled.</xs:documentation>
22+
</xs:annotation>
23+
</xs:attribute>
1424
<xs:attribute name="EventInvokerNames" type="xs:string">
1525
<xs:annotation>
1626
<xs:documentation>Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form.</xs:documentation>

0 commit comments

Comments
 (0)