From 3f2dd983da0d27b24460d795b8fa8c2f1d4b67ae Mon Sep 17 00:00:00 2001 From: Alexander Date: Mon, 31 Aug 2020 21:22:07 +0300 Subject: [PATCH] v0.9.86 update --- FFXIVWpfApp1/AppWindows/PatreonWin.xaml | 20 +- FFXIVWpfApp1/ChatWindow.xaml.cs | 24 +- FFXIVWpfApp1/FFHandlers/FFMemoryReader.cs | 8 +- FFXIVWpfApp1/GlobalSettings.cs | 6 + FFXIVWpfApp1/Locale_cloud/ca/ca_ES.mo | Bin 8073 -> 8073 bytes FFXIVWpfApp1/Locale_cloud/ca/ca_ES.po | 2 +- FFXIVWpfApp1/Locale_cloud/en/en_US.mo | Bin 7657 -> 7657 bytes FFXIVWpfApp1/Locale_cloud/en/en_US.po | 2 +- FFXIVWpfApp1/Locale_cloud/es-ES/es_ES.mo | Bin 7897 -> 7904 bytes FFXIVWpfApp1/Locale_cloud/es-ES/es_ES.po | 4 +- FFXIVWpfApp1/Locale_cloud/it/it_IT.mo | Bin 5058 -> 5058 bytes FFXIVWpfApp1/Locale_cloud/it/it_IT.po | 2 +- FFXIVWpfApp1/Locale_cloud/ko/ko_KR.mo | Bin 8319 -> 8369 bytes FFXIVWpfApp1/Locale_cloud/ko/ko_KR.po | 4 +- FFXIVWpfApp1/Locale_cloud/pl/pl_PL.mo | Bin 6922 -> 6922 bytes FFXIVWpfApp1/Locale_cloud/pl/pl_PL.po | 2 +- FFXIVWpfApp1/Locale_cloud/pt-BR/pt_BR.mo | Bin 7339 -> 7719 bytes FFXIVWpfApp1/Locale_cloud/pt-BR/pt_BR.po | 12 +- FFXIVWpfApp1/Locale_cloud/ru/ru_RU.mo | Bin 9997 -> 10047 bytes FFXIVWpfApp1/Locale_cloud/ru/ru_RU.po | 4 +- FFXIVWpfApp1/Locale_cloud/uk/uk_UA.mo | Bin 9786 -> 9786 bytes FFXIVWpfApp1/Locale_cloud/uk/uk_UA.po | 2 +- FFXIVWpfApp1/MainWindow.xaml | 45 +- FFXIVWpfApp1/MainWindow.xaml.cs | 20 +- FFXIVWpfApp1/Properties/AssemblyInfo.cs | 4 +- .../TataruComponentModel/PropertyBinder.cs | 2 +- FFXIVWpfApp1/TataruHelper.csproj | 21 +- FFXIVWpfApp1/TextDictionary.xaml | 5 + .../UIModel/ChatWindowViewModelSettings.cs | 16 + FFXIVWpfApp1/UIModel/TataruModel.cs | 35 +- FFXIVWpfApp1/UIModel/TataruUIModel.cs | 2 - FFXIVWpfApp1/UIModel/UserSettings.cs | 2 - FFXIVWpfApp1/Utils/LanguagueWrapper.cs | 13 +- FFXIVWpfApp1/ViewModel/ChatWindowViewModel.cs | 16 + HttpUtilities/HttpMethods.cs | 21 + HttpUtilities/HttpReader.cs | 283 ++ HttpUtilities/HttpResponse.cs | 36 + HttpUtilities/HttpUtilities.csproj | 51 + HttpUtilities/ILog.cs | 18 + HttpUtilities/Properties/AssemblyInfo.cs | 36 + Sharlayan/AttachmentWorker.cs | 7 +- Sharlayan/Constants.cs | 4 +- Sharlayan/Core/ActionContainer.cs | 4 +- Sharlayan/Core/ActionItem.cs | 4 +- Sharlayan/Core/ActorItem.cs | 11 +- Sharlayan/Core/ActorItemBase.cs | 47 +- Sharlayan/Core/ChatCleaner.cs | 178 +- Sharlayan/Core/ChatEntry.cs | 38 +- Sharlayan/Core/ChatLogItem.cs | 2 +- Sharlayan/Core/Coordinate.cs | 14 +- Sharlayan/Core/CurrentPlayer.cs | 16 +- Sharlayan/Core/EnmityItem.cs | 2 +- Sharlayan/Core/Enums/Action.cs | 7 +- Sharlayan/Core/Enums/Actor.cs | 25 +- Sharlayan/Core/Enums/Inventory.cs | 4 +- Sharlayan/Core/Interfaces/IActionContainer.cs | 4 +- Sharlayan/Core/Interfaces/IActionItem.cs | 2 +- Sharlayan/Core/Interfaces/IActorItem.cs | 2 +- Sharlayan/Core/Interfaces/IChatLogItem.cs | 2 +- Sharlayan/Core/Interfaces/ICoordinate.cs | 2 +- Sharlayan/Core/Interfaces/ICurrentPlayer.cs | 16 +- Sharlayan/Core/Interfaces/IEnmityItem.cs | 2 +- .../Core/Interfaces/IInventoryContainer.cs | 2 +- Sharlayan/Core/Interfaces/IInventoryItem.cs | 2 +- Sharlayan/Core/Interfaces/IPartyMember.cs | 2 +- Sharlayan/Core/Interfaces/IStatusItem.cs | 2 +- Sharlayan/Core/Interfaces/ITargetInfo.cs | 2 +- Sharlayan/Core/InventoryContainer.cs | 2 +- Sharlayan/Core/InventoryItem.cs | 2 +- Sharlayan/Core/PartyMember.cs | 6 +- Sharlayan/Core/StatusItem.cs | 2 +- Sharlayan/Core/TargetInfo.cs | 2 +- Sharlayan/Delegates/ChatLogWorkerDelegate.cs | 2 +- Sharlayan/Delegates/MonsterWorkerDelegate.cs | 2 +- Sharlayan/Delegates/NPCWorkerDelegate.cs | 2 +- Sharlayan/Delegates/PCWorkerDelegate.cs | 2 +- Sharlayan/Delegates/PartyWorkerDelegate.cs | 2 +- Sharlayan/Events/ExceptionEvent.cs | 2 +- Sharlayan/Events/SignaturesFoundEvent.cs | 2 +- Sharlayan/Extensions/StringExtensions.cs | 2 +- Sharlayan/FodyWeavers.xml | 4 +- Sharlayan/FodyWeavers.xsd | 111 + Sharlayan/MemoryHandler.cs | 2 +- Sharlayan/Models/ChatLogPointers.cs | 2 +- Sharlayan/Models/Localization.cs | 2 +- Sharlayan/Models/ProcessModel.cs | 2 +- Sharlayan/Models/ReadResults/ActionResult.cs | 2 +- Sharlayan/Models/ReadResults/ActorResult.cs | 2 +- Sharlayan/Models/ReadResults/ChatLogResult.cs | 2 +- .../Models/ReadResults/CurrentPlayerResult.cs | 2 +- .../Models/ReadResults/InventoryResult.cs | 2 +- Sharlayan/Models/ReadResults/PartyResult.cs | 2 +- Sharlayan/Models/ReadResults/TargetResult.cs | 2 +- Sharlayan/Models/Signature.cs | 2 +- Sharlayan/Models/Structures/ActorItem.cs | 2 +- .../Models/Structures/ChatLogPointers.cs | 2 +- Sharlayan/Models/Structures/CurrentPlayer.cs | 16 +- .../Models/Structures/DialogPanelPointers.cs | 5 + Sharlayan/Models/Structures/EnmityItem.cs | 2 +- Sharlayan/Models/Structures/HotBarItem.cs | 2 +- .../Models/Structures/InventoryContainer.cs | 2 +- Sharlayan/Models/Structures/InventoryItem.cs | 2 +- Sharlayan/Models/Structures/PartyMember.cs | 2 +- Sharlayan/Models/Structures/RecastItem.cs | 4 +- Sharlayan/Models/Structures/StatusItem.cs | 7 +- .../Models/Structures/StructuresContainer.cs | 2 +- Sharlayan/Models/Structures/TargetInfo.cs | 2 +- Sharlayan/Models/XIVDatabase/ActionItem.cs | 2 +- Sharlayan/Models/XIVDatabase/MapItem.cs | 2 +- Sharlayan/Models/XIVDatabase/StatusItem.cs | 2 +- Sharlayan/NLog.xsd | 777 ++++- Sharlayan/Properties/AssemblyInfo.cs | 33 +- Sharlayan/Reader.Actions.cs | 17 +- Sharlayan/Reader.Actor.cs | 44 +- Sharlayan/Reader.ChatLog.cs | 90 +- Sharlayan/Reader.CurrentPlayer.cs | 14 +- Sharlayan/Reader.DialogPanel.cs | 45 +- Sharlayan/Reader.Inventory.cs | 6 +- Sharlayan/Reader.PartyMembers.cs | 2 +- Sharlayan/Reader.Target.cs | 6 +- Sharlayan/Reader.cs | 2 +- Sharlayan/Scanner.cs | 8 +- Sharlayan/Sharlayan.csproj | 9 +- Sharlayan/Sharlayan.csproj.nuspec | 33 +- Sharlayan/Signatures.cs | 4 +- Sharlayan/UnsafeNativeMethods.cs | 12 +- Sharlayan/Utilities/APIHelper.cs | 25 +- Sharlayan/Utilities/ActionLookup.cs | 8 +- Sharlayan/Utilities/ActorItemResolver.cs | 25 +- Sharlayan/Utilities/AutoTranslate.cs | 3032 +++++++++++++++++ Sharlayan/Utilities/BitConverter.cs | 2 +- Sharlayan/Utilities/CurrentPlayerResolver.cs | 13 +- Sharlayan/Utilities/JsonUtilities.cs | 19 +- Sharlayan/Utilities/PartyMemberResolver.cs | 24 +- Sharlayan/Utilities/StatusEffectLookup.cs | 6 +- Sharlayan/Utilities/XMLCleaner.cs | 2 +- Sharlayan/Utilities/ZoneLookup.cs | 6 +- Sharlayan/ffxivapp-props/Common.props | 1 - .../ffxivapp-props/FFXIVAPP.Common.props | 1 - Sharlayan/packages.config | 15 +- TataruHelper.sln | 18 +- Translation/Baidu/BaiduReqEncoder.cs | 16 +- Translation/Baidu/BaiduResponse.cs | 63 +- Translation/Baidu/BaiduTranslator.cs | 23 +- Translation/DeepL/DeepLRequest.cs | 8 +- Translation/DeepL/DeepLResponse.cs | 71 +- Translation/DeepL/DeepLTranslator.cs | 31 +- Translation/GlobalTranslationSettings.cs | 10 +- Translation/Google/GoogleTranslator.cs | 10 +- Translation/HttpUtils/HttpILogWrapper.cs | 20 + Translation/HttpUtils/WebApi.cs | 188 +- Translation/Multillect/MultillectResponse.cs | 21 - .../Multillect/MultillectTranslator.cs | 47 - Translation/Papago/PapagoEncoder.cs | 44 +- .../Papago/PapagoTranslationRequest.cs | 40 +- Translation/Papago/PapagoTranslator.cs | 48 +- Translation/Translation.csproj | 33 +- .../TranslationResources/DeeplLanguages.json | 10 + .../MultillectTranslateLanguages.json | 82 - .../TranslationResources/PapagoEncoder | 2 +- .../TranslationResources/PapagoEncoder.js | 168 - .../TranslationResources/PapagoLanguages.json | 10 + Translation/TranslationResources/YandexAuth | 1 + .../TranslationResources/YandexAuth.json | 2481 ++++++++++++++ .../TranslationResources/YandexEncoder | 1 + Translation/Utils/Helper.cs | 51 +- Translation/WebTranslator.cs | 45 +- Translation/Yandex/TranslationResponse.cs | 24 + Translation/Yandex/YandexAuthContainer.cs | 32 + Translation/Yandex/YandexRequest.cs | 17 + Translation/Yandex/YandexRequestsEncoder.cs | 145 + Translation/Yandex/YandexSession.cs | 193 ++ Translation/Yandex/YandexTranslator.cs | 110 +- Translation/packages.config | 2 +- ffxivapp-props/Common.props | 43 - ffxivapp-props/FFXIVAPP.Common.props | 14 - .../FFXIVAPP.IPluginInterface.props | 14 - ffxivapp-props/FFXIVAPP.ResourceFiles.props | 14 - ffxivapp-props/Fody.props | 23 - ffxivapp-props/Machina.props | 13 - ffxivapp-props/README.md | Bin 38 -> 0 bytes ffxivapp-props/Sharlayan.props | 14 - 182 files changed, 8352 insertions(+), 1475 deletions(-) create mode 100644 HttpUtilities/HttpMethods.cs create mode 100644 HttpUtilities/HttpReader.cs create mode 100644 HttpUtilities/HttpResponse.cs create mode 100644 HttpUtilities/HttpUtilities.csproj create mode 100644 HttpUtilities/ILog.cs create mode 100644 HttpUtilities/Properties/AssemblyInfo.cs create mode 100644 Sharlayan/FodyWeavers.xsd create mode 100644 Sharlayan/Utilities/AutoTranslate.cs create mode 100644 Translation/HttpUtils/HttpILogWrapper.cs delete mode 100644 Translation/Multillect/MultillectResponse.cs delete mode 100644 Translation/Multillect/MultillectTranslator.cs delete mode 100644 Translation/TranslationResources/MultillectTranslateLanguages.json delete mode 100644 Translation/TranslationResources/PapagoEncoder.js create mode 100644 Translation/TranslationResources/YandexAuth create mode 100644 Translation/TranslationResources/YandexAuth.json create mode 100644 Translation/TranslationResources/YandexEncoder create mode 100644 Translation/Yandex/TranslationResponse.cs create mode 100644 Translation/Yandex/YandexAuthContainer.cs create mode 100644 Translation/Yandex/YandexRequest.cs create mode 100644 Translation/Yandex/YandexRequestsEncoder.cs create mode 100644 Translation/Yandex/YandexSession.cs delete mode 100644 ffxivapp-props/Common.props delete mode 100644 ffxivapp-props/FFXIVAPP.Common.props delete mode 100644 ffxivapp-props/FFXIVAPP.IPluginInterface.props delete mode 100644 ffxivapp-props/FFXIVAPP.ResourceFiles.props delete mode 100644 ffxivapp-props/Fody.props delete mode 100644 ffxivapp-props/Machina.props delete mode 100644 ffxivapp-props/README.md delete mode 100644 ffxivapp-props/Sharlayan.props diff --git a/FFXIVWpfApp1/AppWindows/PatreonWin.xaml b/FFXIVWpfApp1/AppWindows/PatreonWin.xaml index ee0abe1..76b47db 100644 --- a/FFXIVWpfApp1/AppWindows/PatreonWin.xaml +++ b/FFXIVWpfApp1/AppWindows/PatreonWin.xaml @@ -6,16 +6,16 @@ xmlns:local="clr-namespace:FFXIVTataruHelper" mc:Ignorable="d" ResizeMode="NoResize" - Title="{DynamicResource PatreonWindowName}" Height="390" Width="500"> + Title="{DynamicResource PatreonWindowName}" Height="430" Width="500"> - - + + - + @@ -32,14 +32,14 @@ - - Gonzu + + Walrus Juice - - LuxaxaN + + Prinnie PUGI - - Pururu + + Айлин diff --git a/FFXIVWpfApp1/ChatWindow.xaml.cs b/FFXIVWpfApp1/ChatWindow.xaml.cs index 77cb295..639c898 100644 --- a/FFXIVWpfApp1/ChatWindow.xaml.cs +++ b/FFXIVWpfApp1/ChatWindow.xaml.cs @@ -41,12 +41,16 @@ public long WinId TataruModel _TataruModel; ChatWindowViewModel _ChatWindowViewModel; - public ChatWindow(TataruModel tataruModel, ChatWindowViewModel chatWindowViewModel) + MainWindow _MainWindow; + + public ChatWindow(TataruModel tataruModel, ChatWindowViewModel chatWindowViewModel, MainWindow mainWindow) { InitializeComponent(); try { + _MainWindow = mainWindow; + _TataruModel = tataruModel; _ChatWindowViewModel = chatWindowViewModel; @@ -195,8 +199,10 @@ protected async Task OnTextArrived(ChatMessageArrivedEventArgs ea) } } - text = await _TataruModel.ChatProcessor.Translate(ea.ChatMessage.Text, _ChatWindowViewModel.CurrentTransaltionEngine, - _ChatWindowViewModel.CurrentTranslateFromLanguague, _ChatWindowViewModel.CurrentTranslateToLanguague, chatCode.Code); + DateTime timeStamp = default(DateTime); + + if (_ChatWindowViewModel.ShowTimestamps) + timeStamp = ea.ChatMessage.TimeStamp; await this.UIThreadAsync(() => { @@ -205,7 +211,7 @@ await this.UIThreadAsync(() => if (_ChatWindowViewModel.IsHiddenByUser == false) _TextArrivedTime = DateTime.UtcNow; - ShowTransaltedText(text, textColor); + ShowTransaltedText(text, textColor, timeStamp); if (_ChatWindowViewModel.IsHiddenByUser == false) _TextArrivedTime = DateTime.UtcNow; @@ -295,7 +301,7 @@ await this.UIThreadAsync(() => #region **Transaltion. - void ShowTransaltedText(string translatedMsg, Color color) + void ShowTransaltedText(string translatedMsg, Color color, DateTime timeStamp = default(DateTime)) { try { @@ -329,18 +335,25 @@ void ShowTransaltedText(string translatedMsg, Color color) name = msgText.Substring(0, nameInd); text = msgText.Substring(nameInd, msgText.Length - nameInd); + if (timeStamp != default(DateTime)) + name = timeStamp.ToString("HH:mm") + " " + name; + TextRange tr1 = new TextRange(ChatRtb.Document.ContentEnd, ChatRtb.Document.ContentEnd); tr1.Text = name; tr1.ApplyPropertyValue(TextElement.ForegroundProperty, tmpColor); tr1.ApplyPropertyValue(TextElement.FontWeightProperty, FontWeights.Bold); TextRange tr2 = new TextRange(ChatRtb.Document.ContentEnd, ChatRtb.Document.ContentEnd); + tr2.Text = text; tr2.ApplyPropertyValue(TextElement.ForegroundProperty, tmpColor); tr2.ApplyPropertyValue(TextElement.FontWeightProperty, FontWeights.Normal);//*/ } else { + if (timeStamp != default(DateTime)) + translatedMsg = timeStamp.ToString("HH:mm") + " " + translatedMsg; + TextRange tr = new TextRange(ChatRtb.Document.ContentEnd, ChatRtb.Document.ContentEnd); tr.Text = translatedMsg; @@ -468,6 +481,7 @@ void Settings_Click(object sender, RoutedEventArgs e) _SettigsWindow.Visibility = Visibility.Visible; _SettigsWindow.Activate(); _SettigsWindow.Focus();//*/ + _MainWindow.ShowSettingsWindow(); } void Exit_Click(object sender, RoutedEventArgs e) diff --git a/FFXIVWpfApp1/FFHandlers/FFMemoryReader.cs b/FFXIVWpfApp1/FFHandlers/FFMemoryReader.cs index 9d26e50..4e6097e 100644 --- a/FFXIVWpfApp1/FFHandlers/FFMemoryReader.cs +++ b/FFXIVWpfApp1/FFHandlers/FFMemoryReader.cs @@ -487,6 +487,10 @@ public void SendDebugMessages() { await Task.Delay(2000); + /* + _FFxivChat.Enqueue(new FFChatMsg(@"_11_ Inoshishi Bugyo: Für immer mit dieser Täuschung leben zu können Endkampf zuerst die Augen der Wahrheit an sich reißen und schließlich die beiden Furien töten. Im Sterben sagt Alekto dem Spartaner voraus, dass ihr Tod nichts ändern und ihn nicht befreien werde. ", "003D", DateTime.Now)); + _FFxivChat.Enqueue(new FFChatMsg(@"_12_ Inoshishi Bugyo: to live forever with this deception final battle first to grab the eyes of the truth and finally kill the two Furies. In dying, Alekto predicts to the Spartan that her death will not change anything and will not free him. ", "003D", DateTime.Now));//*/ + _FFxivChat.Enqueue(new FFChatMsg(@"_1_ Dakshina:Once you have finished the task, feel free to disssmount your marid.", "003D", DateTime.Now)); _FFxivChat.Enqueue(new FFChatMsg(@"_2_ Dakshina:Once you have finished the task, feel free to disssmount your marid. It will make its own way back here.", "003D", DateTime.Now)); _FFxivChat.Enqueue(new FFChatMsg(@"_3_ Inoshishi Bugyo:But...the boar will not be next year's totem animal... ", "", DateTime.Now)); @@ -496,7 +500,9 @@ public void SendDebugMessages() _FFxivChat.Enqueue(new FFChatMsg(@"_7_ Inoshishi Bugyo:But...the boar will not be next year's totem animal... ", "003D", DateTime.Now)); _FFxivChat.Enqueue(new FFChatMsg(@"_8_ Dakshina:Once you have finished the task, feel free to disssmount your marid. It will make its own way back here.", "", DateTime.Now)); _FFxivChat.Enqueue(new FFChatMsg(@"_9_ Lydirlona:Mayhap you have heard that Rowena's House of Splendors is expanding its operations. I am proud to say that these rumors are true.", "003D", DateTime.Now)); - _FFxivChat.Enqueue(new FFChatMsg(@"_10_ Inoshishi Bugyo:But...the boar will not be next year's totem animal... ", "003D", DateTime.Now));//*/ + _FFxivChat.Enqueue(new FFChatMsg(@"_10_ Inoshishi Bugyo:But...the boar will not be next year's totem animal... ", "003D", DateTime.Now)); + _FFxivChat.Enqueue(new FFChatMsg(@"_11_ Inoshishi Bugyo: Für immer mit dieser Täuschung leben zu können Endkampf zuerst die Augen der Wahrheit an sich reißen und schließlich die beiden Furien töten. Im Sterben sagt Alekto dem Spartaner voraus, dass ihr Tod nichts ändern und ihn nicht befreien werde. ", "003D", DateTime.Now)); + _FFxivChat.Enqueue(new FFChatMsg(@"_12_ Inoshishi Bugyo: to live forever with this deception final battle first to grab the eyes of the truth and finally kill the two Furies. In dying, Alekto predicts to the Spartan that her death will not change anything and will not free him. ", "003D", DateTime.Now)); _FFxivChat.Enqueue(new FFChatMsg(@"Conrad:Ahhh, don't fret over that. You're not the first person to take up arms against the Empire under a false name. We'd do the same if we had any sense....My condolences for your loss, child.", "003D", DateTime.Now)); _FFxivChat.Enqueue(new FFChatMsg(@"Conrad:My comrades and I must confer on your proposal. A moment, if you please...", "003D", DateTime.Now)); _FFxivChat.Enqueue(new FFChatMsg(@"Conrad:Allow me to welcome you once more to Rhalgr's Reach, our humble headquarters.", "003D", DateTime.Now)); diff --git a/FFXIVWpfApp1/GlobalSettings.cs b/FFXIVWpfApp1/GlobalSettings.cs index 05a9348..577e8be 100644 --- a/FFXIVWpfApp1/GlobalSettings.cs +++ b/FFXIVWpfApp1/GlobalSettings.cs @@ -27,6 +27,12 @@ static class GlobalSettings public static string pt_BR_LanguaguePath = @"pt-BR\pt_BR.mo"; + public static string ca_Es_LanguaguePath = @"ca\ca_ES.mo"; + + public static string it_IT_LanguaguePath = @"it\it_IT.mo"; + + public static string uk_UA_LanguaguePath = @"uk\uk_UA.mo"; + public static int SpiWaitTimeOutMS = 500; public static int LookForPorcessDelay = 500; diff --git a/FFXIVWpfApp1/Locale_cloud/ca/ca_ES.mo b/FFXIVWpfApp1/Locale_cloud/ca/ca_ES.mo index 51c44638fb42973cace3603375ed53dc8f708ef4..a747c8365660fa928e41a5e793abec99c1aa2006 100644 GIT binary patch delta 22 dcmeCQ@3i0WOOVr4*T7i8$jHiIGqX?|F91}#24esK delta 22 dcmeCQ@3i0WOOVr8*T6!-z{JXQGqX?|F91~X25SHS diff --git a/FFXIVWpfApp1/Locale_cloud/ca/ca_ES.po b/FFXIVWpfApp1/Locale_cloud/ca/ca_ES.po index f8d16eb..ddbb041 100644 --- a/FFXIVWpfApp1/Locale_cloud/ca/ca_ES.po +++ b/FFXIVWpfApp1/Locale_cloud/ca/ca_ES.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tataru-helper\n" "POT-Creation-Date: 2019-11-19 19:15+0300\n" -"PO-Revision-Date: 2020-03-08 04:57\n" +"PO-Revision-Date: 2020-05-03 22:07\n" "Last-Translator: \n" "Language-Team: Catalan\n" "Language: ca\n" diff --git a/FFXIVWpfApp1/Locale_cloud/en/en_US.mo b/FFXIVWpfApp1/Locale_cloud/en/en_US.mo index e85726cd3047ef1b88712f1b323d0d7bf3835a74..99e4666fdc5df33d3dbc92830a59737ccc924547 100644 GIT binary patch delta 22 dcmaE9{nC2FFF{UIT?1nUBO@z=&CEj2xB+CD2YCPh delta 22 dcmaE9{nC2FFF{UYT>}dR0~0IL&CEj2xB+C)2Y~

gMNCOeWJy`}h274gm50Iw= zq;2FF7z%-OCXfahaC`GlRz@C9Q(XgN1tTLXgU!rBpSk#)^YhX&(@TpIlQR!*&fEM~ H<_;qO;*}t3 delta 199 zcmaE0d((D93~N0*0|Uc183qPcApH+WivwvESq27SAT0x=1%b2ykOrx90@4CN+6zca z0qJO{d>N2t1M)kd;{8CH1;}3oq(S=D18FWGy&Xu40O>l#=n7?@a@Ze|wx%*F1QRa#t_6{Qee)Sx8 diff --git a/FFXIVWpfApp1/Locale_cloud/es-ES/es_ES.po b/FFXIVWpfApp1/Locale_cloud/es-ES/es_ES.po index 716d9f8..fedfd11 100644 --- a/FFXIVWpfApp1/Locale_cloud/es-ES/es_ES.po +++ b/FFXIVWpfApp1/Locale_cloud/es-ES/es_ES.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tataru-helper\n" "POT-Creation-Date: 2019-11-19 19:15+0300\n" -"PO-Revision-Date: 2020-03-08 04:57\n" +"PO-Revision-Date: 2020-05-03 22:07\n" "Last-Translator: \n" "Language-Team: Spanish\n" "Language: es\n" @@ -20,7 +20,7 @@ msgstr "" #: Utils/LanguagueWrapper.cs:109 msgid "Settings" -msgstr "Ajustes" +msgstr "Configuración" #: Utils/LanguagueWrapper.cs:110 msgid "Chat Window" diff --git a/FFXIVWpfApp1/Locale_cloud/it/it_IT.mo b/FFXIVWpfApp1/Locale_cloud/it/it_IT.mo index d1cd07b4a7a377c8483c60d8907804b34c8c1e5e..0186987c338a0bf322a9dcc37baa8a741f70b4c6 100644 GIT binary patch delta 22 dcmX@4en@>oB^Rfuu7RoB^Rf$u7QPufr*vr<|Zx&P5@Hh22ub3 diff --git a/FFXIVWpfApp1/Locale_cloud/it/it_IT.po b/FFXIVWpfApp1/Locale_cloud/it/it_IT.po index 2fff0af..b3e2888 100644 --- a/FFXIVWpfApp1/Locale_cloud/it/it_IT.po +++ b/FFXIVWpfApp1/Locale_cloud/it/it_IT.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tataru-helper\n" "POT-Creation-Date: 2019-11-19 19:15+0300\n" -"PO-Revision-Date: 2020-03-08 04:57\n" +"PO-Revision-Date: 2020-05-03 22:07\n" "Last-Translator: \n" "Language-Team: Italian\n" "Language: it\n" diff --git a/FFXIVWpfApp1/Locale_cloud/ko/ko_KR.mo b/FFXIVWpfApp1/Locale_cloud/ko/ko_KR.mo index 818b46bc25508221417210693dfff6a1b58743b8..6ba5472255e642ce7a96b047c8d80b7474d21733 100644 GIT binary patch delta 845 zcmXZaO-NKx6u|K_ISe^YQg6nOm_BAz3O#Tfo`#D)hY8U|VpJ}a5u3%R_=Va=c%VVx zA|h8oXh9eV!ssk)B_g?KA?*u77tuZ>ERp&j-x(hBd*|MF&$;)!_wUx)?NY45?>;56 zbxtHAB8h~^8B8LVG+KNE&k}c9+>24-Av}-M=1X(M{A7MN4^5{gSa+>P{F8z?2DHEf z)Wijh;~3WAGn;>dS>jbZjlawzbcw^YB3#nUpRQ|1YDzyg;xsPfTdc%;b-qZ9n=YQ# z4)ozgEMPUx+4w8ejlD+g(0g+ob^VsbyQqo3p%(sun(r@8g+%J>MHcY|ZJS5ePX-G< zUI;d@joOLNsENOtKg|O(L{^=zHj`$9>ERXT@1TQ4)C0`mEI!8u^rM%8f*I5fWKmDp zVR4Ved2_^^LG~{5s3%^w@e*pDO&i}qJ}>!#+L3*m{~hSdF*jN;d^vc)L5;7XCialm zB{wa8h}xmNId0CPu3NxI_zpYq59TqK3i5qGI&Z&nByvy{z3!&HRN8CHc;&FO5pwQN uj1CqCCf)XITPoAi+LUQsD8$L`&U(Wg&}BW|uZTsWC+DeuLXV*df*&s#zO delta 805 zcmXZaKSj4kcPnBKafMcAAg@4?)81Xf1c<2eeS*v{OkXcjE8qB%yw>? zCCu!1#w>*=7~qBCBtZ>vJ^K1Xtj5P!hebIq-^h=0OYX^I`8TleDq)a~3fx6cTtI5u zQ_SIWtxsW*cn&LZNB+Qe;xg8vfBCr_Qp-B<0Tyu`r?CpNxzH@hpo!hyfi`T!0^Y!3 z%}=0TY!bZ#Gjaj_{CmZ#=!rMc3zyLI9pG%t><_Nt7;SrtmtlQ$V5uRxzz6hJub?O1 zkl*BYc_@F$6L~JFm^k-KpOppb&6XR=Vh-P#9Qne zMSt;Y&CjEE@}1_Fk-wLHLhs0Dt?x#L_LG4ZENjED;xqKb@uuiEO`*s4&@Y^qeR2pr z&r5uPukab};{*oH(fL`V^ZJw$iPP)Vh4#*#=FUe?y1Gl((%Z4+qfARF6Raiw1F?Th AhyVZp diff --git a/FFXIVWpfApp1/Locale_cloud/ko/ko_KR.po b/FFXIVWpfApp1/Locale_cloud/ko/ko_KR.po index be4164d..7362f1a 100644 --- a/FFXIVWpfApp1/Locale_cloud/ko/ko_KR.po +++ b/FFXIVWpfApp1/Locale_cloud/ko/ko_KR.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tataru-helper\n" "POT-Creation-Date: 2019-11-19 19:15+0300\n" -"PO-Revision-Date: 2020-03-08 04:57\n" +"PO-Revision-Date: 2020-08-15 15:35\n" "Last-Translator: \n" "Language-Team: Korean\n" "Language: ko\n" @@ -15,8 +15,10 @@ msgstr "" "X-Poedit-KeywordsList: GetString;GetPluralString:1,2;GetParticularString:1c,2;GetParticularPluralString:1c,2,3;_;_n:1,2;_p:1c,2;_pn:1c,2,3\\n" "X-Poedit-SearchPath-0: .\n" "X-Crowdin-Project: tataru-helper\n" +"X-Crowdin-Project-ID: 367037\n" "X-Crowdin-Language: ko\n" "X-Crowdin-File: en_US.po\n" +"X-Crowdin-File-ID: 6\n" #: Utils/LanguagueWrapper.cs:109 msgid "Settings" diff --git a/FFXIVWpfApp1/Locale_cloud/pl/pl_PL.mo b/FFXIVWpfApp1/Locale_cloud/pl/pl_PL.mo index 723e22dea149b9f3d623d3319cf84fb656cedb5b..b1e4ecf8e9ab1a5cde46d97a376b6dd50558252a 100644 GIT binary patch delta 22 dcmeA&>oVK$i;vS(*T7i8$jHiIGc!Ls4**g{1oVK$i;vS-*T6!-z{JXQGc!Ls4**hp1=Rom diff --git a/FFXIVWpfApp1/Locale_cloud/pl/pl_PL.po b/FFXIVWpfApp1/Locale_cloud/pl/pl_PL.po index 5e18ce7..aac0719 100644 --- a/FFXIVWpfApp1/Locale_cloud/pl/pl_PL.po +++ b/FFXIVWpfApp1/Locale_cloud/pl/pl_PL.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tataru-helper\n" "POT-Creation-Date: 2019-11-19 19:15+0300\n" -"PO-Revision-Date: 2020-03-08 04:57\n" +"PO-Revision-Date: 2020-05-03 22:07\n" "Last-Translator: \n" "Language-Team: Polish\n" "Language: pl\n" diff --git a/FFXIVWpfApp1/Locale_cloud/pt-BR/pt_BR.mo b/FFXIVWpfApp1/Locale_cloud/pt-BR/pt_BR.mo index fecad94dcb0c7dd2dd7b0b22fc702343f82359a5..860222017f75a23e9e1c344c366989e17ee3baa1 100644 GIT binary patch delta 2227 zcmY+EU2IfE7>1{%v=*(UrARFm4j@v5Zd>~YwXG~&+ahhLjWI?N&9Ob|f$i?HKW&0P zn_yys3Gt$sn3{M&O-QUZmtmAA}2Q0wLbi8ZV3i#S2MLpZ9cDadO^yX6Bsv z=9}-EIn%pOw`YGSFL=vPhEO&7Am5l#*uIjAa;?yqJK%N8o3MobiXvl*VHsQv*IVv{ z`o05}!fv<6P zDySUofHKf(*#Xzn?}9oT&%zlF;h5!Cwy*wo7?YjXs+Lo565dPy9VokJEwkrs3_FTBs1VK%Jck+yi@|7CsJ@qDiPT@E+7Po`%}cmykVY%|#kY!6KAr zzd;`J7nKZGF-wuz0F|0nC<8rE-}S>S(1!}~38-98LOFN}>bo;AI3rLFU4;d@|BEzq zh<=8ea2@Ip{SEJf>!@_ynqdQc8K&S2RE{@qAZ<`3vW%c6Bf$?%wp0|AJ`|ic_y{V{ z{m+$N+t>>UjcG!1Y%|i~I)Icz{0fS8`!MQ6{lUm`$RD%qjh2ck*$c`ZYDM88v=wC^ zplU>INM#Tye2*f9bqL*F6v|elNa^RZAKhNUbQCR>T}Y|wLiiQ&cA%Z87U{~>p?cJVa%I3aYAo9=x53Ae(x#kmLOM%iZn=afJ}aEs z67`1FfOk%`M2d$Vl?u>cKlpl|UW)BwS6=wV5@xy-X1?TyA(tei;g+gXv zuq&)8Vg{Jv^k9}t@Vwq z6O(046;IW6CFA2Geyq0Jk9xt|mWc~xUxcFmk&NfKM>4*XaFed%rZaBTKk6oJ*NMf) z+`#wwsd#Ai&GKkbmNkYmNjEkUcM|MBH)a0x{8=v-hMI6JhQq_&cEv+p|7*n=@l%O- pZ2rSBFRB3eF@M;{2geOUfSD-_|Ie9_38&MJ9}8yAR#r{q{{uvjBklkI delta 1819 zcmYk+Sx8h-9LMp~sF_QnGq#(PWtwB#xK-M!j<&g!K`$BYMax)FMhS6S9x5m>rg|w# z3N$i;7z(WS#8W;9X3_jm)OCZbD744K-m1_5Cs1K7soEIn=_hVw!P` z>7=3^+(Z4K-?pD)I_=jO9A(TPhA^Me8!*gltigQbCcZMC(SzSm3rJ)(nPHt`&9??5 z^P9!Cqt3b>wU8F;Hq^ko(T&GYJ3fob%thPowBL6jAM=olGV%hmZ~zl<$o3DTqm_TB zq5*%SGT~yD@tB3$p&xZ$G3rb!Q4_DR?aj!sn-FT@M^Gs~j>_N})cqYe4sYX9>~)j> zSyX<~5keoMYk&*5ln3z=YM=qOuLZnAE#MPQ#BZp9Q@LoO9Mpn~Q2ixb*psP6rZ5|9 zdpl~JLtgT)%1Jtufe!0coJadQYQ<6HV+OhO<9F0TACOo5?h$GMPf=(7()Pcx{qJ!S z{llmXYfv4H$DyJDa;$lnP1}zXuomz0u(epz=v4bL+t)yQC&yFYj(p51E*kinwc8r8 zKC?!x&Rbg=)``NtqI#Xe{a|e5kW7M7^H#Q5&d7)@YhhsosNH$WhdWPNT-V zfy%@!B=e4WLPY~aQ8&KAJp6)6sfSLTsSmZV0@QtFTy%8nPz&0MI+8u8XXOCu{x;OJ zat3qo8rESS7VG`jHV#7xYJe^z!~e@PYBLBeW&u%8%p^33cA~;_7%Ks;g@h)YPRu6q ziMa$vZ{`z=iCUtX$kY4{#J}RF5+r=YYNC-K5oQjdQV=KhaH_h5P`Y(AD+%p5mrzj_ zN(nX^I|_&$nU0}~Q1%?9PGt>IOcbdxqAa8ydtz}JQ8wbcwIk{k)GG)MASj* zP{mEqNho9!!IsieiaLoP6mh8)EghtTi{Ss58$Q0@y*D}co_kJ~n)aGLIc=8ML_X(; z_(kN4S0ocp@hSenN9gd0Ji%P#r&5I;tj7#|YwR#4jKjuB4D%fC^1wH6H z>H)_X#S6^C!d#J;7{e}X!z}!2Jj5#IC-@Lu1eKy6i}4MXVK3IDiL9WV`ANRT?HHWq zi#)*Js0m!58*fn$autY>ixglXRw9oy^UB5q7U38=aTQsW(U8ELy1 z^r2=xg?hs|)QW7O-e4Oa<4@GY&QUkMMjJY*v#z^Q{~LbP_)09t2x>*zQTLfcx@E}* z1Co~=)YAV#P2eADYg{F%p8C+vya=@wrKky1qgJpL$wkI-7T2&51Dv{#1E}$F%A1C% zPtxJ|pPltO7>Wc!k$5bN_8Lx#XSp+yRv)UGe|` delta 805 zcmXZaPe_w-7{Kvoe_Z0`zqyr>D>a=NT7ygzK-OS+@OdL7jP4o@c}xgEIL@+rF^Y? z67`08)Q&tsy}>$O!adZ&-k=7qpbvlAehu~8sH2{5;C1vd2kpoW)Hr!$I*zQcph$U& z+WMEM1$;ssO%-*f$LPnusH6CgT0m&H*}*uHOR`wRCCuR;{E8W}>-kpN>%r#F4FvuL b+ir~~(*23#z1u0*AAamD6(e!C5^=(3n*LTX diff --git a/FFXIVWpfApp1/Locale_cloud/ru/ru_RU.po b/FFXIVWpfApp1/Locale_cloud/ru/ru_RU.po index 5f09d58..8dd597a 100644 --- a/FFXIVWpfApp1/Locale_cloud/ru/ru_RU.po +++ b/FFXIVWpfApp1/Locale_cloud/ru/ru_RU.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tataru-helper\n" "POT-Creation-Date: 2019-11-19 19:15+0300\n" -"PO-Revision-Date: 2020-03-08 04:57\n" +"PO-Revision-Date: 2020-08-15 15:35\n" "Last-Translator: \n" "Language-Team: Russian\n" "Language: ru\n" @@ -15,8 +15,10 @@ msgstr "" "X-Poedit-KeywordsList: GetString;GetPluralString:1,2;GetParticularString:1c,2;GetParticularPluralString:1c,2,3;_;_n:1,2;_p:1c,2;_pn:1c,2,3\\n" "X-Poedit-SearchPath-0: .\n" "X-Crowdin-Project: tataru-helper\n" +"X-Crowdin-Project-ID: 367037\n" "X-Crowdin-Language: ru\n" "X-Crowdin-File: en_US.po\n" +"X-Crowdin-File-ID: 6\n" #: Utils/LanguagueWrapper.cs:109 msgid "Settings" diff --git a/FFXIVWpfApp1/Locale_cloud/uk/uk_UA.mo b/FFXIVWpfApp1/Locale_cloud/uk/uk_UA.mo index 5855140b615c54be1f37ade472ce05da43aaa6b6..7e32589730309151f274548939558d5e083f733c 100644 GIT binary patch delta 22 dcmdnxv&(10FF{UIT?1nUBO@z=&CEjPA^=`C2A2Q; delta 22 dcmdnxv&(10FF{UYT>}dR0~0IL&CEjPA^=`(2A==` diff --git a/FFXIVWpfApp1/Locale_cloud/uk/uk_UA.po b/FFXIVWpfApp1/Locale_cloud/uk/uk_UA.po index a26b6c2..f721b90 100644 --- a/FFXIVWpfApp1/Locale_cloud/uk/uk_UA.po +++ b/FFXIVWpfApp1/Locale_cloud/uk/uk_UA.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: tataru-helper\n" "POT-Creation-Date: 2019-11-19 19:15+0300\n" -"PO-Revision-Date: 2020-03-08 04:57\n" +"PO-Revision-Date: 2020-05-03 22:07\n" "Last-Translator: \n" "Language-Team: Ukrainian\n" "Language: uk\n" diff --git a/FFXIVWpfApp1/MainWindow.xaml b/FFXIVWpfApp1/MainWindow.xaml index 47c7700..1ae07ed 100644 --- a/FFXIVWpfApp1/MainWindow.xaml +++ b/FFXIVWpfApp1/MainWindow.xaml @@ -24,30 +24,49 @@ - -

- - + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - - + - + @@ -196,6 +215,8 @@ + + diff --git a/FFXIVWpfApp1/MainWindow.xaml.cs b/FFXIVWpfApp1/MainWindow.xaml.cs index 0af99ec..681de3d 100644 --- a/FFXIVWpfApp1/MainWindow.xaml.cs +++ b/FFXIVWpfApp1/MainWindow.xaml.cs @@ -115,6 +115,12 @@ private void Patrons_Click(object sender, RoutedEventArgs e) patreonWin.Resources["PatronsThankYou"] = this.Resources["PatronsThankYou"]; } + private void Discord_Click(object sender, RoutedEventArgs e) + { + var uri = new Uri("https://discord.gg/bSrpbd9"); + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(uri.AbsoluteUri)); + } + private void HideToTray_Changed(object sender, RoutedEventArgs e) { var isHideToTray = (bool)((CheckBox)sender).IsChecked; @@ -143,6 +149,12 @@ private void CheckUpdates_Click(object sender, RoutedEventArgs e) _Updater.CheckAndInstallUpdates(CmdArgsStatus.PreRelease); } + private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e) + { + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(e.Uri.AbsoluteUri)); + e.Handled = true; + } + #endregion #region **WindowEvents @@ -159,7 +171,8 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) { try { - _TataruModel = new TataruModel(); + _TataruModel = new TataruModel(this); + await _TataruModel.InitializeComponent(); _TataruUIModel = _TataruModel.TataruUIModel; @@ -189,7 +202,6 @@ private async void Window_Loaded(object sender, RoutedEventArgs e) #if DEBUG #else - Task.Run(() => { @@ -510,7 +522,7 @@ private void TBDoubleClick(object sender, RoutedEventArgs e) ShowSettingsWindow(); } - private void ShowSettingsWindow() + public void ShowSettingsWindow() { Helper.Unminimize(this); @@ -565,7 +577,7 @@ protected override void OnClosing(System.ComponentModel.CancelEventArgs e) private void Window_Closed(object sender, EventArgs e) { - _LogWriter.Stop(); + _LogWriter?.Stop(); } public void ShutDown() diff --git a/FFXIVWpfApp1/Properties/AssemblyInfo.cs b/FFXIVWpfApp1/Properties/AssemblyInfo.cs index a6bdb39..e04edc5 100644 --- a/FFXIVWpfApp1/Properties/AssemblyInfo.cs +++ b/FFXIVWpfApp1/Properties/AssemblyInfo.cs @@ -56,5 +56,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.62.0")] -[assembly: AssemblyFileVersion("0.9.62.0")] +[assembly: AssemblyVersion("0.9.86.0")] +[assembly: AssemblyFileVersion("0.9.86.0")] diff --git a/FFXIVWpfApp1/TataruComponentModel/PropertyBinder.cs b/FFXIVWpfApp1/TataruComponentModel/PropertyBinder.cs index 9d42d33..ce99a82 100644 --- a/FFXIVWpfApp1/TataruComponentModel/PropertyBinder.cs +++ b/FFXIVWpfApp1/TataruComponentModel/PropertyBinder.cs @@ -56,7 +56,7 @@ public void AddPropertyCouple(PropertyCouple couple) { if (!_PropertyCouples.TryAdd(pr.PropName1, pr)) { - string msg = "Tryed to bind pporperty with alredy binded property. " + Environment.NewLine; + string msg = "Tried to bind property with already binded property. " + Environment.NewLine; msg += Convert.ToString(_Object1) + "; " + Convert.ToString(_Object2) + ";" + Environment.NewLine; msg += pr.Property1Info.ToString() + "; " + pr.Property2Info.ToString() + ";"; diff --git a/FFXIVWpfApp1/TataruHelper.csproj b/FFXIVWpfApp1/TataruHelper.csproj index 98a79d4..b9fb568 100644 --- a/FFXIVWpfApp1/TataruHelper.csproj +++ b/FFXIVWpfApp1/TataruHelper.csproj @@ -66,9 +66,6 @@ app.manifest - - OnBuildSuccess - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll @@ -258,6 +255,24 @@ Always + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + diff --git a/FFXIVWpfApp1/TextDictionary.xaml b/FFXIVWpfApp1/TextDictionary.xaml index 9e2ffcb..bc97fa7 100644 --- a/FFXIVWpfApp1/TextDictionary.xaml +++ b/FFXIVWpfApp1/TextDictionary.xaml @@ -15,12 +15,16 @@ Polski 한국어 Português brasileiro + Català + Italiano + Українська Help About Patrons + Discord FF Status: @@ -77,6 +81,7 @@ Direct Memory Reading Direct Memory Tooltip Hide to Tray + Show Timestamps Show Chat Window Hide Chat Window diff --git a/FFXIVWpfApp1/UIModel/ChatWindowViewModelSettings.cs b/FFXIVWpfApp1/UIModel/ChatWindowViewModelSettings.cs index 4f467d9..4e75271 100644 --- a/FFXIVWpfApp1/UIModel/ChatWindowViewModelSettings.cs +++ b/FFXIVWpfApp1/UIModel/ChatWindowViewModelSettings.cs @@ -52,6 +52,8 @@ public event AsyncEventHandler AsyncPropertyChang private List _chatCodes; + private bool _ShowTimestamps; + private HotKeyCombination _showHideChatKeys; private HotKeyCombination _clickThoughtChatKeys; private HotKeyCombination _clearChatKeys; @@ -198,6 +200,18 @@ public Color BackGroundColor } } + public bool ShowTimestamps + { + get => _ShowTimestamps; + set + { + if (_ShowTimestamps == value) return; + + _ShowTimestamps = value; + OnPropertyChanged(); + } + } + public TranslationEngineName TranslationEngineName { get => _translationEngineName; @@ -390,6 +404,8 @@ public ChatWindowViewModelSettings(ChatWindowViewModelSettings settings) ChatCodes = settings.ChatCodes.Select(code => new ChatCodeViewModel(code)).ToList(); + ShowTimestamps = settings.ShowTimestamps; + ShowHideChatKeys = new HotKeyCombination(settings.ShowHideChatKeys); ClickThoughtChatKeys = new HotKeyCombination(settings.ClickThoughtChatKeys); ClearChatKeys = new HotKeyCombination(settings.ClearChatKeys); diff --git a/FFXIVWpfApp1/UIModel/TataruModel.cs b/FFXIVWpfApp1/UIModel/TataruModel.cs index 6130589..013ae2d 100644 --- a/FFXIVWpfApp1/UIModel/TataruModel.cs +++ b/FFXIVWpfApp1/UIModel/TataruModel.cs @@ -77,6 +77,8 @@ public HotKeyManager HotKeyManager List _ChatWindows; + MainWindow _MainWindow; + TataruViewModel _TataruViewModel; TataruUIModel _TataruUIModel; @@ -100,10 +102,12 @@ public HotKeyManager HotKeyManager #endregion - public TataruModel() + public TataruModel(MainWindow mainWindow) { CmdArgsStatus.LoadArgs(); + _MainWindow = mainWindow; + _PropertyBinders = new List(); _ChatWindows = new List(); @@ -175,7 +179,6 @@ public void LoadSettings() } var userSettings = Helper.LoadJsonData(GlobalSettings.Settings); - LoadOldSettings(userSettings); if (userSettings == null) @@ -184,6 +187,8 @@ public void LoadSettings() Logger.WriteLog("userSettings == null"); } + LoadMissingChatCodes(userSettings); + for (int i = 0; i < userSettings.ChatWindows.Count; i++) { userSettings.ChatWindows[i].WinId = i; @@ -426,7 +431,7 @@ await Task.Run(() => { ChatWindowViewModel newElem = ea.ChangedElemnt; - _ChatWindows.Add(new ChatWindow(this, newElem)); + _ChatWindows.Add(new ChatWindow(this, newElem, _MainWindow)); _ChatWindows[_ChatWindows.Count - 1].Show(); }); } @@ -464,6 +469,8 @@ private void CreateBinderCouples(PropertyBinder binder) binder.AddPropertyCouple(new PropertyCouple("BackGroundColor", "BackGroundColor")); + binder.AddPropertyCouple(new PropertyCouple("ShowTimestamps", "ShowTimestamps")); + binder.AddPropertyCouple(new PropertyCouple("ChatWindowRectangle", "ChatWindowRectangle")); binder.AddPropertyCouple(new PropertyCouple("TranslationEngineName", "TranslationEngines", @@ -647,6 +654,28 @@ await Task.Run(() => }); } + void LoadMissingChatCodes(UserSettings userSettings) + { + foreach (var win in userSettings.ChatWindows) + { + if (win.ChatCodes.Count != _ChatProcessor.AllChatCodes.Count) + { + var newUserChatCodes = new List(_ChatProcessor.AllChatCodes.Count); + + foreach (var code in _ChatProcessor.AllChatCodes) + { + var userCode = win.ChatCodes.FirstOrDefault(x => x.Code == code.ChatCode); + bool isChecked = false; + if (userCode != null) + isChecked = userCode.IsChecked; + + newUserChatCodes.Add(new ChatCodeViewModel(code.ChatCode, code.Name, code.Color, isChecked)); + } + + win.ChatCodes = newUserChatCodes; + } + } + } void LoadOldSettings(UserSettings userSettings) { if (!File.Exists(GlobalSettings.OldSettings)) diff --git a/FFXIVWpfApp1/UIModel/TataruUIModel.cs b/FFXIVWpfApp1/UIModel/TataruUIModel.cs index b98cd60..6671ef5 100644 --- a/FFXIVWpfApp1/UIModel/TataruUIModel.cs +++ b/FFXIVWpfApp1/UIModel/TataruUIModel.cs @@ -223,8 +223,6 @@ public void SetSettings(UserSettings userSettings) var tmpChatWindows = new List(userSettings.ChatWindows); - TataruComponentModel.AsyncBindingList bs = new TataruComponentModel.AsyncBindingList(); - UiWindow.Window.UIThread(() => { foreach (var win in tmpChatWindows) diff --git a/FFXIVWpfApp1/UIModel/UserSettings.cs b/FFXIVWpfApp1/UIModel/UserSettings.cs index 3d151ee..a2510b7 100644 --- a/FFXIVWpfApp1/UIModel/UserSettings.cs +++ b/FFXIVWpfApp1/UIModel/UserSettings.cs @@ -117,8 +117,6 @@ public UserSettings() { "0044", new ChatMsgType("0044", MsgType.Translate,"NPCA",(Color)ColorConverter.ConvertFromString("#FFABD647")) }, }; - //ChatWindows = new List(new ChatWindowViewModelSettings[] { new ChatWindowViewModelSettings() }); - ChatWindows = new List(); IsFirstTime = 0; diff --git a/FFXIVWpfApp1/Utils/LanguagueWrapper.cs b/FFXIVWpfApp1/Utils/LanguagueWrapper.cs index 906a4e2..65516fd 100644 --- a/FFXIVWpfApp1/Utils/LanguagueWrapper.cs +++ b/FFXIVWpfApp1/Utils/LanguagueWrapper.cs @@ -21,7 +21,9 @@ public enum Languages : int Polish = 4, Korean = 5, PortugueseBR = 6, - + Catalan = 7, + Italian = 8, + Ukrainian = 9, }; public Languages CurrentLanguage @@ -80,6 +82,15 @@ private void SetLanguague(Languages languague) case Languages.PortugueseBR: path += GlobalSettings.pt_BR_LanguaguePath; break; + case Languages.Catalan: + path += GlobalSettings.ca_Es_LanguaguePath; + break; + case Languages.Italian: + path += GlobalSettings.it_IT_LanguaguePath; + break; + case Languages.Ukrainian: + path += GlobalSettings.uk_UA_LanguaguePath; + break; default: path += GlobalSettings.en_US_LanguaguePath; diff --git a/FFXIVWpfApp1/ViewModel/ChatWindowViewModel.cs b/FFXIVWpfApp1/ViewModel/ChatWindowViewModel.cs index 2b0a428..53e2900 100644 --- a/FFXIVWpfApp1/ViewModel/ChatWindowViewModel.cs +++ b/FFXIVWpfApp1/ViewModel/ChatWindowViewModel.cs @@ -415,6 +415,18 @@ public TranslatorLanguague CurrentTranslateToLanguague get { return (TranslatorLanguague)TranslateToLanguagues.CurrentItem; } } + public bool ShowTimestamps + { + get => _ShowTimestamps; + set + { + if (_ShowTimestamps == value) return; + + _ShowTimestamps = value; + OnPropertyChanged(); + } + } + public bool IsSelected { get { return _IsSelected; } @@ -483,6 +495,8 @@ public bool IsWindowVisible HotKeyManager _HotKeyManager; + bool _ShowTimestamps; + bool _IsSelected; bool _IsWindowVisible; @@ -541,6 +555,8 @@ public ChatWindowViewModel(ChatWindowViewModelSettings settings, List _GlobalHost; } + + public string UserAgent { get; set; } = "User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"; + public string Accept { get; set; } = "text/html, application/xhtml+xml, */*"; + public string ContentType { get; set; } = "application/x-www-form-urlencoded"; + + public bool ThrowExceptions { get => _ThrowExceptions; set => _ThrowExceptions = value; } + + public IDictionary OptionalHeaders { get => _OptionalHeaders; set => _OptionalHeaders = value; } + + #endregion + + #region Protected fileds + + protected string _GlobalHost; + + protected CookieContainer _GlobalCookie; + + protected string _AuthorizationString = null; + + protected ILog _Logger; + + protected bool _ThrowExceptions = false; + + protected IDictionary _OptionalHeaders; + + #endregion + + public HttpReader(CookieContainer cookieIn, ILog logger = null) + { + _Logger = logger; + Init(null, cookieIn, null); + } + + public HttpReader(ILog logger = null) + { + _Logger = logger; + Init(null, null, null); + } + + public HttpReader(string host, ILog logger = null) + { + _Logger = logger; + Init(host, null, null); + } + + public HttpReader(string host, string authorizationString, ILog logger = null) + { + _Logger = logger; + Init(host, null, authorizationString); + } + + public HttpReader(string host, CookieContainer cookieIn, string authorizationString = null, ILog logger = null) + { + _Logger = logger; + Init(host, cookieIn, authorizationString); + } + + public HttpReader(HttpReader reader) + { + this._Logger = reader._Logger; + Init(reader._GlobalHost, reader._GlobalCookie, reader._AuthorizationString); + } + + private void Init(string host, CookieContainer cookieIn, string authorizationString) + { + _GlobalHost = host; + + if (cookieIn != null) + _GlobalCookie = cookieIn; + else + _GlobalCookie = new CookieContainer(); + + _AuthorizationString = authorizationString; + + _OptionalHeaders = new Dictionary(); + } + + #region AsyncMethods + + public virtual async Task RequestWebDataAsync(string url, HttpMethods method, bool acceptCookie = false) + { + HttpResponse result = new HttpResponse(); + + await Task.Run(() => result = RequestWebData(url, method, acceptCookie)); + + if (_ThrowExceptions) + if (result.InnerException != null) + throw result.InnerException; + + return result; + } + + public virtual async Task RequestWebDataAsync(string url, HttpMethods method, string dataIn, bool acceptCookie = false) + { + HttpResponse result = new HttpResponse(); + + await Task.Run(() => result = RequestWebData(url, method, dataIn, acceptCookie)); + + if (_ThrowExceptions) + if (result.InnerException != null) + throw result.InnerException; + + return result; + } + + #endregion + + #region SyncMethods + + public virtual HttpResponse RequestWebData(string url, HttpMethods method, bool acceptCookie = false) + { + HttpResponse result = new HttpResponse(); + + try + { + WebRequest localRequest = PrepRequest(url, method, _GlobalCookie, _AuthorizationString); + + string content = string.Empty; + + content = ReadWebData(localRequest, null, acceptCookie); + + result = new HttpResponse(true, content); + } + catch (Exception e) + { + _Logger?.WriteLog(e?.ToString() ?? "Exception is null"); + + if (_ThrowExceptions) + throw e; + + result = new HttpResponse(false, null, e); + } + + return result; + } + + public virtual HttpResponse RequestWebData(string url, HttpMethods method, string dataIn, bool acceptCookie = false) + { + HttpResponse result = new HttpResponse(); + + try + { + WebRequest localRequest = PrepRequest(url, method, _GlobalCookie, _AuthorizationString); + + string content = string.Empty; + + content = ReadWebData(localRequest, dataIn, acceptCookie); + + result = new HttpResponse(true, content); + } + catch (Exception e) + { + _Logger?.WriteLog(e?.ToString() ?? "Exception is null"); + + if (_ThrowExceptions) + throw e; + + result = new HttpResponse(false, null, e); + } + + return result; + } + + #endregion + + #region ProtecteMethods + + protected virtual WebRequest PrepRequest(string url, HttpMethods method, CookieContainer cookie = null, string authorizationString = null) + { + var uri = new Uri(url); + WebRequest localRequest = WebRequest.Create(uri); + localRequest.Method = method.ToString(); + + if (UserAgent != null) + ((HttpWebRequest)localRequest).UserAgent = UserAgent; + if (Accept != null) + ((HttpWebRequest)localRequest).Accept = Accept; + + if (_GlobalHost != null) + ((HttpWebRequest)localRequest).Host = _GlobalHost; + else + ((HttpWebRequest)localRequest).Host = uri.Host; + + if (ContentType != null) + localRequest.ContentType = ContentType; + + if (cookie != null) + ((HttpWebRequest)localRequest).CookieContainer = cookie; + + if (authorizationString != null) + ((HttpWebRequest)localRequest).Headers.Add("Authorization", authorizationString); + + if (_OptionalHeaders != null) + { + foreach (KeyValuePair headerPair in _OptionalHeaders) + { + if (headerPair.Key != null && headerPair.Value != null) + ((HttpWebRequest)localRequest).Headers.Add(headerPair.Key, headerPair.Value); + } + } + + return localRequest; + } + + protected virtual string ReadWebData(WebRequest request, string dataIn = null, bool acceptCookie = false) + { + string content = string.Empty; + + if (dataIn != null) + { + var dataBytes = Encoding.UTF8.GetBytes(dataIn); + + request.ContentLength = dataBytes.Length; + + using (Stream dataStream = request.GetRequestStream()) + { + dataStream.Write(dataBytes, 0, dataBytes.Length); + dataStream.Close(); + } + } + + using (WebResponse localResponse = request.GetResponse()) + { + using (Stream ReceiveStream = localResponse.GetResponseStream()) + { + Encoding encode = System.Text.Encoding.GetEncoding("utf-8"); + + using (StreamReader readStream = new StreamReader(ReceiveStream, encode)) + { + content = readStream.ReadToEnd(); + readStream.Close(); + } + + if (acceptCookie) + { + try + { + var cookies = (localResponse as HttpWebResponse)?.Cookies; + + if (cookies != null) + { + if (_GlobalCookie == null) + _GlobalCookie = new CookieContainer(); + + foreach (Cookie newCookie in cookies) + { + _GlobalCookie.Add(request.RequestUri, newCookie); + } + } + } + catch (Exception ex) + { + _Logger?.WriteLog(ex?.ToString() ?? "Exception is null"); + } + } + + ReceiveStream.Close(); + } + + localResponse.Close(); + } + + return content; + } + #endregion + + } +} diff --git a/HttpUtilities/HttpResponse.cs b/HttpUtilities/HttpResponse.cs new file mode 100644 index 0000000..63790f8 --- /dev/null +++ b/HttpUtilities/HttpResponse.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace HttpUtilities +{ + public class HttpResponse + { + public virtual string Body { get; protected set; } + + public virtual bool IsSuccessful { get; protected set; } + + public virtual Exception InnerException { get; protected set; } + + public HttpResponse() + { + this.Body = null; + this.IsSuccessful = false; + this.InnerException = null; + } + + public HttpResponse(bool isSuccessful, string bodey) + { + this.Body = bodey; + this.IsSuccessful = isSuccessful; + this.InnerException = null; + } + + public HttpResponse(bool isSuccessful, string bodey, Exception exception) + { + this.Body = bodey; + this.IsSuccessful = isSuccessful; + this.InnerException = exception; + } + } +} diff --git a/HttpUtilities/HttpUtilities.csproj b/HttpUtilities/HttpUtilities.csproj new file mode 100644 index 0000000..c8c2a6e --- /dev/null +++ b/HttpUtilities/HttpUtilities.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + {9EE1301D-A646-4DDA-9C62-36E901E7603B} + Library + Properties + HttpUtilities + HttpUtilities + v4.6.1 + 512 + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HttpUtilities/ILog.cs b/HttpUtilities/ILog.cs new file mode 100644 index 0000000..5b6a632 --- /dev/null +++ b/HttpUtilities/ILog.cs @@ -0,0 +1,18 @@ +// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + + +namespace HttpUtilities +{ + public interface ILog + { + void WriteLog(string InputString, [CallerMemberName] string memberName = "", [CallerLineNumber] int sourceLineNumber = 0); + } +} diff --git a/HttpUtilities/Properties/AssemblyInfo.cs b/HttpUtilities/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ee3e0da --- /dev/null +++ b/HttpUtilities/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("HttpUtilities")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HttpUtilities")] +[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("9ee1301d-a646-4dda-9c62-36e901e7603b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Sharlayan/AttachmentWorker.cs b/Sharlayan/AttachmentWorker.cs index fbb6f56..a14ed54 100644 --- a/Sharlayan/AttachmentWorker.cs +++ b/Sharlayan/AttachmentWorker.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -17,6 +17,7 @@ namespace Sharlayan { using System; using System.Diagnostics; using System.Linq; + using System.Threading.Tasks; using System.Timers; using NLog; @@ -39,7 +40,6 @@ public AttachmentWorker() { public void Dispose() { this._scanTimer.Elapsed -= this.ScanTimerElapsed; - _scanTimer.Dispose(); } /// @@ -76,7 +76,8 @@ private void ScanTimerElapsed(object sender, ElapsedEventArgs e) { this._isScanning = false; return true; }; - scanner.BeginInvoke(delegate { }, scanner); + + Task.Run(() => scanner.Invoke()); } } } \ No newline at end of file diff --git a/Sharlayan/Constants.cs b/Sharlayan/Constants.cs index c84d6cf..a02077e 100644 --- a/Sharlayan/Constants.cs +++ b/Sharlayan/Constants.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -21,7 +21,7 @@ namespace Sharlayan { internal static class Constants { public static readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, - DefaultValueHandling = DefaultValueHandling.Populate + DefaultValueHandling = DefaultValueHandling.Populate, }; public static IntPtr ProcessHandle { get; set; } diff --git a/Sharlayan/Core/ActionContainer.cs b/Sharlayan/Core/ActionContainer.cs index dccc024..f9fad32 100644 --- a/Sharlayan/Core/ActionContainer.cs +++ b/Sharlayan/Core/ActionContainer.cs @@ -1,11 +1,11 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/ActionItem.cs b/Sharlayan/Core/ActionItem.cs index 715a806..f8b3a65 100644 --- a/Sharlayan/Core/ActionItem.cs +++ b/Sharlayan/Core/ActionItem.cs @@ -1,11 +1,11 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/ActorItem.cs b/Sharlayan/Core/ActorItem.cs index bcee811..d4098cf 100644 --- a/Sharlayan/Core/ActorItem.cs +++ b/Sharlayan/Core/ActorItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -63,7 +63,7 @@ public class ActorItem : ActorItemBase, IActorItem { public byte GrandCompanyRank { get; set; } public float Heading { get; set; } - + public Actor.Icon Icon { get; set; } public byte IconID { get; set; } @@ -138,7 +138,7 @@ public bool IsValid { public ActorItem Clone() { var cloned = (ActorItem) this.MemberwiseClone(); - + cloned.Coordinate = new Coordinate(this.Coordinate.X, this.Coordinate.Z, this.Coordinate.Y); cloned.EnmityItems = new System.Collections.Generic.List(); cloned.StatusItems = new System.Collections.Generic.List(); @@ -148,7 +148,7 @@ public ActorItem Clone() { new EnmityItem { Enmity = item.Enmity, ID = item.ID, - Name = item.Name + Name = item.Name, }); } @@ -161,12 +161,11 @@ public ActorItem Clone() { Stacks = item.Stacks, StatusID = item.StatusID, StatusName = item.StatusName, - TargetName = item.TargetName + TargetName = item.TargetName, }); } return cloned; } - } } \ No newline at end of file diff --git a/Sharlayan/Core/ActorItemBase.cs b/Sharlayan/Core/ActorItemBase.cs index d993b30..bc6371f 100644 --- a/Sharlayan/Core/ActorItemBase.cs +++ b/Sharlayan/Core/ActorItemBase.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -29,7 +29,7 @@ public class ActorItemBase { public short CPMax { get; set; } - public double CPPercent => safeDivide(this.CPCurrent, this.CPMax); + public double CPPercent => this.safeDivide(this.CPCurrent, this.CPMax); public string CPString => $"{this.CPCurrent}/{this.CPMax} [{this.CPPercent:P2}]"; @@ -39,7 +39,7 @@ public class ActorItemBase { public short GPMax { get; set; } - public double GPPercent => safeDivide(this.GPCurrent, this.GPMax); + public double GPPercent => this.safeDivide(this.GPCurrent, this.GPMax); public string GPString => $"{this.GPCurrent}/{this.GPMax} [{this.GPPercent:P2}]"; @@ -49,7 +49,7 @@ public class ActorItemBase { public int HPMax { get; set; } - public double HPPercent => safeDivide(this.HPCurrent, this.HPMax); + public double HPPercent => this.safeDivide(this.HPCurrent, this.HPMax); public string HPString => $"{this.HPCurrent}/{this.HPMax} [{this.HPPercent:P2}]"; @@ -65,7 +65,7 @@ public class ActorItemBase { public int MPMax { get; set; } - public double MPPercent => safeDivide(this.MPCurrent, this.MPMax); + public double MPPercent => this.safeDivide(this.MPCurrent, this.MPMax); public string MPString => $"{this.MPCurrent}/{this.MPMax} [{this.MPPercent:P2}]"; @@ -80,7 +80,7 @@ public string Name { public int TPMax { get; set; } - public double TPPercent => safeDivide(this.TPCurrent, this.TPMax); + public double TPPercent => this.safeDivide(this.TPCurrent, this.TPMax); public string TPString => $"{this.TPCurrent}/{this.TPMax} [{this.TPPercent:P2}]"; @@ -92,25 +92,8 @@ public string Name { public double Z { get; set; } - private double safeDivide(double a, double b) - { - try - { - if (b == 0) - return 0; - - return a / b; - } - catch - { - // due to multithreading, sometimes b can be set to 0 between the check and the division - return 0; - } - } - - public float GetCastingDistanceTo(ActorItem compare) - { - var distance = this.GetHorizontalDistanceTo(compare) - compare.HitBoxRadius - HitBoxRadius; + public float GetCastingDistanceTo(ActorItem compare) { + var distance = this.GetHorizontalDistanceTo(compare) - compare.HitBoxRadius - this.HitBoxRadius; return distance > 0 ? distance : 0; @@ -128,5 +111,19 @@ public float GetHorizontalDistanceTo(ActorItem compare) { var distanceY = (float) Math.Abs(compare.Y - this.Y); return (float) Math.Sqrt(Math.Pow(distanceX, 2) + Math.Pow(distanceY, 2)); } + + private double safeDivide(double a, double b) { + try { + if (b == 0) { + return 0; + } + + return a / b; + } + catch { + // due to multithreading, sometimes b can be set to 0 between the check and the division + return 0; + } + } } } \ No newline at end of file diff --git a/Sharlayan/Core/ChatCleaner.cs b/Sharlayan/Core/ChatCleaner.cs index 9c53346..1f16e21 100644 --- a/Sharlayan/Core/ChatCleaner.cs +++ b/Sharlayan/Core/ChatCleaner.cs @@ -1,9 +1,11 @@ // This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com + + // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -11,12 +13,11 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace Sharlayan.Core { +namespace Sharlayan.Core +{ using System; using System.Collections.Generic; - using System.ComponentModel; using System.Linq; - using System.Runtime.CompilerServices; using System.Text; using System.Text.RegularExpressions; using System.Web; @@ -25,106 +26,101 @@ namespace Sharlayan.Core { using Sharlayan.Extensions; - internal class ChatCleaner : INotifyPropertyChanged { + internal class ChatCleaner + { private const RegexOptions DefaultOptions = RegexOptions.Compiled | RegexOptions.ExplicitCapture; private static readonly Logger Logger = LogManager.GetCurrentClassLogger(); - private static readonly Regex Checks = new Regex(@"^00(20|21|23|27|28|46|47|48|49|5C)$", DefaultOptions); - - private static bool _colorFound; + private static readonly Regex PlayerChatCodesRegex = new Regex(@"^00(0[A-F]|1[0-9A-F])$", DefaultOptions); - private readonly Regex PlayerRegEx = new Regex(@"(?\[[A-Z0-9]{10}(?[A-Z0-9]{3,})20(?[A-Z0-9]{3,})\](?[\w']+\.? [\w']+\.?)\[[A-Z0-9]{12}\])", DefaultOptions); + private static readonly Regex PlayerRegEx = new Regex(@"(?\[[A-Z0-9]{10}(?[A-Z0-9]{3,})20(?[A-Z0-9]{3,})\](?[\w']+\.? [\w']+\.?)\[[A-Z0-9]{12}\])", DefaultOptions); - private string _result; + private static readonly Regex ArrowRegex = new Regex(@"", RegexOptions.Compiled); - public ChatCleaner(string line) { - this.Result = this.ProcessName(line); - } + private static readonly Regex HQRegex = new Regex(@"", RegexOptions.Compiled); - public ChatCleaner(byte[] bytes) { - this.Result = this.ProcessFullLine(bytes).Trim(); - } + private static readonly Regex NewLineRegex = new Regex(@"[\r\n]+", RegexOptions.Compiled); - public event PropertyChangedEventHandler PropertyChanged = delegate { }; + private static readonly Regex NoPrintingCharactersRegex = new Regex(@"[\x00-\x1F]+", RegexOptions.Compiled); - public string Result { - get => this._result; - private set { - this._result = value; - this.RaisePropertyChanged(); - } - } + private static readonly Regex SpecialPurposeUnicodeRegex = new Regex(@"[\uE000-\uF8FF]", RegexOptions.Compiled); - private bool ColorFound { - get => _colorFound; - set { - _colorFound = value; - this.RaisePropertyChanged(); - } - } + private static readonly Regex SpecialReplacementRegex = new Regex(@"[�]", RegexOptions.Compiled); - private string ProcessFullLine(byte[] bytes) { + public static string ProcessFullLine(string code, byte[] bytes) + { var line = HttpUtility.HtmlDecode(Encoding.UTF8.GetString(bytes.ToArray())).Replace(" ", " "); - try { - List autoTranslateList = new List(); + try + { + List autoTranslateList = new List(bytes.Length); List newList = new List(); - for (var x = 0; x < bytes.Count(); x++) { - if (bytes[x] == 238) { - var byteString = $"{bytes[x]}{bytes[x + 1]}{bytes[x + 2]}"; - switch (byteString) { - case "238129156": - x += 3; - break; - } - } - - if (bytes[x] == 2) { - var byteString = $"{bytes[x]}{bytes[x + 1]}{bytes[x + 2]}{bytes[x + 3]}"; - switch (byteString) { - case "22913": - case "21613": - case "22213": - x += 4; - break; - } - } - - switch (bytes[x]) { + for (var x = 0; x < bytes.Count(); x++) + { + switch (bytes[x]) + { case 2: + // special in-game replacements/wrappers // 2 46 5 7 242 2 210 3 // 2 29 1 3 + // remove them var length = bytes[x + 2]; var limit = length - 1; - if (length > 1) { - x = x + 3; + if (length > 1) + { + x = x + 3 ; + + autoTranslateList.Add(Convert.ToByte('[')); byte[] translated = new byte[limit]; Buffer.BlockCopy(bytes, x, translated, 0, limit); - foreach (var b in translated) { + foreach (var b in translated) + { autoTranslateList.AddRange(Encoding.UTF8.GetBytes(b.ToString("X2"))); } autoTranslateList.Add(Convert.ToByte(']')); - var aCheckStr = string.Empty; - // var checkedAt = autoTranslateList.GetRange(1, autoTranslateList.Count - 1).ToArray(); - if (string.IsNullOrWhiteSpace(aCheckStr)) { - // TODO: implement showing or using in the chatlog - } - else { - newList.AddRange(Encoding.UTF8.GetBytes(aCheckStr)); + var bCheckStr = Encoding.UTF8.GetString(autoTranslateList.ToArray()); + + if (bCheckStr != null && bCheckStr.Length > 0) + { + if (bCheckStr.Equals("[59]")) + { + newList.Add(0x40); + } + + if (Utilities.AutoTranslate.EnDict.TryGetValue(bCheckStr.Replace("[0", "[").ToLower(), out var AutoTranslateVal)) + { + newList.AddRange(Encoding.UTF8.GetBytes(AutoTranslateVal)); + } } autoTranslateList.Clear(); x += limit; } - else { + else + { x = x + 4; newList.Add(32); newList.Add(bytes[x]); } + break; + // unit separator + case 31: + // TODO: this breaks in some areas like NOVICE chat + // if (PlayerChatCodesRegex.IsMatch(code)) { + // newList.Add(58); + // } + // else { + // newList.Add(31); + // } + newList.Add(58); + if (PlayerChatCodesRegex.IsMatch(code)) + { + newList.Add(32); + } break; default: newList.Add(bytes[x]); @@ -132,36 +128,42 @@ private string ProcessFullLine(byte[] bytes) { } } - // var cleanedList = newList.Where(v => (v >= 0x0020 && v <= 0xD7FF) || (v >= 0xE000 && v <= 0xFFFD) || v == 0x0009 || v == 0x000A || v == 0x000D); var cleaned = HttpUtility.HtmlDecode(Encoding.UTF8.GetString(newList.ToArray())).Replace(" ", " "); - autoTranslateList.Clear(); newList.Clear(); - cleaned = Regex.Replace(cleaned, @"", "⇒"); - cleaned = Regex.Replace(cleaned, @"", "[HQ]"); - cleaned = Regex.Replace(cleaned, @"", string.Empty); - cleaned = Regex.Replace(cleaned, @"�", string.Empty); - cleaned = Regex.Replace(cleaned, @"\[+0([12])010101([\w]+)?\]+", string.Empty); - cleaned = Regex.Replace(cleaned, @"\[+CF010101([\w]+)?\]+", string.Empty); - cleaned = Regex.Replace(cleaned, @"\[+..FF\w{6}\]+|\[+EC\]+", string.Empty); - cleaned = Regex.Replace(cleaned, @"\[\]+", string.Empty); + // replace right arrow in chat (parsing) + cleaned = ArrowRegex.Replace(cleaned, "⇒"); + // replace HQ symbol + cleaned = HQRegex.Replace(cleaned, "[HQ]"); + // replace all Extended special purpose unicode with empty string + cleaned = SpecialPurposeUnicodeRegex.Replace(cleaned, string.Empty); + // cleanup special replacement character bytes: 239 191 189 + cleaned = SpecialReplacementRegex.Replace(cleaned, string.Empty); + // remove new lines + cleaned = NewLineRegex.Replace(cleaned, string.Empty); + // remove characters 0-31 + cleaned = NoPrintingCharactersRegex.Replace(cleaned, string.Empty); line = cleaned; } - catch (Exception ex) { + catch (Exception ex) + { MemoryHandler.Instance.RaiseException(Logger, ex, true); } - return line; + return ProcessName(line); } - private string ProcessName(string cleaned) { + private static string ProcessName(string cleaned) + { var line = cleaned; - try { + try + { // cleanup name if using other settings - Match playerMatch = this.PlayerRegEx.Match(line); - if (playerMatch.Success) { + Match playerMatch = PlayerRegEx.Match(line); + if (playerMatch.Success) + { var fullName = playerMatch.Groups[1].Value; var firstName = playerMatch.Groups[2].Value.FromHex(); var lastName = playerMatch.Groups[3].Value.FromHex(); @@ -172,7 +174,8 @@ private string ProcessName(string cleaned) { // remove single placement cleaned = cleaned.Replace(fullName, "•name•"); - switch (Regex.IsMatch(cleaned, @"^([Vv]ous|[Dd]u|[Yy]ou)")) { + switch (Regex.IsMatch(cleaned, @"^([Vv]ous|[Dd]u|[Yy]ou)")) + { case true: cleaned = cleaned.Substring(1).Replace("•name•", string.Empty); break; @@ -186,15 +189,12 @@ private string ProcessName(string cleaned) { cleaned = Regex.Replace(cleaned, @"[\x00-\x1F]+", string.Empty); line = cleaned; } - catch (Exception ex) { + catch (Exception ex) + { MemoryHandler.Instance.RaiseException(Logger, ex, true); } return line; } - - private void RaisePropertyChanged([CallerMemberName] string caller = "") { - this.PropertyChanged(this, new PropertyChangedEventArgs(caller)); - } } } \ No newline at end of file diff --git a/Sharlayan/Core/ChatEntry.cs b/Sharlayan/Core/ChatEntry.cs index d7ed61a..8c0b567 100644 --- a/Sharlayan/Core/ChatEntry.cs +++ b/Sharlayan/Core/ChatEntry.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -13,7 +13,8 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace Sharlayan.Core { +namespace Sharlayan.Core +{ using System; using System.Globalization; using System.Linq; @@ -21,26 +22,29 @@ namespace Sharlayan.Core { using Sharlayan.Utilities; - public static class ChatEntry { - public static ChatLogItem Process(byte[] raw) { + public static class ChatEntry + { + public static ChatLogItem Process(byte[] raw) + { var chatLogEntry = new ChatLogItem(); - try { + try + { chatLogEntry.Bytes = raw; chatLogEntry.TimeStamp = UnixTimeStampToDateTime(int.Parse(ByteArrayToString(raw.Take(4).Reverse().ToArray()), NumberStyles.HexNumber)); chatLogEntry.Code = ByteArrayToString(raw.Skip(4).Take(2).Reverse().ToArray()); chatLogEntry.Raw = Encoding.UTF8.GetString(raw.ToArray()); byte[] cleanable = raw.Skip(8).ToArray(); - var cleaned = new ChatCleaner(cleanable).Result; - var cut = cleaned.Substring(1, 1) == ":" - ? 2 - : 1; + var cleaned = ChatCleaner.ProcessFullLine(chatLogEntry.Code, cleanable); + + var cut = cleaned.Substring(1, 1) == ":" ? 2 : 1; + chatLogEntry.Line = XMLCleaner.SanitizeXmlString(cleaned.Substring(cut)); - chatLogEntry.Line = new ChatCleaner(chatLogEntry.Line).Result; chatLogEntry.JP = IsJapanese(chatLogEntry.Line); chatLogEntry.Combined = $"{chatLogEntry.Code}:{chatLogEntry.Line}"; } - catch (Exception) { + catch (Exception) + { chatLogEntry.Bytes = Array.Empty(); chatLogEntry.Raw = string.Empty; chatLogEntry.Line = string.Empty; @@ -51,22 +55,26 @@ public static ChatLogItem Process(byte[] raw) { return chatLogEntry; } - public static DateTime UnixTimeStampToDateTime(double unixTimeStamp) { + public static DateTime UnixTimeStampToDateTime(double unixTimeStamp) + { var dtDateTime = new DateTime(1970, 1, 1, 0, 0, 0, 0); dtDateTime = dtDateTime.AddSeconds(unixTimeStamp).ToLocalTime(); return dtDateTime; } - private static string ByteArrayToString(byte[] raw) { + private static string ByteArrayToString(byte[] raw) + { var hex = new StringBuilder(raw.Length * 2); - foreach (var b in raw) { + foreach (var b in raw) + { hex.AppendFormat($"{b:X2}"); } return hex.ToString(); } - private static bool IsJapanese(string line) { + private static bool IsJapanese(string line) + { // 0x3040 -> 0x309F === Hirigana // 0x30A0 -> 0x30FF === Katakana // 0x4E00 -> 0x9FBF === Kanji diff --git a/Sharlayan/Core/ChatLogItem.cs b/Sharlayan/Core/ChatLogItem.cs index aad34d8..facd77d 100644 --- a/Sharlayan/Core/ChatLogItem.cs +++ b/Sharlayan/Core/ChatLogItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Coordinate.cs b/Sharlayan/Core/Coordinate.cs index 84186c2..b56884a 100644 --- a/Sharlayan/Core/Coordinate.cs +++ b/Sharlayan/Core/Coordinate.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -35,7 +35,7 @@ public Coordinate Add(Coordinate coordinate) { return new Coordinate { X = this.X + coordinate.X, Y = this.Y + coordinate.Y, - Z = this.Z + coordinate.Z + Z = this.Z + coordinate.Z, }; } @@ -43,7 +43,7 @@ public Coordinate Add(float x, float y, float z) { return new Coordinate { X = this.X + x, Y = this.Y + y, - Z = this.Z + z + Z = this.Z + z, }; } @@ -65,7 +65,7 @@ public Coordinate Normalize() { return new Coordinate { X = this.X / length, Y = this.Y / length, - Z = this.Z / length + Z = this.Z / length, }; } @@ -78,7 +78,7 @@ public Coordinate Rotate2D(float angle) { return new Coordinate { X = (float) (this.X * Math.Cos(angle) - this.Y * Math.Sin(angle)), Y = (float) (this.Y * Math.Cos(angle) + this.X * Math.Sin(angle)), - Z = this.Z + Z = this.Z, }; } @@ -86,7 +86,7 @@ public Coordinate Scale(float scale) { return new Coordinate { X = this.X * scale, Y = this.Y * scale, - Z = this.Z * scale + Z = this.Z * scale, }; } @@ -94,7 +94,7 @@ public Coordinate Subtract(Coordinate coordinate) { return new Coordinate { X = this.X - coordinate.X, Y = this.Y - coordinate.Y, - Z = this.Z - coordinate.Z + Z = this.Z - coordinate.Z, }; } diff --git a/Sharlayan/Core/CurrentPlayer.cs b/Sharlayan/Core/CurrentPlayer.cs index c57beb6..9c84c7c 100644 --- a/Sharlayan/Core/CurrentPlayer.cs +++ b/Sharlayan/Core/CurrentPlayer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -57,8 +57,14 @@ public class CurrentPlayer : ICurrentPlayer { public short BaseStrength { get; set; } + public short BaseSubstat { get; set; } + public short BaseVitality { get; set; } + public byte BLU { get; set; } + + public int BLU_CurrentEXP { get; set; } + public short BluntResistance { get; set; } public byte BSM { get; set; } @@ -97,6 +103,10 @@ public class CurrentPlayer : ICurrentPlayer { public short DirectHit { get; set; } + public byte DNC { get; set; } + + public int DNC_CurrentEXP { get; set; } + public byte DRK { get; set; } public int DRK_CurrentEXP { get; set; } @@ -119,6 +129,10 @@ public class CurrentPlayer : ICurrentPlayer { public int GLD_CurrentEXP { get; set; } + public byte GNB { get; set; } + + public int GNB_CurrentEXP { get; set; } + public int GPMax { get; set; } public byte GSM { get; set; } diff --git a/Sharlayan/Core/EnmityItem.cs b/Sharlayan/Core/EnmityItem.cs index ce56d26..35b47ed 100644 --- a/Sharlayan/Core/EnmityItem.cs +++ b/Sharlayan/Core/EnmityItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Enums/Action.cs b/Sharlayan/Core/Enums/Action.cs index f1020c2..7a99740 100644 --- a/Sharlayan/Core/Enums/Action.cs +++ b/Sharlayan/Core/Enums/Action.cs @@ -1,11 +1,10 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com - // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -54,7 +53,7 @@ public enum Container : byte { PETBAR, - CROSS_PETBAR + CROSS_PETBAR, } } } \ No newline at end of file diff --git a/Sharlayan/Core/Enums/Actor.cs b/Sharlayan/Core/Enums/Actor.cs index 0fcda14..81571c4 100644 --- a/Sharlayan/Core/Enums/Actor.cs +++ b/Sharlayan/Core/Enums/Actor.cs @@ -2,10 +2,9 @@ // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com - // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -32,7 +31,7 @@ public enum ActionStatus : byte { Melding = 0x07, - SMachine = 0x08 + SMachine = 0x08, } public enum EventObjectType : ushort { @@ -50,7 +49,7 @@ public enum EventObjectType : ushort { Banded = 12347, - Hoard = 12353 + Hoard = 12353, } public enum Icon : byte { @@ -114,7 +113,7 @@ public enum Icon : byte { Sprout = 0x1F, - Gil = 0x20 + Gil = 0x20, } public enum Job : byte { @@ -188,13 +187,19 @@ public enum Job : byte { SAM = 0x22, - RDM = 0x23 + RDM = 0x23, + + BLU = 0x24, + + GNB = 0x25, + + DNC = 0x26, } public enum Sex : byte { Male = 0x0, - Female = 0x1 + Female = 0x1, } public enum Status : byte { @@ -208,7 +213,7 @@ public enum Status : byte { UnknownUnSheathed = 0x06, - UnknownSheathed = 0x07 + UnknownSheathed = 0x07, } public enum TargetType : byte { @@ -218,7 +223,7 @@ public enum TargetType : byte { True = 0x2, - False = 0x4 + False = 0x4, } public enum Type : byte { @@ -240,7 +245,7 @@ public enum Type : byte { Mount = 0x08, - Minion = 0x09 + Minion = 0x09, } } } \ No newline at end of file diff --git a/Sharlayan/Core/Enums/Inventory.cs b/Sharlayan/Core/Enums/Inventory.cs index 3f24098..d9344af 100644 --- a/Sharlayan/Core/Enums/Inventory.cs +++ b/Sharlayan/Core/Enums/Inventory.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -78,7 +78,7 @@ public enum Container : byte { COMPANY_3 = 0x2C, - COMPANY_CRYSTALS = 0x2D + COMPANY_CRYSTALS = 0x2D, } } } \ No newline at end of file diff --git a/Sharlayan/Core/Interfaces/IActionContainer.cs b/Sharlayan/Core/Interfaces/IActionContainer.cs index 7d92326..e94760d 100644 --- a/Sharlayan/Core/Interfaces/IActionContainer.cs +++ b/Sharlayan/Core/Interfaces/IActionContainer.cs @@ -1,11 +1,11 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/IActionItem.cs b/Sharlayan/Core/Interfaces/IActionItem.cs index 6cbf3c5..f04c46d 100644 --- a/Sharlayan/Core/Interfaces/IActionItem.cs +++ b/Sharlayan/Core/Interfaces/IActionItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/IActorItem.cs b/Sharlayan/Core/Interfaces/IActorItem.cs index 2baa4cc..2399db4 100644 --- a/Sharlayan/Core/Interfaces/IActorItem.cs +++ b/Sharlayan/Core/Interfaces/IActorItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/IChatLogItem.cs b/Sharlayan/Core/Interfaces/IChatLogItem.cs index dc75172..9daac63 100644 --- a/Sharlayan/Core/Interfaces/IChatLogItem.cs +++ b/Sharlayan/Core/Interfaces/IChatLogItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/ICoordinate.cs b/Sharlayan/Core/Interfaces/ICoordinate.cs index 623a653..009076d 100644 --- a/Sharlayan/Core/Interfaces/ICoordinate.cs +++ b/Sharlayan/Core/Interfaces/ICoordinate.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/ICurrentPlayer.cs b/Sharlayan/Core/Interfaces/ICurrentPlayer.cs index b3822fd..521dc47 100644 --- a/Sharlayan/Core/Interfaces/ICurrentPlayer.cs +++ b/Sharlayan/Core/Interfaces/ICurrentPlayer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -53,8 +53,14 @@ public interface ICurrentPlayer { short BaseStrength { get; set; } + short BaseSubstat { get; set; } + short BaseVitality { get; set; } + byte BLU { get; set; } + + int BLU_CurrentEXP { get; set; } + short BluntResistance { get; set; } byte BSM { get; set; } @@ -93,6 +99,10 @@ public interface ICurrentPlayer { short DirectHit { get; set; } + byte DNC { get; set; } + + int DNC_CurrentEXP { get; set; } + byte DRK { get; set; } int DRK_CurrentEXP { get; set; } @@ -115,6 +125,10 @@ public interface ICurrentPlayer { int GLD_CurrentEXP { get; set; } + byte GNB { get; set; } + + int GNB_CurrentEXP { get; set; } + int GPMax { get; set; } byte GSM { get; set; } diff --git a/Sharlayan/Core/Interfaces/IEnmityItem.cs b/Sharlayan/Core/Interfaces/IEnmityItem.cs index 1660e08..9c7b2db 100644 --- a/Sharlayan/Core/Interfaces/IEnmityItem.cs +++ b/Sharlayan/Core/Interfaces/IEnmityItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/IInventoryContainer.cs b/Sharlayan/Core/Interfaces/IInventoryContainer.cs index ced44e4..bcbf304 100644 --- a/Sharlayan/Core/Interfaces/IInventoryContainer.cs +++ b/Sharlayan/Core/Interfaces/IInventoryContainer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/IInventoryItem.cs b/Sharlayan/Core/Interfaces/IInventoryItem.cs index 6493d67..6d6d5b9 100644 --- a/Sharlayan/Core/Interfaces/IInventoryItem.cs +++ b/Sharlayan/Core/Interfaces/IInventoryItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/IPartyMember.cs b/Sharlayan/Core/Interfaces/IPartyMember.cs index 3457da2..26f09ff 100644 --- a/Sharlayan/Core/Interfaces/IPartyMember.cs +++ b/Sharlayan/Core/Interfaces/IPartyMember.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/IStatusItem.cs b/Sharlayan/Core/Interfaces/IStatusItem.cs index 0dcff82..2aa2104 100644 --- a/Sharlayan/Core/Interfaces/IStatusItem.cs +++ b/Sharlayan/Core/Interfaces/IStatusItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/Interfaces/ITargetInfo.cs b/Sharlayan/Core/Interfaces/ITargetInfo.cs index 61223c1..8a751e9 100644 --- a/Sharlayan/Core/Interfaces/ITargetInfo.cs +++ b/Sharlayan/Core/Interfaces/ITargetInfo.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/InventoryContainer.cs b/Sharlayan/Core/InventoryContainer.cs index a7801bc..1f74718 100644 --- a/Sharlayan/Core/InventoryContainer.cs +++ b/Sharlayan/Core/InventoryContainer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/InventoryItem.cs b/Sharlayan/Core/InventoryItem.cs index 0369184..3a8f8c6 100644 --- a/Sharlayan/Core/InventoryItem.cs +++ b/Sharlayan/Core/InventoryItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/PartyMember.cs b/Sharlayan/Core/PartyMember.cs index 02a4a64..a724d78 100644 --- a/Sharlayan/Core/PartyMember.cs +++ b/Sharlayan/Core/PartyMember.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -31,7 +31,7 @@ public PartyMember Clone() { new EnmityItem { Enmity = item.Enmity, ID = item.ID, - Name = item.Name + Name = item.Name, }); } @@ -44,7 +44,7 @@ public PartyMember Clone() { Stacks = item.Stacks, StatusID = item.StatusID, StatusName = item.StatusName, - TargetName = item.TargetName + TargetName = item.TargetName, }); } diff --git a/Sharlayan/Core/StatusItem.cs b/Sharlayan/Core/StatusItem.cs index 5a79309..5be6388 100644 --- a/Sharlayan/Core/StatusItem.cs +++ b/Sharlayan/Core/StatusItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Core/TargetInfo.cs b/Sharlayan/Core/TargetInfo.cs index 2650c18..80536bb 100644 --- a/Sharlayan/Core/TargetInfo.cs +++ b/Sharlayan/Core/TargetInfo.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Delegates/ChatLogWorkerDelegate.cs b/Sharlayan/Delegates/ChatLogWorkerDelegate.cs index e186275..f51db0b 100644 --- a/Sharlayan/Delegates/ChatLogWorkerDelegate.cs +++ b/Sharlayan/Delegates/ChatLogWorkerDelegate.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Delegates/MonsterWorkerDelegate.cs b/Sharlayan/Delegates/MonsterWorkerDelegate.cs index 72cfae3..ad473f8 100644 --- a/Sharlayan/Delegates/MonsterWorkerDelegate.cs +++ b/Sharlayan/Delegates/MonsterWorkerDelegate.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Delegates/NPCWorkerDelegate.cs b/Sharlayan/Delegates/NPCWorkerDelegate.cs index 0ef6242..5755d56 100644 --- a/Sharlayan/Delegates/NPCWorkerDelegate.cs +++ b/Sharlayan/Delegates/NPCWorkerDelegate.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Delegates/PCWorkerDelegate.cs b/Sharlayan/Delegates/PCWorkerDelegate.cs index 58eb832..044ba3e 100644 --- a/Sharlayan/Delegates/PCWorkerDelegate.cs +++ b/Sharlayan/Delegates/PCWorkerDelegate.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Delegates/PartyWorkerDelegate.cs b/Sharlayan/Delegates/PartyWorkerDelegate.cs index 49e873e..02595d8 100644 --- a/Sharlayan/Delegates/PartyWorkerDelegate.cs +++ b/Sharlayan/Delegates/PartyWorkerDelegate.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Events/ExceptionEvent.cs b/Sharlayan/Events/ExceptionEvent.cs index 9e8e36e..510ed3e 100644 --- a/Sharlayan/Events/ExceptionEvent.cs +++ b/Sharlayan/Events/ExceptionEvent.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Events/SignaturesFoundEvent.cs b/Sharlayan/Events/SignaturesFoundEvent.cs index 32b8f41..595d093 100644 --- a/Sharlayan/Events/SignaturesFoundEvent.cs +++ b/Sharlayan/Events/SignaturesFoundEvent.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Extensions/StringExtensions.cs b/Sharlayan/Extensions/StringExtensions.cs index 7c457a6..b3cbd60 100644 --- a/Sharlayan/Extensions/StringExtensions.cs +++ b/Sharlayan/Extensions/StringExtensions.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/FodyWeavers.xml b/Sharlayan/FodyWeavers.xml index 100917a..275b4ad 100644 --- a/Sharlayan/FodyWeavers.xml +++ b/Sharlayan/FodyWeavers.xml @@ -1,5 +1,5 @@  - - + + \ No newline at end of file diff --git a/Sharlayan/FodyWeavers.xsd b/Sharlayan/FodyWeavers.xsd new file mode 100644 index 0000000..44a5374 --- /dev/null +++ b/Sharlayan/FodyWeavers.xsd @@ -0,0 +1,111 @@ + + + + + + + + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with line breaks. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with line breaks. + + + + + The order of preloaded assemblies, delimited with line breaks. + + + + + + This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file. + + + + + Controls if .pdbs for reference assemblies are also embedded. + + + + + Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option. + + + + + As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off. + + + + + Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code. + + + + + Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior. + + + + + A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with | + + + + + A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |. + + + + + A list of unmanaged 32 bit assembly names to include, delimited with |. + + + + + A list of unmanaged 64 bit assembly names to include, delimited with |. + + + + + The order of preloaded assemblies, delimited with |. + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/Sharlayan/MemoryHandler.cs b/Sharlayan/MemoryHandler.cs index f81cce2..2fcdda0 100644 --- a/Sharlayan/MemoryHandler.cs +++ b/Sharlayan/MemoryHandler.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ChatLogPointers.cs b/Sharlayan/Models/ChatLogPointers.cs index d069b68..1778d07 100644 --- a/Sharlayan/Models/ChatLogPointers.cs +++ b/Sharlayan/Models/ChatLogPointers.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Localization.cs b/Sharlayan/Models/Localization.cs index d5e5cf9..37a2f69 100644 --- a/Sharlayan/Models/Localization.cs +++ b/Sharlayan/Models/Localization.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ProcessModel.cs b/Sharlayan/Models/ProcessModel.cs index 0549d7e..b4e1ace 100644 --- a/Sharlayan/Models/ProcessModel.cs +++ b/Sharlayan/Models/ProcessModel.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ReadResults/ActionResult.cs b/Sharlayan/Models/ReadResults/ActionResult.cs index 3ee3191..ee84a1a 100644 --- a/Sharlayan/Models/ReadResults/ActionResult.cs +++ b/Sharlayan/Models/ReadResults/ActionResult.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ReadResults/ActorResult.cs b/Sharlayan/Models/ReadResults/ActorResult.cs index 23f7d70..9bb761e 100644 --- a/Sharlayan/Models/ReadResults/ActorResult.cs +++ b/Sharlayan/Models/ReadResults/ActorResult.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ReadResults/ChatLogResult.cs b/Sharlayan/Models/ReadResults/ChatLogResult.cs index 8af3e23..3d2a799 100644 --- a/Sharlayan/Models/ReadResults/ChatLogResult.cs +++ b/Sharlayan/Models/ReadResults/ChatLogResult.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ReadResults/CurrentPlayerResult.cs b/Sharlayan/Models/ReadResults/CurrentPlayerResult.cs index daac25f..1ff2f6b 100644 --- a/Sharlayan/Models/ReadResults/CurrentPlayerResult.cs +++ b/Sharlayan/Models/ReadResults/CurrentPlayerResult.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ReadResults/InventoryResult.cs b/Sharlayan/Models/ReadResults/InventoryResult.cs index 419307b..aae3c56 100644 --- a/Sharlayan/Models/ReadResults/InventoryResult.cs +++ b/Sharlayan/Models/ReadResults/InventoryResult.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ReadResults/PartyResult.cs b/Sharlayan/Models/ReadResults/PartyResult.cs index e7e7ac6..9235048 100644 --- a/Sharlayan/Models/ReadResults/PartyResult.cs +++ b/Sharlayan/Models/ReadResults/PartyResult.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/ReadResults/TargetResult.cs b/Sharlayan/Models/ReadResults/TargetResult.cs index 66a58fb..ea31df4 100644 --- a/Sharlayan/Models/ReadResults/TargetResult.cs +++ b/Sharlayan/Models/ReadResults/TargetResult.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Signature.cs b/Sharlayan/Models/Signature.cs index 117be33..d4aed7c 100644 --- a/Sharlayan/Models/Signature.cs +++ b/Sharlayan/Models/Signature.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/ActorItem.cs b/Sharlayan/Models/Structures/ActorItem.cs index cccb9de..1ef2241 100644 --- a/Sharlayan/Models/Structures/ActorItem.cs +++ b/Sharlayan/Models/Structures/ActorItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/ChatLogPointers.cs b/Sharlayan/Models/Structures/ChatLogPointers.cs index fd0c176..1e0c173 100644 --- a/Sharlayan/Models/Structures/ChatLogPointers.cs +++ b/Sharlayan/Models/Structures/ChatLogPointers.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/CurrentPlayer.cs b/Sharlayan/Models/Structures/CurrentPlayer.cs index 2b6e54c..6634e7f 100644 --- a/Sharlayan/Models/Structures/CurrentPlayer.cs +++ b/Sharlayan/Models/Structures/CurrentPlayer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -49,8 +49,14 @@ public class CurrentPlayer { public int BaseStrength { get; set; } + public int BaseSubstat { get; set; } + public int BaseVitality { get; set; } + public int BLU { get; set; } + + public int BLU_CurrentEXP { get; set; } + public int BluntResistance { get; set; } public int BSM { get; set; } @@ -89,6 +95,10 @@ public class CurrentPlayer { public int DirectHit { get; set; } + public int DNC { get; set; } + + public int DNC_CurrentEXP { get; set; } + public int DRK { get; set; } public int DRK_CurrentEXP { get; set; } @@ -107,6 +117,10 @@ public class CurrentPlayer { public int GLD_CurrentEXP { get; set; } + public int GNB { get; set; } + + public int GNB_CurrentEXP { get; set; } + public int GPMax { get; set; } public int GSM { get; set; } diff --git a/Sharlayan/Models/Structures/DialogPanelPointers.cs b/Sharlayan/Models/Structures/DialogPanelPointers.cs index 05a452c..7c3edc9 100644 --- a/Sharlayan/Models/Structures/DialogPanelPointers.cs +++ b/Sharlayan/Models/Structures/DialogPanelPointers.cs @@ -15,5 +15,10 @@ public class DialogPanelPointers public int LengtsOffset { get; set; } + + public int TextOffset { get; set; } + + public int TextLengthOffset { get; set; } + } } diff --git a/Sharlayan/Models/Structures/EnmityItem.cs b/Sharlayan/Models/Structures/EnmityItem.cs index f3853e5..4b7a7d5 100644 --- a/Sharlayan/Models/Structures/EnmityItem.cs +++ b/Sharlayan/Models/Structures/EnmityItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/HotBarItem.cs b/Sharlayan/Models/Structures/HotBarItem.cs index da79959..10a2502 100644 --- a/Sharlayan/Models/Structures/HotBarItem.cs +++ b/Sharlayan/Models/Structures/HotBarItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/InventoryContainer.cs b/Sharlayan/Models/Structures/InventoryContainer.cs index bac5158..6d9156f 100644 --- a/Sharlayan/Models/Structures/InventoryContainer.cs +++ b/Sharlayan/Models/Structures/InventoryContainer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/InventoryItem.cs b/Sharlayan/Models/Structures/InventoryItem.cs index f29598b..ed89401 100644 --- a/Sharlayan/Models/Structures/InventoryItem.cs +++ b/Sharlayan/Models/Structures/InventoryItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/PartyMember.cs b/Sharlayan/Models/Structures/PartyMember.cs index 9ac6093..fb762c3 100644 --- a/Sharlayan/Models/Structures/PartyMember.cs +++ b/Sharlayan/Models/Structures/PartyMember.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/RecastItem.cs b/Sharlayan/Models/Structures/RecastItem.cs index e9a8ef3..ce807da 100644 --- a/Sharlayan/Models/Structures/RecastItem.cs +++ b/Sharlayan/Models/Structures/RecastItem.cs @@ -1,11 +1,11 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. +// This is an open source non-commercial project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/StatusItem.cs b/Sharlayan/Models/Structures/StatusItem.cs index bcd9c27..e0b0730 100644 --- a/Sharlayan/Models/Structures/StatusItem.cs +++ b/Sharlayan/Models/Structures/StatusItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -15,13 +15,12 @@ namespace Sharlayan.Models.Structures { public class StatusItem { - - public int SourceSize { get; set; } - public int CasterID { get; set; } public int Duration { get; set; } + public int SourceSize { get; set; } + public int Stacks { get; set; } public int StatusID { get; set; } diff --git a/Sharlayan/Models/Structures/StructuresContainer.cs b/Sharlayan/Models/Structures/StructuresContainer.cs index 4863fda..7b1a911 100644 --- a/Sharlayan/Models/Structures/StructuresContainer.cs +++ b/Sharlayan/Models/Structures/StructuresContainer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/Structures/TargetInfo.cs b/Sharlayan/Models/Structures/TargetInfo.cs index 1dd38b0..afb8982 100644 --- a/Sharlayan/Models/Structures/TargetInfo.cs +++ b/Sharlayan/Models/Structures/TargetInfo.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/XIVDatabase/ActionItem.cs b/Sharlayan/Models/XIVDatabase/ActionItem.cs index 4f176b7..3f7da20 100644 --- a/Sharlayan/Models/XIVDatabase/ActionItem.cs +++ b/Sharlayan/Models/XIVDatabase/ActionItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/XIVDatabase/MapItem.cs b/Sharlayan/Models/XIVDatabase/MapItem.cs index e644526..d6556e1 100644 --- a/Sharlayan/Models/XIVDatabase/MapItem.cs +++ b/Sharlayan/Models/XIVDatabase/MapItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Models/XIVDatabase/StatusItem.cs b/Sharlayan/Models/XIVDatabase/StatusItem.cs index 0329fc8..b507255 100644 --- a/Sharlayan/Models/XIVDatabase/StatusItem.cs +++ b/Sharlayan/Models/XIVDatabase/StatusItem.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/NLog.xsd b/Sharlayan/NLog.xsd index 1bd61d8..2ca3ba8 100644 --- a/Sharlayan/NLog.xsd +++ b/Sharlayan/NLog.xsd @@ -37,12 +37,12 @@ - Global log level threshold for application log messages. Messages below this level won't be logged.. + Global log level threshold for application log messages. Messages below this level won't be logged. - Throw an exception when there is an internal error. Default value is: false. + Throw an exception when there is an internal error. Default value is: false. Not recommend to set to true in production! @@ -72,7 +72,7 @@ - Perform mesage template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty. + Perform message template parsing and formatting of LogEvent messages (true = Always, false = Never, empty = Auto Detect). Default value is: empty. @@ -123,7 +123,7 @@ - Name of the logger. May include '*' character which acts like a wildcard. Allowed forms are: *, Name, *Name, Name* and *Name* + Name of the logger. May include wildcard characters ('*' or '?'). @@ -156,9 +156,9 @@ Ignore further rules if this one matches. - + - Enable or disable logging rule. Disabled rules are ignored. + Rule identifier to allow rule lookup with Configuration.FindRuleByName and Configuration.RemoveRuleByName. @@ -171,6 +171,11 @@ + + + Default action if none of the filters match. + + @@ -210,12 +215,19 @@ + + + + Variable value. Note, the 'value' attribute has precedence over this one. + + + Variable name. - + Variable value. @@ -276,6 +288,7 @@ + @@ -292,6 +305,11 @@ Number of log events that should be processed in a batch by the lazy writer thread. + + + Whether to use the locking queue, instead of a lock-free concurrent queue The locking queue is less concurrent when many logger threads, but reduces memory allocation + + Limit of full s to write before yielding into Performance is better when writing many small batches, than writing a single large batch @@ -309,7 +327,7 @@ - Time in milliseconds to sleep between batches. + Time in milliseconds to sleep between batches. (1 or less means trigger on new activity) @@ -333,6 +351,7 @@ + @@ -346,6 +365,11 @@ Condition expression. Log events who meet this condition will cause a flush on the wrapped target. + + + Only flush when LogEvent matches condition. Ignore explicit-flush, config-reload-flush and shutdown-flush + + Name of the target. @@ -419,18 +443,20 @@ - + + + + - - - + + - - + + @@ -438,7 +464,7 @@ - + @@ -471,34 +497,39 @@ Indicates whether to append newline at the end of log message. - + - Action that should be taken if the will be more connections than . + Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - + - Maximum queue size. + Network address. - + - Maximum current connections. 0 = no maximum. + Size of the connection cache (number of connections which are kept alive). - + - Indicates whether to keep connection open whenever possible. + The number of seconds a connection will remain idle before the first keep-alive probe is sent - + - Size of the connection cache (number of connections which are kept alive). + Maximum queue size. - + - Network address. + Maximum current connections. 0 = no maximum. + + + + + Action that should be taken if the will be more connections than . @@ -506,24 +537,29 @@ Action that should be taken if the message is larger than maxMessageSize. + + + Indicates whether to keep connection open whenever possible. + + NDLC item separator. - + - NDC item separator. + Indicates whether to include source info (file name and line number) in the information sent over the network. - + - Indicates whether to include NLog-specific extensions to log4j schema. + Renderer for log4j:event logger-xml-attribute (Default ${logger}) - + - Indicates whether to include source info (file name and line number) in the information sent over the network. + Indicates whether to include NLog-specific extensions to log4j schema. @@ -561,9 +597,9 @@ AppInfo field. By default it's the friendly name of the current AppDomain. - + - Renderer for log4j:event logger-xml-attribute (Default ${logger}) + NDC item separator. @@ -574,6 +610,18 @@ + + + + + + + + + + + + @@ -592,10 +640,11 @@ + - Layout that should be use to calcuate the value for the parameter. + Layout that should be use to calculate the value for the parameter. @@ -603,6 +652,11 @@ Viewer parameter name. + + + Whether an attribute with empty value should be included in the output + + @@ -613,8 +667,11 @@ + + + @@ -645,6 +702,11 @@ Indicates whether to auto-check if the console is available. - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) + + + Enables output using ANSI Color Codes + + The encoding for writing messages to the . @@ -655,6 +717,16 @@ Indicates whether the error stream (stderr) should be used instead of the output stream (stdout). + + + Indicates whether to auto-flush after + + + + + Indicates whether to auto-check if the console has been redirected to file - Disables coloring logic when System.Console.IsOutputRedirected = true + + Indicates whether to use default row highlighting rules. @@ -765,9 +837,11 @@ + + @@ -790,6 +864,11 @@ Footer. + + + Indicates whether to auto-flush after + + Indicates whether to auto-check if the console is available - Disables console writing if Environment.UserInteractive = False (Windows Service) - Disables console writing if Console Standard Input is not available (Non-Console-App) @@ -805,6 +884,11 @@ Indicates whether to send the log messages to the standard error instead of the standard output. + + + Whether to enable batch writing using char[]-buffers, instead of using + + Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit @@ -819,21 +903,24 @@ - + - - + + - + + + + - + @@ -845,9 +932,9 @@ Obsolete - value will be ignored! The logging code always runs outside of transaction. Gets or sets a value indicating whether to use database transactions. Some data providers require this. - + - Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. + Indicates whether to keep the database connection open between the log events. @@ -860,14 +947,14 @@ Database password. If the ConnectionString is not provided this value will be used to construct the "Password=" part of the connection string. - + - Indicates whether to keep the database connection open between the log events. + Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. - + - Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. + Database user name. If the ConnectionString is not provided this value will be used to construct the "User ID=" part of the connection string. @@ -880,9 +967,9 @@ Connection string. When provided, it overrides the values specified in DBHost, DBUserName, DBPassword, DBDatabase. - + - Database host name. If the ConnectionString is not provided this value will be used to construct the "Server=" part of the connection string. + Database name. If the ConnectionString is not provided this value will be used to construct the "Database=" part of the connection string. @@ -890,6 +977,11 @@ Connection string using for installation and uninstallation. If not provided, regular ConnectionString is being used. + + + Configures isolated transaction batch writing. If supported by the database, then it will improve insert performance. + + Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit @@ -915,6 +1007,51 @@ + + + + + + + + + + + + + + + + + + + + + + Convert format of the property value + + + + + Culture used for parsing property string-value for type-conversion + + + + + Value to assign on the object-property + + + + + Name for the object-property + + + + + Type of the object-property + + + @@ -946,20 +1083,34 @@ - + + + - + + + + + + Database parameter name. + + - Layout that should be use to calcuate the value for the parameter. + Layout that should be use to calculate the value for the parameter. - + - Database parameter name. + Database parameter DbType. + + + + + Database parameter size. @@ -972,9 +1123,19 @@ Database parameter scale. - + - Database parameter size. + Type of the parameter. + + + + + Convert format of the database parameter value. + + + + + Culture used for parsing parameter string-value for type-conversion @@ -1076,7 +1237,7 @@ - Optional entrytype. When not set, or when not convertable to then determined by + Optional entry type. When not set, or when not convertible to then determined by @@ -1096,7 +1257,7 @@ - Maximum Event log size in kilobytes. If null, the value won't be set. Default is 512 Kilobytes as specified by Eventlog API + Maximum Event log size in kilobytes. @@ -1165,6 +1326,7 @@ + @@ -1174,30 +1336,32 @@ - - - - - - + + + + + + - - - + + - - + + + + + + + - - @@ -1229,6 +1393,11 @@ Line ending mode. + + + Maximum days of archive files that should be kept. + + Indicates whether to compress archive files into the zip archive format. @@ -1271,22 +1440,22 @@ - Maximum number of log filenames that should be stored as existing. + Maximum number of log file names that should be stored as existing. - + - Name of the file to write to. + Indicates whether to delete old log file on startup. - + - Value specifying the date format to use when archiving files. + File attributes (Windows only). - + - Indicates whether to archive old log file on startup. + Indicates whether to create directories if they do not exist. @@ -1294,29 +1463,29 @@ Cleanup invalid values in a filename, e.g. slashes in a filename. If set to true, this can impact the performance of massive writes. If set to false, nothing gets written when the filename is wrong. - + - Indicates whether to create directories if they do not exist. + Value of the file size threshold to archive old log file on startup. - + - Indicates whether to delete old log file on startup. + Indicates whether to archive old log file on startup. - + - File attributes (Windows only). + Value specifying the date format to use when archiving files. - + - Indicates whether to write BOM (byte order mark) in created files + Indicates whether to enable log file(s) to be deleted. - + - Indicates whether to enable log file(s) to be deleted. + Indicates whether to write BOM (byte order mark) in created files @@ -1326,7 +1495,7 @@ - Value indicationg whether file creation calls should be synchronized by a system global mutex. + Indicates whether file creation calls should be synchronized by a system global mutex. @@ -1339,19 +1508,14 @@ Is the an absolute or relative path? - - - Indicates whether concurrent writes to the log file by multiple processes on the same host. - - - + - Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write + Name of the file to write to. - + - Delay in milliseconds to wait before attempting to write to the file again. + Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit @@ -1359,29 +1523,29 @@ Indicates whether concurrent writes to the log file by multiple processes on different network hosts. - + - Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). + Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. - + - Maximum number of seconds that files are kept open. If this number is negative the files are not automatically closed after a period of inactivity. + Number of files to be kept open. Setting this to a higher value may improve performance in a situation where a single File target is writing to many files (such as splitting by level or by logger). - + - Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit + Indicates whether to keep log file open instead of opening and closing it on each logging event. - + - Log file buffer size in bytes. + Whether or not this target should just discard all data that its asked to write. Mostly used for when testing NLog Stack except final write - + - Indicates whether to automatically flush the file buffers after each log message. + Indicates whether concurrent writes to the log file by multiple processes on the same host. @@ -1389,9 +1553,24 @@ Number of times the write is appended on the file before NLog discards the log message. - + - Indicates whether to keep log file open instead of opening and closing it on each logging event. + Delay in milliseconds to wait before attempting to write to the file again. + + + + + Log file buffer size in bytes. + + + + + Maximum number of seconds before open files are flushed. If this number is negative or zero the files are not flushed by timer. + + + + + Indicates whether to automatically flush the file buffers after each log message. @@ -1455,6 +1634,7 @@ + @@ -1861,6 +2041,7 @@ + @@ -1873,6 +2054,11 @@ Layout used to format log messages. + + + Max number of items to have in memory + + Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit @@ -1926,11 +2112,13 @@ + + @@ -1973,6 +2161,11 @@ Size of the connection cache (number of connections which are kept alive). + + + The number of seconds a connection will remain idle before the first keep-alive probe is sent + + Indicates whether to keep connection open whenever possible. @@ -1998,6 +2191,11 @@ Action that should be taken if the message is larger than maxMessageSize. + + + Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. + + Target supports reuse of internal buffers, and doesn't have to constantly allocate new buffers Required for legacy NLog-targets, that expects buffers to remain stable after Write-method exit @@ -2016,18 +2214,20 @@ - + + + + - - - + + - - + + @@ -2035,7 +2235,7 @@ - + @@ -2068,34 +2268,39 @@ Indicates whether to append newline at the end of log message. - + - Action that should be taken if the will be more connections than . + Get or set the SSL/TLS protocols. Default no SSL/TLS is used. Currently only implemented for TCP. - + - Maximum queue size. + Network address. - + - Maximum current connections. 0 = no maximum. + Size of the connection cache (number of connections which are kept alive). - + - Indicates whether to keep connection open whenever possible. + The number of seconds a connection will remain idle before the first keep-alive probe is sent - + - Size of the connection cache (number of connections which are kept alive). + Maximum queue size. - + - Network address. + Maximum current connections. 0 = no maximum. + + + + + Action that should be taken if the will be more connections than . @@ -2103,24 +2308,29 @@ Action that should be taken if the message is larger than maxMessageSize. + + + Indicates whether to keep connection open whenever possible. + + NDLC item separator. - + - NDC item separator. + Indicates whether to include source info (file name and line number) in the information sent over the network. - + - Indicates whether to include NLog-specific extensions to log4j schema. + Renderer for log4j:event logger-xml-attribute (Default ${logger}) - + - Indicates whether to include source info (file name and line number) in the information sent over the network. + Indicates whether to include NLog-specific extensions to log4j schema. @@ -2158,9 +2368,9 @@ AppInfo field. By default it's the friendly name of the current AppDomain. - + - Renderer for log4j:event logger-xml-attribute (Default ${logger}) + NDC item separator. @@ -2490,6 +2700,7 @@ + @@ -2503,6 +2714,11 @@ Layout used to format log messages. + + + Forward to (Instead of ) + + Always use independent of @@ -2703,6 +2919,13 @@ + + + + + + + @@ -2714,17 +2937,11 @@ - - - - - - - + @@ -2736,20 +2953,42 @@ Name of the column. + + + Override of Quoting mode + + + + + + - - + + + Should forward slashes be escaped? If true, / will be converted to \/ + + + + + Option to render the empty object value {} + + + + + Option to suppress the extra spaces in the output json + + List of property names to exclude when is true @@ -2760,24 +2999,19 @@ Option to include all properties from the log event (as JSON) - + Indicates whether to include contents of the dictionary. - + Indicates whether to include contents of the dictionary. - - - Option to render the empty object value {} - - - + - Option to suppress the extra spaces in the output json + Indicates whether to include contents of the dictionary. @@ -2793,6 +3027,7 @@ + @@ -2808,7 +3043,12 @@ - Determines wether or not this attribute will be Json encoded. + Determines whether or not this attribute will be Json encoded. + + + + + Should forward slashes be escaped? If true, / will be converted to \/ @@ -2853,16 +3093,24 @@ + + + Option to include all properties from the log events + + + Indicates whether to include call site (class and method name) in the information sent over the network. + + Indicates whether to include contents of the dictionary. @@ -2883,6 +3131,11 @@ Indicates whether to include contents of the stack. + + + Indicates whether to include source info (file name and line number) in the information sent over the network. + + @@ -2900,6 +3153,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + List of property names to exclude when is true + + + + + Option to include all properties from the log event (as XML) + + + + + Indicates whether to include contents of the dictionary. + + + + + Indicates whether to include contents of the dictionary. + + + + + How far should the XML serializer follow object references before backing off + + + + + XML element name to use for rendering IList-collections items + + + + + XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included + + + + + XML element name to use when rendering properties + + + + + XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value + + + + + Name of the root XML element + + + + + Value inside the root XML element + + + + + Whether a ElementValue with empty value should be included in the output + + + + + Auto indent and create new lines + + + + + Determines whether or not this attribute will be Xml encoded. + + + + + + + + + + + + + + + Layout that will be rendered as the attribute's value. + + + + + Name of the attribute. + + + + + Determines whether or not this attribute will be Xml encoded. + + + + + Whether an attribute with empty value should be included in the output + + + + + + + + + + + + + + + + + + + + + + + + + Determines whether or not this attribute will be Xml encoded. + + + + + Name of the element + + + + + Value inside the element + + + + + Whether a ElementValue with empty value should be included in the output + + + + + Auto indent and create new lines + + + + + List of property names to exclude when is true + + + + + Option to include all properties from the log event (as XML) + + + + + Indicates whether to include contents of the dictionary. + + + + + Indicates whether to include contents of the dictionary. + + + + + How far should the XML serializer follow object references before backing off + + + + + XML element name to use for rendering IList-collections items + + + + + XML attribute name to use when rendering property-key When null (or empty) then key-attribute is not included + + + + + XML element name to use when rendering properties + + + + + XML attribute name to use when rendering property-value When null (or empty) then value-attribute is not included and value is formatted as XML-element-value + + + diff --git a/Sharlayan/Properties/AssemblyInfo.cs b/Sharlayan/Properties/AssemblyInfo.cs index 0d36a63..28a2312 100644 --- a/Sharlayan/Properties/AssemblyInfo.cs +++ b/Sharlayan/Properties/AssemblyInfo.cs @@ -1,11 +1,6 @@ -// This is an open source non-commercial project. Dear PVS-Studio, please check it. -// PVS-Studio Static Code Analyzer for C, C++, C#, and Java: http://www.viva64.com - - - -// -------------------------------------------------------------------------------------------------------------------- +// -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -19,22 +14,22 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Sharlayan")] -[assembly: AssemblyDescription("Final Fantasy XIV Memory Reading")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("SyndicatedLife")] -[assembly: AssemblyProduct("Sharlayan")] -[assembly: AssemblyCopyright("Copyright © 2007 - 2018 Ryan Wilson")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly: AssemblyTitle("Sharlayan"),] +[assembly: AssemblyDescription("Final Fantasy XIV Memory Reading"),] +[assembly: AssemblyConfiguration(""),] +[assembly: AssemblyCompany("SyndicatedLife"),] +[assembly: AssemblyProduct("Sharlayan"),] +[assembly: AssemblyCopyright("Copyright © 2007 - 2020 Ryan Wilson"),] +[assembly: AssemblyTrademark(""),] +[assembly: AssemblyCulture(""),] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] +[assembly: ComVisible(false),] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b29444ea-7380-46a8-88ab-55bc6bdcf7af")] +[assembly: Guid("b29444ea-7380-46a8-88ab-55bc6bdcf7af"),] // Version information for an assembly consists of the following four values: // Major Version @@ -44,5 +39,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("5.0.0")] -[assembly: AssemblyInformationalVersion("5.0.3")] \ No newline at end of file +[assembly: AssemblyVersion("5.0.0"),] +[assembly: AssemblyInformationalVersion("5.0.6"),] \ No newline at end of file diff --git a/Sharlayan/Reader.Actions.cs b/Sharlayan/Reader.Actions.cs index e17f5b7..e300115 100644 --- a/Sharlayan/Reader.Actions.cs +++ b/Sharlayan/Reader.Actions.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -27,6 +27,8 @@ namespace Sharlayan { using BitConverter = Sharlayan.Utilities.BitConverter; public static partial class Reader { + private static readonly Regex KeyBindsRegex = new Regex(@"[\[\]]", RegexOptions.Compiled); + public static bool CanGetActions() { var canRead = Scanner.Instance.Locations.ContainsKey(Signatures.HotBarKey) && Scanner.Instance.Locations.ContainsKey(Signatures.RecastKey); if (canRead) { @@ -83,7 +85,7 @@ private static ActionContainer GetHotBarRecast(Action.Container type) { IntPtr recastContainerAddress = IntPtr.Add(RecastMap, (int) type * recastContainerSize); var container = new ActionContainer { - ContainerType = type + ContainerType = type, }; var canUseKeyBinds = false; @@ -106,7 +108,7 @@ private static ActionContainer GetHotBarRecast(Action.Container type) { limit = 16; break; default: - limit = 12; + limit = 16; canUseKeyBinds = true; break; } @@ -132,18 +134,17 @@ private static ActionContainer GetHotBarRecast(Action.Container type) { Name = name, ID = BitConverter.TryToInt16(hotbarSource, MemoryHandler.Instance.Structures.HotBarItem.ID), KeyBinds = MemoryHandler.Instance.GetStringFromBytes(hotbarSource, MemoryHandler.Instance.Structures.HotBarItem.KeyBinds), - Slot = slot + Slot = slot, }; if (canUseKeyBinds) { if (!string.IsNullOrWhiteSpace(item.KeyBinds)) { item.Name = item.Name.Replace($" {item.KeyBinds}", string.Empty); - item.KeyBinds = Regex.Replace(item.KeyBinds, @"[\[\]]", string.Empty); + item.KeyBinds = KeyBindsRegex.Replace(item.KeyBinds, string.Empty); List buttons = item.KeyBinds.Split( new[] { - '+' - }, - StringSplitOptions.RemoveEmptyEntries).ToList(); + '+', + }, StringSplitOptions.RemoveEmptyEntries).ToList(); if (buttons.Count > 0) { item.ActionKey = buttons.Last(); } diff --git a/Sharlayan/Reader.Actor.cs b/Sharlayan/Reader.Actor.cs index 1a3b079..9bc7a97 100644 --- a/Sharlayan/Reader.Actor.cs +++ b/Sharlayan/Reader.Actor.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -16,17 +16,19 @@ namespace Sharlayan { using System; using System.Collections.Generic; + using System.Linq; using Sharlayan.Core; using Sharlayan.Core.Enums; using Sharlayan.Delegates; using Sharlayan.Models.ReadResults; using Sharlayan.Utilities; - using System.Linq; using BitConverter = Sharlayan.Utilities.BitConverter; public static partial class Reader { + private static Dictionary expiringActors = new Dictionary(); + public static bool CanGetActors() { var canRead = Scanner.Instance.Locations.ContainsKey(Signatures.CharacterMapKey); if (canRead) { @@ -36,8 +38,6 @@ public static bool CanGetActors() { return canRead; } - private static Dictionary expiringActors = new Dictionary(); - public static ActorResult GetActors() { var result = new ActorResult(); @@ -160,10 +160,8 @@ public static ActorResult GetActors() { ActorItem entry = ActorItemResolver.ResolveActorFromBytes(source, isFirstEntry, existing); - if (entry != null && entry.IsValid) - { - if (expiringActors.ContainsKey(ID)) - { + if (entry != null && entry.IsValid) { + if (expiringActors.ContainsKey(ID)) { expiringActors.Remove(ID); } } @@ -229,38 +227,28 @@ public static ActorResult GetActors() { } try { - // add the "removed" actors to the expiring list - foreach (KeyValuePair kvp in result.RemovedMonsters) - { - if (!expiringActors.ContainsKey(kvp.Key)) - { + foreach (KeyValuePair kvp in result.RemovedMonsters) { + if (!expiringActors.ContainsKey(kvp.Key)) { expiringActors[kvp.Key] = now + staleActorRemovalTime; } } - foreach (KeyValuePair kvp in result.RemovedNPCs) - { - if (!expiringActors.ContainsKey(kvp.Key)) - { + foreach (KeyValuePair kvp in result.RemovedNPCs) { + if (!expiringActors.ContainsKey(kvp.Key)) { expiringActors[kvp.Key] = now + staleActorRemovalTime; } } - foreach (KeyValuePair kvp in result.RemovedPCs) - { - if (!expiringActors.ContainsKey(kvp.Key)) - { + foreach (KeyValuePair kvp in result.RemovedPCs) { + if (!expiringActors.ContainsKey(kvp.Key)) { expiringActors[kvp.Key] = now + staleActorRemovalTime; } } - // check expiring list for stale actors - foreach (var kvp in expiringActors.ToList()) - { - if (now > kvp.Value) - { + foreach (var kvp in expiringActors.ToList()) { + if (now > kvp.Value) { // Stale actor. Remove it. MonsterWorkerDelegate.RemoveActorItem(kvp.Key); NPCWorkerDelegate.RemoveActorItem(kvp.Key); @@ -268,15 +256,13 @@ public static ActorResult GetActors() { expiringActors.Remove(kvp.Key); } - else - { + else { // Not stale enough yet. We're not actually removing it. result.RemovedMonsters.TryRemove(kvp.Key, out ActorItem _); result.RemovedNPCs.TryRemove(kvp.Key, out ActorItem _); result.RemovedPCs.TryRemove(kvp.Key, out ActorItem _); } } - } catch (Exception ex) { MemoryHandler.Instance.RaiseException(Logger, ex, true); diff --git a/Sharlayan/Reader.ChatLog.cs b/Sharlayan/Reader.ChatLog.cs index afb567f..5225e4f 100644 --- a/Sharlayan/Reader.ChatLog.cs +++ b/Sharlayan/Reader.ChatLog.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -13,7 +13,8 @@ // // -------------------------------------------------------------------------------------------------------------------- -namespace Sharlayan { +namespace Sharlayan +{ using System; using System.Collections.Generic; using System.Linq; @@ -23,20 +24,25 @@ namespace Sharlayan { using Sharlayan.Models; using Sharlayan.Models.ReadResults; - public static partial class Reader { - public static bool CanGetChatLog() { + public static partial class Reader + { + public static bool CanGetChatLog() + { var canRead = Scanner.Instance.Locations.ContainsKey(Signatures.ChatLogKey); - if (canRead) { + if (canRead) + { // OTHER STUFF? } return canRead; } - public static ChatLogResult GetChatLog(int previousArrayIndex = 0, int previousOffset = 0) { + public static ChatLogResult GetChatLog(int previousArrayIndex = 0, int previousOffset = 0) + { var result = new ChatLogResult(); - if (!CanGetChatLog() || !MemoryHandler.Instance.IsAttached) { + if (!CanGetChatLog() || !MemoryHandler.Instance.IsAttached) + { return result; } @@ -45,62 +51,74 @@ public static ChatLogResult GetChatLog(int previousArrayIndex = 0, int previousO Signature ChatLogKey = Scanner.Instance.Locations[Signatures.ChatLogKey]; - var chatPointerMap = (IntPtr) Scanner.Instance.Locations[Signatures.ChatLogKey]; + var chatPointerMap = (IntPtr)Scanner.Instance.Locations[Signatures.ChatLogKey]; - if (chatPointerMap.ToInt64() <= 20) { + if (chatPointerMap.ToInt64() <= 20) + { return result; } List> buffered = new List>(); - try { + try + { var LineCount = (uint)MemoryHandler.Instance.GetPlatformUInt(chatPointerMap); ChatLogReader.Indexes.Clear(); - ChatLogReader.ChatLogPointers = new ChatLogPointers { - LineCount = (uint) MemoryHandler.Instance.GetPlatformUInt(chatPointerMap), + ChatLogReader.ChatLogPointers = new ChatLogPointers + { + LineCount = (uint)MemoryHandler.Instance.GetPlatformUInt(chatPointerMap), OffsetArrayStart = MemoryHandler.Instance.GetPlatformUInt(chatPointerMap, MemoryHandler.Instance.Structures.ChatLogPointers.OffsetArrayStart), OffsetArrayPos = MemoryHandler.Instance.GetPlatformUInt(chatPointerMap, MemoryHandler.Instance.Structures.ChatLogPointers.OffsetArrayPos), OffsetArrayEnd = MemoryHandler.Instance.GetPlatformUInt(chatPointerMap, MemoryHandler.Instance.Structures.ChatLogPointers.OffsetArrayEnd), LogStart = MemoryHandler.Instance.GetPlatformUInt(chatPointerMap, MemoryHandler.Instance.Structures.ChatLogPointers.LogStart), LogNext = MemoryHandler.Instance.GetPlatformUInt(chatPointerMap, MemoryHandler.Instance.Structures.ChatLogPointers.LogNext), - LogEnd = MemoryHandler.Instance.GetPlatformUInt(chatPointerMap, MemoryHandler.Instance.Structures.ChatLogPointers.LogEnd) + LogEnd = MemoryHandler.Instance.GetPlatformUInt(chatPointerMap, MemoryHandler.Instance.Structures.ChatLogPointers.LogEnd), }; ChatLogReader.EnsureArrayIndexes(); var currentArrayIndex = (ChatLogReader.ChatLogPointers.OffsetArrayPos - ChatLogReader.ChatLogPointers.OffsetArrayStart) / 4; - if (ChatLogReader.ChatLogFirstRun) { + if (ChatLogReader.ChatLogFirstRun) + { ChatLogReader.ChatLogFirstRun = false; - ChatLogReader.PreviousOffset = ChatLogReader.Indexes[(int) currentArrayIndex - 1]; - ChatLogReader.PreviousArrayIndex = (int) currentArrayIndex - 1; + ChatLogReader.PreviousOffset = ChatLogReader.Indexes[(int)currentArrayIndex - 1]; + ChatLogReader.PreviousArrayIndex = (int)currentArrayIndex - 1; } - else { - if (currentArrayIndex < ChatLogReader.PreviousArrayIndex) { + else + { + if (currentArrayIndex < ChatLogReader.PreviousArrayIndex) + { buffered.AddRange(ChatLogReader.ResolveEntries(ChatLogReader.PreviousArrayIndex, 1000)); ChatLogReader.PreviousOffset = 0; ChatLogReader.PreviousArrayIndex = 0; } - if (ChatLogReader.PreviousArrayIndex < currentArrayIndex) { - buffered.AddRange(ChatLogReader.ResolveEntries(ChatLogReader.PreviousArrayIndex, (int) currentArrayIndex)); + if (ChatLogReader.PreviousArrayIndex < currentArrayIndex) + { + buffered.AddRange(ChatLogReader.ResolveEntries(ChatLogReader.PreviousArrayIndex, (int)currentArrayIndex)); } - ChatLogReader.PreviousArrayIndex = (int) currentArrayIndex; + ChatLogReader.PreviousArrayIndex = (int)currentArrayIndex; } } - catch (Exception ex) { + catch (Exception ex) + { MemoryHandler.Instance.RaiseException(Logger, ex, true); } - foreach (List bytes in buffered.Where(b => b.Count > 0)) { - try { + foreach (List bytes in buffered.Where(b => b.Count > 0)) + { + try + { ChatLogItem chatLogEntry = ChatEntry.Process(bytes.ToArray()); - if (Regex.IsMatch(chatLogEntry.Combined, @"[\w\d]{4}::?.+")) { + if (Regex.IsMatch(chatLogEntry.Combined, @"[\w\d]{4}::?.+")) + { result.ChatLogItems.Add(chatLogEntry); } } - catch (Exception ex) { + catch (Exception ex) + { MemoryHandler.Instance.RaiseException(Logger, ex, true); } } @@ -111,7 +129,8 @@ public static ChatLogResult GetChatLog(int previousArrayIndex = 0, int previousO return result; } - private static class ChatLogReader { + private static class ChatLogReader + { public static readonly List Indexes = new List(); public static bool ChatLogFirstRun = true; @@ -122,16 +141,20 @@ private static class ChatLogReader { public static int PreviousOffset; - public static void EnsureArrayIndexes() { + public static void EnsureArrayIndexes() + { Indexes.Clear(); - for (var i = 0; i < 1000; i++) { - Indexes.Add((int) MemoryHandler.Instance.GetPlatformUInt(new IntPtr(ChatLogPointers.OffsetArrayStart + i * 4))); + for (var i = 0; i < 1000; i++) + { + Indexes.Add((int)MemoryHandler.Instance.GetPlatformUInt(new IntPtr(ChatLogPointers.OffsetArrayStart + i * 4))); } } - public static IEnumerable> ResolveEntries(int offset, int length) { + public static IEnumerable> ResolveEntries(int offset, int length) + { List> entries = new List>(); - for (var i = offset; i < length; i++) { + for (var i = offset; i < length; i++) + { EnsureArrayIndexes(); var currentOffset = Indexes[i]; entries.Add(ResolveEntry(PreviousOffset, currentOffset)); @@ -141,7 +164,8 @@ public static IEnumerable> ResolveEntries(int offset, int length) { return entries; } - private static List ResolveEntry(int offset, int length) { + private static List ResolveEntry(int offset, int length) + { return new List(MemoryHandler.Instance.GetByteArray(new IntPtr(ChatLogPointers.LogStart + offset), length - offset)); } } diff --git a/Sharlayan/Reader.CurrentPlayer.cs b/Sharlayan/Reader.CurrentPlayer.cs index ca8432d..83a7f47 100644 --- a/Sharlayan/Reader.CurrentPlayer.cs +++ b/Sharlayan/Reader.CurrentPlayer.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -43,16 +43,13 @@ public static CurrentPlayerResult GetCurrentPlayer() { return result; } - try - { + try { byte[] source = MemoryHandler.Instance.GetByteArray(PlayerInfoMap, MemoryHandler.Instance.Structures.CurrentPlayer.SourceSize); - try - { + try { result.CurrentPlayer = CurrentPlayerResolver.ResolvePlayerFromBytes(source); } - catch (Exception ex) - { + catch (Exception ex) { MemoryHandler.Instance.RaiseException(Logger, ex, true); } @@ -67,7 +64,7 @@ public static CurrentPlayerResult GetCurrentPlayer() { var agroEntry = new EnmityItem { ID = (uint) MemoryHandler.Instance.GetPlatformInt(address, MemoryHandler.Instance.Structures.EnmityItem.ID), Name = MemoryHandler.Instance.GetString(address + MemoryHandler.Instance.Structures.EnmityItem.Name), - Enmity = MemoryHandler.Instance.GetUInt32(address + MemoryHandler.Instance.Structures.EnmityItem.Enmity) + Enmity = MemoryHandler.Instance.GetUInt32(address + MemoryHandler.Instance.Structures.EnmityItem.Enmity), }; if (agroEntry.ID > 0) { result.CurrentPlayer.EnmityItems.Add(agroEntry); @@ -75,7 +72,6 @@ public static CurrentPlayerResult GetCurrentPlayer() { } } } - } catch (Exception ex) { MemoryHandler.Instance.RaiseException(Logger, ex, true); diff --git a/Sharlayan/Reader.DialogPanel.cs b/Sharlayan/Reader.DialogPanel.cs index aad18de..f038654 100644 --- a/Sharlayan/Reader.DialogPanel.cs +++ b/Sharlayan/Reader.DialogPanel.cs @@ -16,7 +16,6 @@ public static bool CanGetDialogPanel() { var canRead = Scanner.Instance.Locations.ContainsKey(Signatures.DialogPanelName); canRead = canRead && Scanner.Instance.Locations.ContainsKey(Signatures.DialogPanelText); - canRead = canRead && Scanner.Instance.Locations.ContainsKey(Signatures.DialogPanelTextLegth); if (canRead) { @@ -29,7 +28,6 @@ public static bool CanGetDialogPanel() public static bool CanGetCutScene() { var canRead = Scanner.Instance.Locations.ContainsKey(Signatures.CutsceneText1); - //canRead = canRead && Scanner.Instance.Locations.ContainsKey(Signatures.CutsceneText2); canRead = canRead && Scanner.Instance.Locations.ContainsKey(Signatures.CutsceneTextLength); canRead = canRead && Scanner.Instance.Locations.ContainsKey(Signatures.CutsceneDetector); @@ -86,7 +84,6 @@ public static ChatLogResult GetDirectDialog() public static ChatLogItem GetDialogPanel() { var result = new ChatLogItem(); - //var result = new ChatLogResult(); if (!CanGetDialogPanel() || !MemoryHandler.Instance.IsAttached) { @@ -101,7 +98,9 @@ public static ChatLogItem GetDialogPanel() var dialogPanelNameLengthPointer = IntPtr.Subtract(dialogPanelNamePointer, MemoryHandler.Instance.Structures.DialogPanelPointers.LengtsOffset); var dialogPanelTextPointer = (IntPtr)Scanner.Instance.Locations[Signatures.DialogPanelText]; - var dialogPanelTextLegthPointer = (IntPtr)Scanner.Instance.Locations[Signatures.DialogPanelTextLegth]; + var dialogPanelText = new IntPtr(MemoryHandler.Instance.GetPlatformUInt(dialogPanelTextPointer)); + + var dialogPanelTextLegthPointer = IntPtr.Add(dialogPanelTextPointer, MemoryHandler.Instance.Structures.DialogPanelPointers.TextLengthOffset); int nameLength = (int)MemoryHandler.Instance.GetPlatformInt(dialogPanelNameLengthPointer); int textLength = (int)MemoryHandler.Instance.GetPlatformInt(dialogPanelTextLegthPointer); @@ -114,7 +113,7 @@ public static ChatLogItem GetDialogPanel() nameLength = 128; byte[] npcNameBytes = MemoryHandler.Instance.GetByteArray(dialogPanelNamePointer, nameLength); - byte[] textBytes = MemoryHandler.Instance.GetByteArray(dialogPanelTextPointer, textLength); + byte[] textBytes = MemoryHandler.Instance.GetByteArray(dialogPanelText, textLength); nameLength = GetRealTextLength(ref npcNameBytes); textLength = GetRealTextLength(ref textBytes); @@ -163,35 +162,24 @@ public static ChatLogItem GetCutsceneText() try { var cutsceneTextPointer1 = (IntPtr)Scanner.Instance.Locations[Signatures.CutsceneText1]; - //var cutsceneTextPointer2 = (IntPtr)Scanner.Instance.Locations[Signatures.CutsceneText2]; + var cutsceneTextLengthPointer = (IntPtr)Scanner.Instance.Locations[Signatures.CutsceneTextLength]; var cutsceneDetector = (IntPtr)Scanner.Instance.Locations[Signatures.CutsceneDetector]; int textLength = (int)MemoryHandler.Instance.GetPlatformInt(cutsceneTextLengthPointer); int isCutscene = (int)MemoryHandler.Instance.GetPlatformInt(cutsceneDetector); - //isCutscene = 1; if (textLength < 2 || isCutscene == 1) return result; byte[] cutsceneBytesRaw1 = MemoryHandler.Instance.GetByteArray(cutsceneTextPointer1, 256); - //byte[] cutsceneBytesRaw2 = MemoryHandler.Instance.GetByteArray(cutsceneTextPointer2, 256); int textEnd1 = GetRealTextLength(ref cutsceneBytesRaw1); - //int textEnd2 = GetRealTextLength(ref cutsceneBytesRaw2); if (textEnd1 > 2) { byte[] cutsceneBytes1 = cutsceneBytesRaw1; - //byte[] cutsceneBytes2 = cutsceneBytesRaw2; - - //Array.Copy(cutsceneBytesRaw1, cutsceneBytes1, textEnd1); - //Array.Copy(cutsceneBytesRaw2, cutsceneBytes2, textEnd2); - - //string cutText1 = MemoryHandler.Instance.GetStringFromBytes(cutsceneBytes1); - //string cutText2 = MemoryHandler.Instance.GetStringFromBytes(cutsceneBytes2); - Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; byte[] unixTimestampBytes = BitConverter.GetBytes(unixTimestamp).ToArray(); @@ -201,8 +189,6 @@ public static ChatLogItem GetCutsceneText() npcNameBytes[0] = dotBytes; npcNameBytes[1] = dotBytes; npcNameBytes[2] = dotBytes; - //npcNameBytes[3] = spaceBytes; - List rawBytesList = new List(unixTimestampBytes.Length + chatCodeBytes.Length + 1 + npcNameBytes.Length + 1 + cutsceneBytes1.Length); @@ -226,8 +212,17 @@ public static ChatLogItem GetCutsceneText() } } + + if (result?.Line != null) + { + if (result.Line.Contains("]") && result.Line.Contains("[")) + return new ChatLogItem(); + } + } + catch (Exception) + { + result = new ChatLogItem(); } - catch (Exception) { } return result; } @@ -246,10 +241,10 @@ public static bool CheckChatEquality(ChatLogItem item1, ChatLogItem item2) string str1 = item1.Line.ToString(); string str2 = item2.Line.ToString(); - if(item1.Line.Contains(":")) + if (item1.Line.Contains(":")) str1 = item1.Line.Substring(item1.Line.IndexOf(':')); - if(item2.Line.Contains(":")) + if (item2.Line.Contains(":")) str2 = item2.Line.Substring(item2.Line.IndexOf(':')); String onlyLetters1 = new String(str1.Where(Char.IsLetter).ToArray()); @@ -277,7 +272,6 @@ private static bool CheckRepetition(System.Collections.Concurrent.ConcurrentQueu { while (Log.TryDequeue(out previusChatLogItem)) ; - //result.ChatLogItems.Add(chatLogItem); repetitonFlag = false; Log.Enqueue(item); @@ -287,13 +281,10 @@ private static bool CheckRepetition(System.Collections.Concurrent.ConcurrentQueu { Log.Enqueue(item); - //result.ChatLogItems.Add(chatLogItem); repetitonFlag = false; } } - /*if (repetitonFlag) - item = null;//*/ return repetitonFlag; } @@ -340,7 +331,7 @@ private static bool IsTextEmpty(this ChatLogItem chatLogItem) return result; else { - if (chatLogItem.Line.Length-1 != indexOf) + if (chatLogItem.Line.Length - 1 != indexOf) result = false; } diff --git a/Sharlayan/Reader.Inventory.cs b/Sharlayan/Reader.Inventory.cs index 5167fff..0f13628 100644 --- a/Sharlayan/Reader.Inventory.cs +++ b/Sharlayan/Reader.Inventory.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -87,7 +87,7 @@ private static InventoryContainer GetInventoryItems(Inventory.Container type) { var container = new InventoryContainer { Amount = MemoryHandler.Instance.GetByte(InventoryPointerMap, offset + MemoryHandler.Instance.Structures.InventoryContainer.Amount), TypeID = (byte) type, - ContainerType = type + ContainerType = type, }; // The number of item is 50 in COMPANY's locker @@ -117,7 +117,7 @@ private static InventoryContainer GetInventoryItems(Inventory.Container type) { GlamourID = (uint) MemoryHandler.Instance.GetPlatformUInt(itemOffset, MemoryHandler.Instance.Structures.InventoryItem.GlamourID), // get the flag that show if the item is hq or not - IsHQ = MemoryHandler.Instance.GetByte(itemOffset, MemoryHandler.Instance.Structures.InventoryItem.IsHQ) == 0x01 + IsHQ = MemoryHandler.Instance.GetByte(itemOffset, MemoryHandler.Instance.Structures.InventoryItem.IsHQ) == 0x01, }); } } diff --git a/Sharlayan/Reader.PartyMembers.cs b/Sharlayan/Reader.PartyMembers.cs index eca4eda..d6f6b47 100644 --- a/Sharlayan/Reader.PartyMembers.cs +++ b/Sharlayan/Reader.PartyMembers.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Reader.Target.cs b/Sharlayan/Reader.Target.cs index 47c9270..f50139b 100644 --- a/Sharlayan/Reader.Target.cs +++ b/Sharlayan/Reader.Target.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -126,8 +126,8 @@ public static TargetResult GetTargetInfo() { var address = new IntPtr(enmityStructure.ToInt64() + i * enmitySourceSize); var enmityEntry = new EnmityItem { ID = (uint) MemoryHandler.Instance.GetPlatformInt(address, MemoryHandler.Instance.Structures.EnmityItem.ID), - Name = MemoryHandler.Instance.GetString(address + MemoryHandler.Instance.Structures.EnmityItem.Name), - Enmity = MemoryHandler.Instance.GetUInt32(address + MemoryHandler.Instance.Structures.EnmityItem.Enmity) + // Name = MemoryHandler.Instance.GetString(address + MemoryHandler.Instance.Structures.EnmityItem.Name), + Enmity = MemoryHandler.Instance.GetUInt32(address + MemoryHandler.Instance.Structures.EnmityItem.Enmity), }; if (enmityEntry.ID <= 0) { continue; diff --git a/Sharlayan/Reader.cs b/Sharlayan/Reader.cs index 8058d65..5575728 100644 --- a/Sharlayan/Reader.cs +++ b/Sharlayan/Reader.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // diff --git a/Sharlayan/Scanner.cs b/Sharlayan/Scanner.cs index 66e4500..114dac7 100644 --- a/Sharlayan/Scanner.cs +++ b/Sharlayan/Scanner.cs @@ -5,7 +5,7 @@ // -------------------------------------------------------------------------------------------------------------------- // -// Copyright(c) 2018 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (http://syndicated.life/) +// Copyright© 2007 - 2020 Ryan Wilson &lt;syndicated.life@gmail.com&gt; (https://syndicated.life/) // Licensed under the MIT license. See LICENSE.md in the solution root for full license information. // // @@ -19,6 +19,7 @@ namespace Sharlayan { using System.Diagnostics; using System.Linq; using System.Runtime.InteropServices; + using System.Threading.Tasks; using NLog; @@ -95,7 +96,8 @@ public void LoadOffsets(IEnumerable signatures, bool scanAllMemoryReg return true; }; - scanningFunc.BeginInvoke(delegate { }, scanningFunc); + + Task.Run(() => scanningFunc.Invoke()); } private void FindExtendedSignatures(IEnumerable signatures, bool scanAllMemoryRegions = false) { @@ -262,7 +264,7 @@ private byte[] SignatureToByte(string signature, byte wildcard) { 0x0C, 0x0D, 0x0E, - 0x0F + 0x0F, }; try { for (int x = 0, diff --git a/Sharlayan/Sharlayan.csproj b/Sharlayan/Sharlayan.csproj index f622765..057de67 100644 --- a/Sharlayan/Sharlayan.csproj +++ b/Sharlayan/Sharlayan.csproj @@ -30,11 +30,11 @@ ..\packages\Costura.Fody.3.1.0\lib\net46\Costura.dll - - ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll + + ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.5.6\lib\net45\NLog.dll + ..\packages\NLog.4.7.0\lib\net45\NLog.dll @@ -139,6 +139,7 @@ + @@ -176,7 +177,7 @@ -