Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
2afb1933e3 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.vs/
|
||||
obj/
|
||||
dist/
|
||||
dist-CN/
|
||||
*.user
|
@ -8,4 +8,13 @@
|
||||
MakeZip="true"
|
||||
VersionComponents="2"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="PackagePlugin" AfterTargets="Build" Condition="'$(Configuration)' == 'Release-CN'">
|
||||
<DalamudPackager
|
||||
ProjectDir="$(ProjectDir)"
|
||||
OutputPath="$(OutputPath)"
|
||||
AssemblyName="$(AssemblyName)"
|
||||
MakeZip="true"
|
||||
VersionComponents="2"/>
|
||||
</Target>
|
||||
</Project>
|
@ -1,4 +1,4 @@
|
||||
using Dalamud.Data;
|
||||
using Dalamud;
|
||||
using Dalamud.Game.Gui;
|
||||
using Dalamud.Game.Network;
|
||||
using Dalamud.Game.Text.SeStringHandling;
|
||||
@ -67,7 +67,7 @@ namespace FishNotify
|
||||
return;
|
||||
}
|
||||
|
||||
var region = regions.Find(r => r.Region == "Global");
|
||||
var region = regions.Find(r => r.Region == GetGameRegion());
|
||||
if (region == null || region.Lists == null)
|
||||
{
|
||||
PluginLog.Warning("No global region found in opcode list");
|
||||
@ -96,6 +96,20 @@ namespace FishNotify
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Both ClientLanguage.Korean and ClientLanguage.ChineseSimplified have value 4, but the string representation differs depending on the dalamud fork.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string GetGameRegion()
|
||||
{
|
||||
return Enum.GetName(typeof(ClientLanguage), 4) switch
|
||||
{
|
||||
"ChineseSimplified" => "CN",
|
||||
"Korean" => "KR",
|
||||
_ => "Global",
|
||||
};
|
||||
}
|
||||
|
||||
private void OnNetworkMessage(IntPtr dataPtr, ushort opCode, uint sourceActorId, uint targetActorId, NetworkMessageDirection direction)
|
||||
{
|
||||
if (direction != NetworkMessageDirection.ZoneDown || opCode != expectedOpCode)
|
||||
|
@ -1,43 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Authors></Authors>
|
||||
<Company></Company>
|
||||
<Version>5.0</Version>
|
||||
<Description>Plays a sound effect when a fish bites</Description>
|
||||
<Copyright></Copyright>
|
||||
<PackageProjectUrl>https://github.com/carvelli/Fish-Notify</PackageProjectUrl>
|
||||
<Configurations>Release</Configurations>
|
||||
<Configurations>Release;Release-CN</Configurations>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'">
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
|
||||
<OutputPath>dist</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release-CN'">
|
||||
<TargetFramework>net6.0-windows</TargetFramework>
|
||||
<DalamudLibPath>E:\ffxiv\CN-dalamud\XIVLauncherCN\Roaming\addon\Hooks\dev\</DalamudLibPath>
|
||||
<OutputPath>dist-CN</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0-windows</TargetFramework>
|
||||
<Platforms>x64</Platforms>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<OutputPath>dist</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Release'">
|
||||
<Compile Remove="dist-CN\**" />
|
||||
<EmbeddedResource Remove="dist-CN\**" />
|
||||
<None Remove="dist-CN\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Release-CN'">
|
||||
<Compile Remove="dist\**" />
|
||||
<EmbeddedResource Remove="dist\**" />
|
||||
<None Remove="dist\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="FishNotify.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-CN'">
|
||||
<DebugType>none</DebugType>
|
||||
<DebugSymbols>false</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Release'">
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.10" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(Configuration)'=='Release-CN'">
|
||||
<PackageReference Include="DalamudPackager" Version="2.1.8" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Windows.Extensions" Version="7.0.0" />
|
||||
<Reference Include="FFXIVClientStructs">
|
||||
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
|
||||
@ -84,8 +112,12 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="RenameLatestZip" AfterTargets="PackagePlugin">
|
||||
<Target Name="RenameLatestZip" AfterTargets="PackagePlugin" Condition="'$(Configuration)'=='Release'">
|
||||
<Exec Command="rename "$(OutDir)$(AssemblyName)\latest.zip" "$(AssemblyName)-$(Version).zip"" />
|
||||
</Target>
|
||||
|
||||
<Target Name="RenameLatestZip" AfterTargets="PackagePlugin" Condition="'$(Configuration)'=='Release-CN'">
|
||||
<Exec Command="rename "$(OutDir)$(AssemblyName)\latest.zip" "$(AssemblyName)-$(Version)-CN.zip"" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
@ -1,17 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29709.97
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.4.33213.308
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{DFE2B530-7D7B-41FD-B03C-8E11371610E3}") = "FishNotify", "FishNotify.csproj", "{3F91A6A9-5F97-4F6D-864C-DA066F94121A}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FishNotify", "FishNotify.csproj", "{3F91A6A9-5F97-4F6D-864C-DA066F94121A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Release|x64 = Release|x64
|
||||
Release-CN|x64 = Release-CN|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{3F91A6A9-5F97-4F6D-864C-DA066F94121A}.Release|x64.ActiveCfg = Release|x64
|
||||
{3F91A6A9-5F97-4F6D-864C-DA066F94121A}.Release|x64.Build.0 = Release|x64
|
||||
{3F91A6A9-5F97-4F6D-864C-DA066F94121A}.Release-CN|x64.ActiveCfg = Release-CN|x64
|
||||
{3F91A6A9-5F97-4F6D-864C-DA066F94121A}.Release-CN|x64.Build.0 = Release-CN|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
Loading…
Reference in New Issue
Block a user