From 83e4ef996baa1a7a290e32de96f0c5da21d11c6a Mon Sep 17 00:00:00 2001 From: Innpaul Zhang Date: Sun, 14 Feb 2021 00:37:16 +0800 Subject: [PATCH 01/23] feat(view/main): add github icon link --- Cafe.Matcha/AssemblyCopyright.cs | 9 +- Cafe.Matcha/AssemblyCopyright.tt | 2 +- Cafe.Matcha/Cafe.Matcha.csproj | 1 + Cafe.Matcha/GitHub-Mark-32px.png | Bin 0 -> 1714 bytes Cafe.Matcha/Views/MainControl.xaml | 442 +++++++++++++------------- Cafe.Matcha/Views/MainControl.xaml.cs | 6 + 6 files changed, 233 insertions(+), 227 deletions(-) create mode 100644 Cafe.Matcha/GitHub-Mark-32px.png diff --git a/Cafe.Matcha/AssemblyCopyright.cs b/Cafe.Matcha/AssemblyCopyright.cs index 6d233cc..03eead9 100644 --- a/Cafe.Matcha/AssemblyCopyright.cs +++ b/Cafe.Matcha/AssemblyCopyright.cs @@ -1,7 +1,4 @@ -// Copyright (c) FFCafe. All rights reserved. -// Licensed under the AGPL-3.0 license. See LICENSE file in the project root for full license information. - -using System; +using System; using System.Reflection; [assembly: AssemblyTitle("Cafe.Matcha")] @@ -10,7 +7,7 @@ #if GLOBAL [assembly: AssemblyVersion("5.2.5.0")] #else -[assembly: AssemblyVersion("5.3.5.0")] +[assembly: AssemblyVersion("5.3.5.1")] #endif [assembly: AssemblyCopyright("Copyright © FFCafe 2021")] @@ -20,7 +17,7 @@ partial class Data { #if GLOBAL public const string Version = "5.2.5.0"; #else - public const string Version = "5.3.5.0"; + public const string Version = "5.3.5.1"; #endif } } \ No newline at end of file diff --git a/Cafe.Matcha/AssemblyCopyright.tt b/Cafe.Matcha/AssemblyCopyright.tt index d545ddd..07bd4e3 100644 --- a/Cafe.Matcha/AssemblyCopyright.tt +++ b/Cafe.Matcha/AssemblyCopyright.tt @@ -1,6 +1,6 @@ <#@ template language="C#" #> <# - string VersionCN = "5.3.5.0"; + string VersionCN = "5.3.5.1"; string VersionGlobal = "5.2.5.0"; #> using System; diff --git a/Cafe.Matcha/Cafe.Matcha.csproj b/Cafe.Matcha/Cafe.Matcha.csproj index 6228cd1..e991e3e 100644 --- a/Cafe.Matcha/Cafe.Matcha.csproj +++ b/Cafe.Matcha/Cafe.Matcha.csproj @@ -233,6 +233,7 @@ AssemblyCopyright.cs + diff --git a/Cafe.Matcha/GitHub-Mark-32px.png b/Cafe.Matcha/GitHub-Mark-32px.png new file mode 100644 index 0000000000000000000000000000000000000000..8b25551a97921681334176ee143b41510a117d86 GIT binary patch literal 1714 zcmaJ?X;2eq7*4oFu!ne{XxAht2qc?8LXr|_LPCfTpaBK7K$c{I0Ld=NLIOeuC;@2) zZ$K%a)k+m-s0>xHmKxL%0V&0TRzzznhgyqrIC$F)0{WwLXLrBvd*^wc_uSc%h%m9E z{W5z3f#4_!7RvAyFh6!S_*<8qJ%KOIm?#E|L=rJQq=gB5C6WLG5;c?r%V0>EmEH#X z5eSwPRa6WXBMs#$5H%GtW2go-in9p>zW@UYDNNWc^XOXZQ? z1QjEV00I#$3^1wQUJ8&-2UsjB-G|9y(LDhMNN3PM{APL4eYi{(m*ERcUnJa{R+-3^ z34^A6;U^v`8N*O6ji%S@sd{fJqD`XFIUJ5zgTe5^5nj414F(y!G&=H(f)Lgzv?>%+ zAsWD}2qhpH7>|TU`X&W6IxDNuO_vET7|j5oG&&VDr!)hUO8+0KR?nh!m<)a!?|%yG zqOwq!CWCcIhE{<$E|F|@g>nP6FoYr6C<8>D?ID9%&5J(4oSbR1I^byW*g@__U z4QsF&uJSEcFeleM3~ChjEQGbHOjsGDMbyAl(p=Ttv9RaVo8~I#js@@Y9C^_2U})yn zzSHU%6FxuY?d;&65MyR({^lU*3$z$ZllDb(o&<7d;A_`h2U+3~BJ2Hv`{W}KEU801#cv_B|9Cm!ynR{S`AMsSn z;7E=B;mb!wx$L;S>yGXG^6=&WlQn9$s?&L%Y1D8TI^MlKB1DqsEng$>f4=xYWBoPI z_S1p!sJ#d2?YI4kPA{k}Eby?F=f-J9zIc`YDl^pzjVm~9ebE?Hn?t0Nx+la|D0MB; z9)2xv1G>a1|A9kQ>~DV<=X3-4yC&n!m8-3K#P z{X@0zRuQsy$+N ziSCoLJU{Z$nQy4A4Y5UJ07$5FA~qL2%Q+cLaqDU?Lz3?=BC5;Nk6BbTmmceEaM>-Z zi>O&-dSE=%ex;vcvCOk{*JQ5^_4M z4lW7%l9IqY(z7pV(?I@@8=KPFO82)O{VDI18-*d-k$YmI^XiuPs_LuFw<^ZcD}yP5 c*NrbeloN*74g`U%%F6r~k%+>C^#XapzmV0H-2eap literal 0 HcmV?d00001 diff --git a/Cafe.Matcha/Views/MainControl.xaml b/Cafe.Matcha/Views/MainControl.xaml index c87f3dd..be5502e 100644 --- a/Cafe.Matcha/Views/MainControl.xaml +++ b/Cafe.Matcha/Views/MainControl.xaml @@ -6,7 +6,6 @@ xmlns:matcha="clr-namespace:Cafe.Matcha" xmlns:System="clr-namespace:System;assembly=mscorlib" xmlns:constant="clr-namespace:Cafe.Matcha.Constant" - xmlns:network="clr-namespace:Cafe.Matcha.Network" xmlns:ViewModels="clr-namespace:Cafe.Matcha.ViewModels" x:Name="_this" x:Class="Cafe.Matcha.Views.MainControl" mc:Ignorable="d" d:DesignWidth="800" Height="492.287"> @@ -28,239 +27,242 @@ - - - - - - - + + + + + + + + - - - - - - - - + + + + + + + + - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/Cafe.Matcha/Views/MainControl.xaml.cs b/Cafe.Matcha/Views/MainControl.xaml.cs index 5ef0fde..913b98f 100644 --- a/Cafe.Matcha/Views/MainControl.xaml.cs +++ b/Cafe.Matcha/Views/MainControl.xaml.cs @@ -498,5 +498,11 @@ private void BRemoveWebhook_Click(object sender, RoutedEventArgs e) Config.Instance.Webhook.Remove(ViewModel.SelectedWebhook); ViewModel.SelectedWebhook = null; } + + private void Image_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e) + { + Process.Start(new ProcessStartInfo("https://github.com/thewakingsands/matcha")); + e.Handled = true; + } } } From f6f09768c6248c698567fe10203a4837832f3469 Mon Sep 17 00:00:00 2001 From: Innpaul Zhang Date: Sun, 14 Feb 2021 01:19:38 +0800 Subject: [PATCH 02/23] feat(view/main): dont report fate/ce immediately after changing zone --- Cafe.Matcha/Views/MainControl.xaml.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Cafe.Matcha/Views/MainControl.xaml.cs b/Cafe.Matcha/Views/MainControl.xaml.cs index 913b98f..5ec500a 100644 --- a/Cafe.Matcha/Views/MainControl.xaml.cs +++ b/Cafe.Matcha/Views/MainControl.xaml.cs @@ -159,6 +159,15 @@ private void Network_onReceiveEvent(BaseDTO dto) private List notifiedFate = new List(); private List notifiedDynamicEvent = new List(); + private long lastZoneChange = 0; + private long Now + { + get + { + return DateTimeOffset.Now.ToUnixTimeMilliseconds(); + } + } + private bool ShouldSendNotice(BaseDTO dto) { switch (dto.EventType) @@ -167,6 +176,7 @@ private bool ShouldSendNotice(BaseDTO dto) return true; case EventType.InitZone: notifiedFate.Clear(); + lastZoneChange = Now; return true; case EventType.Fate: var fateDto = (FateDTO)dto; @@ -180,7 +190,7 @@ private bool ShouldSendNotice(BaseDTO dto) } notifiedFate.Add(fateDto.Fate); - return true; + return Now - lastZoneChange > 5000; case "end": notifiedFate.Remove(fateDto.Fate); return false; @@ -201,7 +211,7 @@ private bool ShouldSendNotice(BaseDTO dto) } notifiedDynamicEvent.Add(deDto.Event); - return true; + return Now - lastZoneChange > 5000; default: notifiedDynamicEvent.Remove(deDto.Event); return false; From 120381805b416fd4fbca7c8ab4b92eedf0c87eaf Mon Sep 17 00:00:00 2001 From: Innpaul Zhang Date: Mon, 1 Mar 2021 02:49:40 +0800 Subject: [PATCH 03/23] feat(constant/opcode): update opcode for global server --- .github/workflows/build.yml | 2 +- Cafe.Matcha/AssemblyCopyright.cs | 4 +- Cafe.Matcha/AssemblyCopyright.tt | 2 +- Cafe.Matcha/Constant/MatchaOpcode.cs | 46 ++++++++------- utils/update-opcode.js | 87 ++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 25 deletions(-) create mode 100644 utils/update-opcode.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b214b62..dbbf635 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - configuration: [Release] + configuration: [Release, Release-Global] runs-on: windows-latest diff --git a/Cafe.Matcha/AssemblyCopyright.cs b/Cafe.Matcha/AssemblyCopyright.cs index 03eead9..5062c2a 100644 --- a/Cafe.Matcha/AssemblyCopyright.cs +++ b/Cafe.Matcha/AssemblyCopyright.cs @@ -5,7 +5,7 @@ [assembly: AssemblyDescription("Cafe.Matcha")] [assembly: AssemblyCompany("FFCafe")] #if GLOBAL -[assembly: AssemblyVersion("5.2.5.0")] +[assembly: AssemblyVersion("5.4.0.0")] #else [assembly: AssemblyVersion("5.3.5.1")] #endif @@ -15,7 +15,7 @@ namespace Cafe.Matcha { partial class Data { #if GLOBAL - public const string Version = "5.2.5.0"; + public const string Version = "5.4.0.0"; #else public const string Version = "5.3.5.1"; #endif diff --git a/Cafe.Matcha/AssemblyCopyright.tt b/Cafe.Matcha/AssemblyCopyright.tt index 07bd4e3..764aaa5 100644 --- a/Cafe.Matcha/AssemblyCopyright.tt +++ b/Cafe.Matcha/AssemblyCopyright.tt @@ -1,7 +1,7 @@ <#@ template language="C#" #> <# string VersionCN = "5.3.5.1"; - string VersionGlobal = "5.2.5.0"; + string VersionGlobal = "5.4.0.0"; #> using System; using System.Reflection; diff --git a/Cafe.Matcha/Constant/MatchaOpcode.cs b/Cafe.Matcha/Constant/MatchaOpcode.cs index fa1295b..9d83c71 100644 --- a/Cafe.Matcha/Constant/MatchaOpcode.cs +++ b/Cafe.Matcha/Constant/MatchaOpcode.cs @@ -1,4 +1,4 @@ -// 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. namespace Cafe.Matcha.Constant @@ -6,35 +6,39 @@ namespace Cafe.Matcha.Constant internal enum MatchaOpcode : ushort { #if GLOBAL - ActorControlSelf = 0x0165, - DirectorStart = 0x0399, // - ContentFinderNotifyPop = 0x145, - EventPlay = 0x02C3, - Examine = 0x038D, // - InitZone = 0x01CD, - ItemInfo = 0x02AA, - MarketBoardItemListingHistory = 0x0240, - MarketBoardItemListing = 0x00D7, - MarketBoardItemListingCount = 0x0244, - PlayerSpawn = 0x00B9, - PlayerSetup = 0x0071, + ActorControlSelf = 0x03d5, + CEDirector = 0xf001, + CompanyAirshipStatus = 0xf002, + CompanySubmersibleStatus = 0xf003, + ContentFinderNotifyPop = 0x026e, + DirectorStart = 0xf005, + EventPlay = 0x0276, + Examine = 0x0261, + InitZone = 0x0233, + InventoryTransaction = 0x02ee, + ItemInfo = 0x0175, + MarketBoardItemListing = 0x016b, + MarketBoardItemListingCount = 0x00c0, + MarketBoardItemListingHistory = 0x01c3, + PlayerSetup = 0x01e9, + PlayerSpawn = 0x01ab, #else - ActorControlSelf = 0x007C, + ActorControlSelf = 0x007c, CEDirector = 0x0144, CompanyAirshipStatus = 0x0271, CompanySubmersibleStatus = 0x0345, - ContentFinderNotifyPop = 0x02D0, + ContentFinderNotifyPop = 0x02d0, DirectorStart = 0x02f2, - EventPlay = 0x01B9, + EventPlay = 0x01b9, Examine = 0x0316, - InitZone = 0x02D2, - InventoryTransaction = 0x00A8, - ItemInfo = 0x031A, + InitZone = 0x02d2, + InventoryTransaction = 0x00a8, + ItemInfo = 0x031a, MarketBoardItemListing = 0x0158, MarketBoardItemListingCount = 0x0280, - MarketBoardItemListingHistory = 0x01F3, + MarketBoardItemListingHistory = 0x01f3, PlayerSetup = 0x01f9, - PlayerSpawn = 0x00D1, + PlayerSpawn = 0x00d1, #endif } } diff --git a/utils/update-opcode.js b/utils/update-opcode.js new file mode 100644 index 0000000..3e72439 --- /dev/null +++ b/utils/update-opcode.js @@ -0,0 +1,87 @@ +const opcodes = [ + 'ActorControlSelf', + 'CEDirector', + 'CompanyAirshipStatus', + 'CompanySubmersibleStatus', + ['ContentFinderNotifyPop', 'CFNotify'], + 'DirectorStart', + 'EventPlay', + 'Examine', + 'InitZone', + 'InventoryTransaction', + 'ItemInfo', + 'MarketBoardItemListing', + 'MarketBoardItemListingCount', + 'MarketBoardItemListingHistory', + 'PlayerSetup', + 'PlayerSpawn' +] + +const https = require('https') +const fs = require('fs') +const { join } = require('path') + +const request = (url) => new Promise((resolve, reject) => { + const req = https.request(url, (res) => { + const chunks = [] + res.on('data', (chunk) => chunks.push(chunk)) + res.on('end', () => resolve(Buffer.concat(chunks))) + }) + req.on('error', reject) + req.end() +}) + +const outputOpcode = (key, value) => `${' '.repeat(8)}${key} = 0x${value.toString(16).padStart(4, '0')},` + +const outputFromKarashiiro = (list) => opcodes.map((item, index) => { + if (!Array.isArray(item)) { + item = [item, item] + } + + const [outputKey, fromKey] = item + const row = list.lists.ServerZoneIpcType.find((row) => row.name === fromKey) + const value = row ? row.opcode : (0xF000 + index) + + return outputOpcode(outputKey, value) +}).join('\n') + +const outputFromWorker = (list) => opcodes.map((item, index) => { + const key = Array.isArray(item) ? item[0] : item + const row = list.find(([rowKey]) => rowKey === key) + const value = row ? row[1] : (0xF000 + index) + + return outputOpcode(key, value) +}).join('\n') + +;(async () => { + const karashiiroData = await request('https://raw.githubusercontent.com/karashiiro/FFXIVOpcodes/master/opcodes.json') + const parsedData = JSON.parse(karashiiroData.toString()) + + const globalOpcodes = parsedData.find(item => item.region === 'Global') + + const workerData = await request('https://raw.githubusercontent.com/zhyupe/ffxiv-opcode-worker/master/cn-opcodes.csv') + const cnOpcodes = workerData.toString().split('\n').map(line => { + const [key, ...args] = line.trim().split(',') + const valueColumn = args.reduce((val, content, index) => { + return content ? index : val + }, 0) + + return [key, parseInt(args[valueColumn], 16)] + }) + + fs.writeFileSync(join(__dirname, '../Cafe.Matcha/Constant/MatchaOpcode.cs'), `// Copyright (c) FFCafe. All rights reserved. +// Licensed under the AGPL-3.0 license. See LICENSE file in the project root for full license information. + +namespace Cafe.Matcha.Constant +{ + internal enum MatchaOpcode : ushort + { +#if GLOBAL +${outputFromKarashiiro(globalOpcodes)} +#else +${outputFromWorker(cnOpcodes)} +#endif + } +} +`) +})() From 3609222b70a1261b32a78fcff9d6aab2ab98a474 Mon Sep 17 00:00:00 2001 From: Innpaul Zhang Date: Mon, 1 Mar 2021 02:54:17 +0800 Subject: [PATCH 04/23] fix(packer): fix output path for release-global --- Cafe.Matcha.Packer/Cafe.Matcha.Packer.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cafe.Matcha.Packer/Cafe.Matcha.Packer.csproj b/Cafe.Matcha.Packer/Cafe.Matcha.Packer.csproj index 11bd2d0..4ae5e90 100644 --- a/Cafe.Matcha.Packer/Cafe.Matcha.Packer.csproj +++ b/Cafe.Matcha.Packer/Cafe.Matcha.Packer.csproj @@ -33,7 +33,7 @@ 4 - bin\Release-Global\ + ..\bin\ TRACE true pdbonly From 6280e25fd5900274e1733827e0e307da8deaa8cf Mon Sep 17 00:00:00 2001 From: zhyupe Date: Mon, 1 Mar 2021 12:55:37 +0800 Subject: [PATCH 05/23] feat(constant/opcode): update CEDirector for global --- Cafe.Matcha/Constant/MatchaOpcode.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cafe.Matcha/Constant/MatchaOpcode.cs b/Cafe.Matcha/Constant/MatchaOpcode.cs index 9d83c71..e334aa1 100644 --- a/Cafe.Matcha/Constant/MatchaOpcode.cs +++ b/Cafe.Matcha/Constant/MatchaOpcode.cs @@ -7,7 +7,7 @@ internal enum MatchaOpcode : ushort { #if GLOBAL ActorControlSelf = 0x03d5, - CEDirector = 0xf001, + CEDirector = 0x01f5, CompanyAirshipStatus = 0xf002, CompanySubmersibleStatus = 0xf003, ContentFinderNotifyPop = 0x026e, From 9766918b227610024d87ad19d673e4b78a698415 Mon Sep 17 00:00:00 2001 From: zhyupe Date: Mon, 1 Mar 2021 13:18:56 +0800 Subject: [PATCH 06/23] feat(constant/opcode): match company voyage opcodes from karashiiro --- utils/update-opcode.js | 44 ++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/utils/update-opcode.js b/utils/update-opcode.js index 3e72439..9676f11 100644 --- a/utils/update-opcode.js +++ b/utils/update-opcode.js @@ -1,9 +1,21 @@ const opcodes = [ 'ActorControlSelf', - 'CEDirector', - 'CompanyAirshipStatus', - 'CompanySubmersibleStatus', - ['ContentFinderNotifyPop', 'CFNotify'], + { + key: 'CEDirector', + global: parseInt('0x01f5', 16), + }, + { + key: 'CompanyAirshipStatus', + karashiiro: 'AirshipTimers', + }, + { + key: 'CompanySubmersibleStatus', + karashiiro: 'SubmarineTimers' + }, + { + key: 'ContentFinderNotifyPop', + karashiiro: 'CFNotify' + }, 'DirectorStart', 'EventPlay', 'Examine', @@ -33,20 +45,28 @@ const request = (url) => new Promise((resolve, reject) => { const outputOpcode = (key, value) => `${' '.repeat(8)}${key} = 0x${value.toString(16).padStart(4, '0')},` -const outputFromKarashiiro = (list) => opcodes.map((item, index) => { - if (!Array.isArray(item)) { - item = [item, item] +const outputFromKarashiiro = (list, region) => opcodes.map((item, index) => { + if (typeof item === 'string') { + item = { key: item } } - const [outputKey, fromKey] = item + const { key } = item; + if (item[region]) { + return outputOpcode(key, item[region]) + } + + const fromKey = item.karashiiro || item.key const row = list.lists.ServerZoneIpcType.find((row) => row.name === fromKey) const value = row ? row.opcode : (0xF000 + index) - return outputOpcode(outputKey, value) + return outputOpcode(key, value) }).join('\n') const outputFromWorker = (list) => opcodes.map((item, index) => { - const key = Array.isArray(item) ? item[0] : item + if (typeof item === 'string') { + item = { key: item } + } + const { key } = item const row = list.find(([rowKey]) => rowKey === key) const value = row ? row[1] : (0xF000 + index) @@ -77,9 +97,9 @@ namespace Cafe.Matcha.Constant internal enum MatchaOpcode : ushort { #if GLOBAL -${outputFromKarashiiro(globalOpcodes)} +${outputFromKarashiiro(globalOpcodes, 'global')} #else -${outputFromWorker(cnOpcodes)} +${outputFromWorker(cnOpcodes, 'cn')} #endif } } From f056b87d9dcaaa086abc627db65824ef0d07c3b1 Mon Sep 17 00:00:00 2001 From: zhyupe Date: Mon, 1 Mar 2021 13:20:08 +0800 Subject: [PATCH 07/23] feat(constant/opcode): match company voyage opcodes from karashiiro --- Cafe.Matcha/Constant/MatchaOpcode.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cafe.Matcha/Constant/MatchaOpcode.cs b/Cafe.Matcha/Constant/MatchaOpcode.cs index e334aa1..dbf0e4a 100644 --- a/Cafe.Matcha/Constant/MatchaOpcode.cs +++ b/Cafe.Matcha/Constant/MatchaOpcode.cs @@ -8,8 +8,8 @@ internal enum MatchaOpcode : ushort #if GLOBAL ActorControlSelf = 0x03d5, CEDirector = 0x01f5, - CompanyAirshipStatus = 0xf002, - CompanySubmersibleStatus = 0xf003, + CompanyAirshipStatus = 0x0206, + CompanySubmersibleStatus = 0x013b, ContentFinderNotifyPop = 0x026e, DirectorStart = 0xf005, EventPlay = 0x0276, From 6c8a3a72fc5de354296670636e565b3c8690beda Mon Sep 17 00:00:00 2001 From: Innpaul Zhang Date: Tue, 2 Mar 2021 01:24:24 +0800 Subject: [PATCH 08/23] feat(constant/opcode): update cactpot for global server --- Cafe.Matcha/Constant/MatchaOpcode.cs | 2 +- utils/update-opcode.js | 19 +++++++++++-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/Cafe.Matcha/Constant/MatchaOpcode.cs b/Cafe.Matcha/Constant/MatchaOpcode.cs index dbf0e4a..5a39e0b 100644 --- a/Cafe.Matcha/Constant/MatchaOpcode.cs +++ b/Cafe.Matcha/Constant/MatchaOpcode.cs @@ -11,7 +11,7 @@ internal enum MatchaOpcode : ushort CompanyAirshipStatus = 0x0206, CompanySubmersibleStatus = 0x013b, ContentFinderNotifyPop = 0x026e, - DirectorStart = 0xf005, + DirectorStart = 0x01d8, EventPlay = 0x0276, Examine = 0x0261, InitZone = 0x0233, diff --git a/utils/update-opcode.js b/utils/update-opcode.js index 9676f11..fa77d2f 100644 --- a/utils/update-opcode.js +++ b/utils/update-opcode.js @@ -2,21 +2,24 @@ const opcodes = [ 'ActorControlSelf', { key: 'CEDirector', - global: parseInt('0x01f5', 16), + global: parseInt('0x01f5', 16) }, { - key: 'CompanyAirshipStatus', - karashiiro: 'AirshipTimers', + key: 'CompanyAirshipStatus', + karashiiro: 'AirshipTimers' }, { - key: 'CompanySubmersibleStatus', + key: 'CompanySubmersibleStatus', karashiiro: 'SubmarineTimers' }, { - key: 'ContentFinderNotifyPop', + key: 'ContentFinderNotifyPop', karashiiro: 'CFNotify' }, - 'DirectorStart', + { + key: 'DirectorStart', + global: parseInt('0x01d8', 16) + }, 'EventPlay', 'Examine', 'InitZone', @@ -50,11 +53,11 @@ const outputFromKarashiiro = (list, region) => opcodes.map((item, index) => { item = { key: item } } - const { key } = item; + const { key } = item if (item[region]) { return outputOpcode(key, item[region]) } - + const fromKey = item.karashiiro || item.key const row = list.lists.ServerZoneIpcType.find((row) => row.name === fromKey) const value = row ? row.opcode : (0xF000 + index) From 5627b2ee9a6bc7412637adbd2161e125d5283b5c Mon Sep 17 00:00:00 2001 From: Innpaul Zhang Date: Tue, 2 Mar 2021 01:25:38 +0800 Subject: [PATCH 09/23] feat(views/main): remove item level reporting --- Cafe.Matcha/Models/ConfigData.cs | 2 -- Cafe.Matcha/Utils/Formatter.cs | 5 ----- Cafe.Matcha/Views/MainControl.xaml | 9 ++------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Cafe.Matcha/Models/ConfigData.cs b/Cafe.Matcha/Models/ConfigData.cs index 480dbe2..8d74461 100644 --- a/Cafe.Matcha/Models/ConfigData.cs +++ b/Cafe.Matcha/Models/ConfigData.cs @@ -179,8 +179,6 @@ public class ConfigFormatterInstance : BindingTarget public bool Level { get; set; } [JsonProperty("type")] public bool Type { get; set; } - [JsonProperty("item")] - public bool Item { get; set; } } public class ConfigFormatterZone : BindingTarget diff --git a/Cafe.Matcha/Utils/Formatter.cs b/Cafe.Matcha/Utils/Formatter.cs index 7b87ebd..6e3967c 100644 --- a/Cafe.Matcha/Utils/Formatter.cs +++ b/Cafe.Matcha/Utils/Formatter.cs @@ -76,11 +76,6 @@ private static string GetInstanceText(MatchAlertDTO dto) sb.AppendFormat("{0}级 ", instance.Level); } - if (Config.Instance.Item && instance.ItemLevelSync != 0) - { - sb.AppendFormat("装等{0} ", instance.ItemLevelSync); - } - if (Config.Instance.Name) { sb.Append(instance.Name); diff --git a/Cafe.Matcha/Views/MainControl.xaml b/Cafe.Matcha/Views/MainControl.xaml index be5502e..0a5cc65 100644 --- a/Cafe.Matcha/Views/MainControl.xaml +++ b/Cafe.Matcha/Views/MainControl.xaml @@ -120,12 +120,8 @@