diff --git a/.dependabot/config.yml.txt b/.dependabot/config.yml.txt
new file mode 100644
index 00000000..c89f1c02
--- /dev/null
+++ b/.dependabot/config.yml.txt
@@ -0,0 +1,6 @@
+version: 1
+update_configs:
+ - package_manager: "dotnet:nuget"
+ directory: "/"
+ update_schedule: "live"
+ target_branch: dev
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000..0a831315
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,182 @@
+# http://editorconfig.org
+
+# Top-most EditorConfig file
+root = true
+
+# Default settings:
+[*]
+charset = utf-8
+indent_style = space
+indent_size = 4
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+# C# files
+[*.cs]
+end_of_line = crlf
+
+# Documentation for Visual Studio .editorconfig configuration:
+# https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
+
+## Advanced
+dotnet_sort_system_directives_first = true
+
+## Code Style
+
+### General
+
+# 'this.' preferences
+dotnet_style_qualification_for_field = false:suggestion
+dotnet_style_qualification_for_property = false:suggestion
+dotnet_style_qualification_for_method = false:suggestion
+dotnet_style_qualification_for_event = false:suggestion
+
+# Predefined type preferences
+dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
+dotnet_style_predefined_type_for_member_access = true:suggestion
+
+# 'using' preferences
+csharp_using_directive_placement = outside_namespace:suggestion
+
+# Modifier preferences
+dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
+csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:suggestion
+dotnet_style_readonly_field = true:suggestion
+
+# parenthesis preferences
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
+
+# Expression-level preferences
+dotnet_style_object_initializer = true:suggestion
+dotnet_style_collection_initializer = true:suggestion
+dotnet_style_explicit_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_tuple_names = true:suggestion
+dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
+dotnet_style_prefer_auto_properties = true:none
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
+dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
+dotnet_style_prefer_conditional_expression_over_return = true:suggestion
+csharp_prefer_simple_default_expression = true:suggestion
+csharp_style_deconstructed_variable_declaration = true:suggestion
+csharp_style_pattern_local_over_anonymous_function = true:suggestion
+
+## Pattern matching
+csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
+csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
+
+# Variable preferences
+csharp_style_inlined_variable_declaration = true:suggestion
+
+# Null checking preferences
+csharp_style_throw_expression = true:suggestion
+csharp_style_conditional_delegate_call = true:suggestion
+dotnet_style_coalesce_expression = true:suggestion
+dotnet_style_null_propagation = true:suggestion
+
+# 'var' preferences'
+csharp_style_var_for_built_in_types = true:suggestion
+csharp_style_var_when_type_is_apparent = true:suggestion
+csharp_style_var_elsewhere = true:suggestion
+
+# Expression-bodied members
+csharp_style_expression_bodied_methods = true:suggestion
+csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
+csharp_style_expression_bodied_operators = true:suggestion
+csharp_style_expression_bodied_properties = true:suggestion
+csharp_style_expression_bodied_indexers = true:suggestion
+csharp_style_expression_bodied_accessors = true:suggestion
+
+### Formatting
+
+#### Indentation
+csharp_indent_block_contents = true
+csharp_indent_braces = false
+csharp_indent_case_contents = true
+csharp_indent_switch_labels = true
+csharp_indent_labels = flush_left
+
+#### New Lines
+# braces
+csharp_new_line_before_open_brace = all
+# keywords
+csharp_new_line_before_else = true
+csharp_new_line_before_catch = true
+csharp_new_line_before_finally = true
+# expressions
+csharp_new_line_before_members_in_object_initializers = true
+csharp_new_line_before_members_in_anonymous_types = true
+csharp_new_line_within_query_expression_clauses = true
+
+#### Spacing
+# method declarations
+csharp_space_between_method_declaration_name_and_open_parenthesis = false
+csharp_space_between_method_declaration_parameter_list_parentheses = false
+csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
+# method calls
+csharp_space_between_method_call_name_and_opening_parenthesis = false
+csharp_space_between_method_call_parameter_list_parentheses = false
+csharp_space_between_method_call_empty_parameter_list_parentheses = false
+# other spacing options
+csharp_space_after_keywords_in_control_flow_statements = true
+csharp_space_between_parentheses = false
+csharp_space_after_cast = false
+csharp_space_around_declaration_statements = do_not_ignore
+# brackets
+csharp_space_before_open_square_brackets = false
+csharp_space_between_empty_square_brackets = false
+csharp_space_between_square_brackets = false
+# delimiters
+csharp_space_after_colon_in_inheritance_clause = true
+csharp_space_after_comma = true
+csharp_space_after_dot = false
+csharp_space_after_semicolon_in_for_statement = true
+csharp_space_before_colon_in_inheritance_clause = true
+csharp_space_before_comma = false
+csharp_space_before_dot = false
+csharp_space_before_semicolon_in_for_statement = false
+# operators
+csharp_space_around_binary_operators = before_and_after
+
+#### Wrapping
+csharp_preserve_single_line_blocks = true
+csharp_preserve_single_line_statements = false
+
+### Naming
+# name all constant fields using PascalCase
+dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
+dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
+dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
+
+dotnet_naming_symbols.constant_fields.applicable_kinds = field
+dotnet_naming_symbols.constant_fields.required_modifiers = const
+
+dotnet_naming_style.pascal_case_style.capitalization = pascal_case
+
+# static fields should have s_ prefix
+dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
+dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
+dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
+
+dotnet_naming_symbols.static_fields.applicable_kinds = field
+dotnet_naming_symbols.static_fields.required_modifiers = static
+
+dotnet_naming_style.static_prefix_style.required_prefix = s_
+dotnet_naming_style.static_prefix_style.capitalization = camel_case
+
+# internal and private fields should be _camelCase
+dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
+dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
+dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
+
+dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
+dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
+
+dotnet_naming_style.camel_case_underscore_style.required_prefix = _
+dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
+
+# Markdown files
+[*.md]
+trim_trailing_whitespace = false
diff --git a/.gitignore b/.gitignore
index 66a7216e..0b82731d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
-.vs
-bin
-obj
-*.user
+[Bb]in
+[Dd]ebug/
+[Pp]ublish/
+[Rr]elease*/
+obj/
+.vs/
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 00000000..67790361
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2020 r00telement
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index 415cd8d4..754383ae 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,68 @@
-# SmartHunter - Overlay
+# SmartHunter - Monster Hunter: World Overlay
-![SmartHunter](https://staticdelivery.nexusmods.com/mods/2531/images/793/793-1557865677-1599196365.png)
+A complete overlay for Monster Hunter: World on PC with Iceborne support. Originally distributed on [Nexus Mods](https://www.nexusmods.com/monsterhunterworld/mods/793). Features include:
-A complete overlay for Monster Hunter: World on PC. Distributed on [Nexus Mods](https://www.nexusmods.com/monsterhunterworld/mods/793). See the mod page for up-to-date details.
+- Monster widget - name, health, parts, status effect buildup, and crown.
+- Team widget - name and damage meters.
+- Player widget - buff, debuff, and equipment/mantle timers.
+- Open source - freely learn from and contribute to the project.
+- Skinnable - create and distribute your own rich styles and animations with XAML.
+- Easy localization - create and distribute your own translations for our international friends.
-## Contributors
+## Requirements
-- Pull requests are welcome. Please submit to the dev branch.
-- Give your pull request sufficient context so I don't have to guess what it does.
-- Keep your code in line with the project's style conventions.
-- Bug fixes: if you're unsure, open an issue with your intent to fix and I will verify the bug.
-- New data: always looking to extend data for supported features if you can find it in memory. E.g. new buffs, status effects, etc.
-- New features: open an issue with your intent so we can scope it, because I'm not likely to accept a random pull request if it's a bit... "out there".
+- [.NET Framework runtime](https://dotnet.microsoft.com/download/dotnet-framework) (4.6.1 is required 4.8 is recommended).
+- Monster Hunter: World running in borderless window or windowed mode.
+
+## How to install
+
+- Download the latest release from [here](https://github.com/sir-wilhelm/SmartHunter/releases) (Assets > SmartHunter.zip).
+- Extract the contents of the zip.
+- Right-click SmartHunter.exe > Properties > check Unblock > click OK.
+
+## How to use
+
+- Launch `SmartHunter.exe`.
+- Hold `LeftAlt` to view widget locations.
+- Click and drag widgets to move them.
+- Use the mouse wheel scroll over widgets to rescale them.
+- Other modifiers:
+ - Press and hold `F1` to hide all widgets.
+ - Press `RightCtrl` to toggle widget visibility.
+
+### How to update
+
+- SmartHunter automatically checks the latest release, and if a new version is released it will auto download, extract, and clean up the old files.
+- To disable this feature set `AutomaticallyCheckAndDownloadUpdates` to `false` in `Config.json`.
+- You can always grab the latest version from the [releases](https://github.com/sir-wilhelm/SmartHunter/releases) page.
+
+### How to use custom data
+
+- To better support auto updates, the .json data files are recreated by default.
+- To change/use custom data files set `UseCustomData` to `true` in `Config.json`.
+- Note: Memory.json is not
+
+### How to create and use new localizations
+
+- Create a copy of `en-US.json` and rename it for the locale you are translating to.
+- Translate the strings in the second part of each key value pair. Do not change the keys.
+- Ensure the new file is in the SmartHunter folder.
+- Open `Config.json` and point `LocalizationFileName` to the new file.
+
+### How to create and use new skins
+
+- Create a copy of `Default.xaml` and rename it appropriately.
+- Make changes to the new file.
+- Ensure the new file is in the SmartHunter folder.
+- Open `Config.json` and point `SkinFileName` to the new file.
+
+# FAQ
+
+Can I configure what is visible?
+Yes - see `Config.json` documentation [here](/doc/Config.json.md).
+
+Why don't monster parts and status effects update properly in multiplayer sessions?
+This data only updates properly for the quest host. This is just the way the game works and it can't be worked around.
+
+Where is the config file?
+`Config.json` is generated when SmartHunter is first launched.
diff --git a/SmartHunter.sln b/SmartHunter.sln
index 9b1dc926..0a4c076c 100644
--- a/SmartHunter.sln
+++ b/SmartHunter.sln
@@ -1,26 +1,39 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28307.106
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SmartHunter", "SmartHunter\SmartHunter.csproj", "{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SmartHunter", "SmartHunter\SmartHunter.csproj", "{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2A20B067-F085-4EB5-8667-7E708ACE5755}"
+ ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
+ .gitignore = .gitignore
+ LICENSE.txt = LICENSE.txt
+ README.md = README.md
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{ABF62AAC-2B01-43AB-9233-F2C3F4F746B3}"
+ ProjectSection(SolutionItems) = preProject
+ build\build.cmd = build\build.cmd
+ build\PackageRelease.ps1 = build\PackageRelease.ps1
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "doc", "doc", "{AC741825-8381-4958-A594-773ED0E868FF}"
+ ProjectSection(SolutionItems) = preProject
+ doc\Config.json.md = doc\Config.json.md
+ EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|x64.ActiveCfg = Debug|x64
- {F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Debug|x64.Build.0 = Debug|x64
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|Any CPU.Build.0 = Release|Any CPU
- {F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|x64.ActiveCfg = Release|x64
- {F5F99CEF-1C16-48E6-A88B-1A66D3B53998}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/SmartHunter/App.config b/SmartHunter/App.config
index 8fc05512..bae5d6d8 100644
--- a/SmartHunter/App.config
+++ b/SmartHunter/App.config
@@ -1,6 +1,6 @@
-
+
diff --git a/SmartHunter/App.xaml.cs b/SmartHunter/App.xaml.cs
index ab0b4746..55d1382c 100644
--- a/SmartHunter/App.xaml.cs
+++ b/SmartHunter/App.xaml.cs
@@ -1,13 +1,16 @@
-using SmartHunter.Core;
-using SmartHunter.Game;
-using SmartHunter.Game.Data.ViewModels;
-using SmartHunter.Game.Helpers;
-using SmartHunter.Ui.Windows;
using System;
+using System.Diagnostics;
using System.IO;
using System.Reflection;
+using System.Text;
using System.Windows;
using System.Xaml;
+using SmartHunter.Core;
+using SmartHunter.Game;
+using SmartHunter.Game.Data.ViewModels;
+using SmartHunter.Game.Helpers;
+using SmartHunter.Ui.Windows;
+using XamlReader = System.Windows.Markup.XamlReader;
namespace SmartHunter
{
@@ -20,15 +23,12 @@ public partial class App : Application
protected override void OnStartup(StartupEventArgs e)
{
- //var culture = new System.Globalization.CultureInfo("es-ES");
- //System.Globalization.CultureInfo.CurrentCulture = culture;
- //System.Globalization.CultureInfo.CurrentUICulture = culture;
-
// Initialize the console view model first thing so we can see any problems that may occur
var consoleViewModel = ConsoleViewModel.Instance;
- Log.WriteLine($"Started {Assembly.GetExecutingAssembly().GetName().Version}");
- //Log.WriteLine($"Culture: {System.Globalization.CultureInfo.CurrentCulture.Name}");
+ var assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+ var fileVersionInfoVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
+ Log.WriteLine($"Started: Assembly Version: {assemblyVersion} | File Version: {fileVersionInfoVersion}");
SetPerMonitorDpiAwareness();
@@ -39,7 +39,7 @@ protected override void OnStartup(StartupEventArgs e)
m_SkinFile.Changed += (s1, e1) => { LoadSkin(); };
LoadSkin();
- m_Overlay = new MhwOverlay(new ConsoleWindow(), new TeamWidgetWindow(), new MonsterWidgetWindow(), new PlayerWidgetWindow());
+ m_Overlay = new MhwOverlay(new ConsoleWindow(), new TeamWidgetWindow(), new MonsterWidgetWindow(), new PlayerWidgetWindow(), new DebugWidgetWindow());
base.OnStartup(e);
}
@@ -78,16 +78,16 @@ void LoadSkin()
{
ResourceDictionary resourceDictionary = null;
- using (var streamReader = new StreamReader(m_SkinFile.FullPathFileName, System.Text.Encoding.UTF8))
+ using (var streamReader = new StreamReader(m_SkinFile.FullPathFileName, Encoding.UTF8))
{
var xmlReaderSettings = new XamlXmlReaderSettings
{
LocalAssembly = Assembly.GetExecutingAssembly()
};
- using (var xamlReader = new XamlXmlReader(streamReader.BaseStream, System.Windows.Markup.XamlReader.GetWpfSchemaContext(), xmlReaderSettings))
+ using (var xamlReader = new XamlXmlReader(streamReader.BaseStream, XamlReader.GetWpfSchemaContext(), xmlReaderSettings))
{
- resourceDictionary = System.Windows.Markup.XamlReader.Load(xamlReader) as ResourceDictionary;
+ resourceDictionary = XamlReader.Load(xamlReader) as ResourceDictionary;
}
}
diff --git a/SmartHunter/Core/AddressRange.cs b/SmartHunter/Core/AddressRange.cs
index 13cc52ba..0d9d5f1f 100644
--- a/SmartHunter/Core/AddressRange.cs
+++ b/SmartHunter/Core/AddressRange.cs
@@ -1,16 +1,16 @@
-using System;
-
namespace SmartHunter.Core
{
public class AddressRange
{
public ulong Start { get; private set; }
public ulong End { get; private set; }
+ public ulong Size { get; private set; }
- public AddressRange(ulong start, ulong end)
+ public AddressRange(ulong start, ulong size)
{
Start = start;
- End = end;
+ End = start + size;
+ Size = size;
}
}
}
diff --git a/SmartHunter/Core/BytePattern.cs b/SmartHunter/Core/BytePattern.cs
index 18b66965..1574d3bb 100644
--- a/SmartHunter/Core/BytePattern.cs
+++ b/SmartHunter/Core/BytePattern.cs
@@ -1,7 +1,7 @@
-using SmartHunter.Game.Config;
using System;
using System.Collections.Generic;
using System.Globalization;
+using SmartHunter.Game.Config;
namespace SmartHunter.Core
{
@@ -10,24 +10,12 @@ public class BytePattern
public BytePatternConfig Config { get; }
public byte?[] Bytes { get; private set; }
public List MatchedAddresses { get; private set; }
- public AddressRange AddressRange { get; private set; }
public BytePattern(BytePatternConfig config)
{
Config = config;
- Bytes = BytesFromString(config.String);
+ Bytes = BytesFromString(config.PatternString);
MatchedAddresses = new List();
-
- if (ulong.TryParse(config.AddressRangeStart, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out ulong start)
- && ulong.TryParse(config.AddressRangeEnd, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out ulong end))
- {
- AddressRange = new AddressRange(start, end);
- }
- else
- {
- AddressRange = new AddressRange(0, 0);
- Log.WriteLine($"Failed to parse address range ({config.AddressRangeStart} - {config.AddressRangeEnd}) for pattern: {config.String}");
- }
}
public static byte?[] BytesFromString(string byteString)
@@ -52,4 +40,4 @@ public BytePattern(BytePatternConfig config)
return byteList.ToArray();
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/Command.cs b/SmartHunter/Core/Command.cs
new file mode 100644
index 00000000..18a540cc
--- /dev/null
+++ b/SmartHunter/Core/Command.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Windows.Input;
+
+namespace SmartHunter.Core
+{
+ #pragma warning disable 67
+ public class Command : ICommand
+ {
+ private readonly Action _action;
+ private readonly Func _canExecuteFunction;
+
+ public Command(Action action, Func canExecute = null)
+ {
+ _action = action;
+ _canExecuteFunction = canExecute;
+ }
+
+ public bool CanExecute(object parameter)
+ {
+ if (_canExecuteFunction != null)
+ {
+ return _canExecuteFunction(this, parameter);
+ }
+ return true;
+ }
+
+ public void Execute(object parameter)
+ {
+ _action(parameter);
+ }
+
+ public event EventHandler CanExecuteChanged;
+ }
+}
diff --git a/SmartHunter/Core/Config/ConfigContainer.cs b/SmartHunter/Core/Config/ConfigContainer.cs
index 4ceba0b9..333a71ed 100644
--- a/SmartHunter/Core/Config/ConfigContainer.cs
+++ b/SmartHunter/Core/Config/ConfigContainer.cs
@@ -1,6 +1,11 @@
-using Newtonsoft.Json;
using System;
+using System.ComponentModel;
using System.IO;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Converters;
+using SmartHunter.Config;
+using SmartHunter.Game.Helpers;
+using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs;
namespace SmartHunter.Core.Config
{
@@ -12,92 +17,95 @@ public class ConfigContainer : FileContainer
public ConfigContainer(string fileName) : base(fileName)
{
- bool isDesignInstance = System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime;
+ var isDesignInstance = LicenseManager.UsageMode == LicenseUsageMode.Designtime;
if (!isDesignInstance)
{
- Load(true);
+ Load();
}
}
- public void HandleDeserializationError(object sender, Newtonsoft.Json.Serialization.ErrorEventArgs args)
+ public void HandleDeserializationError(object sender, ErrorEventArgs args)
{
Log.WriteException(args.ErrorContext.Error);
args.ErrorContext.Handled = true;
}
-
- override protected void OnChanged()
- {
- Load();
- }
- void Load(bool saveOnLoad = false)
+ protected override void OnChanged() => Load();
+
+ private void Load()
{
- if (File.Exists(FullPathFileName))
+ if (File.Exists(FullPathFileName) && !FileName.Equals("Memory.json"))
{
try
{
string contents = null;
- using (FileStream stream = File.Open(FullPathFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ using (var stream = File.Open(FullPathFileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+ using (var reader = new StreamReader(stream, System.Text.Encoding.UTF8))
{
- using (StreamReader reader = new StreamReader(stream, System.Text.Encoding.UTF8))
- {
- contents = reader.ReadToEnd();
- }
+ contents = reader.ReadToEnd();
}
- var settings = new JsonSerializerSettings();
- settings.Formatting = Formatting.Indented;
- settings.ContractResolver = new ContractResolver();
- settings.Error = HandleDeserializationError;
+ var customLanguage = typeof(T).Equals(typeof(LocalizationConfig)) && !FileName.Equals("en-US.json");
+ var fileContentsEqualsAutoGen = contents == GetAutoGenerateedJson();
+ if (!fileContentsEqualsAutoGen && FileName != "Config.json" && !customLanguage)
+ {
+ Log.WriteWarning($"Warning: {FileName} differs from autogenerated version.");
+ }
+
+ var settings = new JsonSerializerSettings
+ {
+ Formatting = Formatting.Indented,
+ ContractResolver = new ContractResolver(),
+ Error = HandleDeserializationError,
+ };
// Solves dictionary/lists being added to instead of overwritten but causes problems elsewhere
// https://stackoverflow.com/questions/29113063/json-net-why-does-it-add-to-list-instead-of-overwriting
// https://stackoverflow.com/questions/27848547/explanation-for-objectcreationhandling-using-newtonsoft-json
// This has been moved to ContractResolver to target Dictionaries specifically
// settings.ObjectCreationHandling = ObjectCreationHandling.Replace;
- settings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
+ settings.Converters.Add(new StringEnumConverter());
settings.Converters.Add(new StringFloatConverter());
- JsonConvert.PopulateObject(contents, Values, settings);
+ if (FileName.Equals("Config.json") || fileContentsEqualsAutoGen || ConfigHelper.Main.Values.UseCustomData || customLanguage)
+ {
+ JsonConvert.PopulateObject(contents, Values, settings);
+ Log.WriteLine($"{FileName} loaded");
+ }
+ else
+ {
+ Log.WriteLine($"{FileName} will be renamed to custom_{FileName} and recreated...");
+ Log.WriteLine("This can be disabled by setting [\"UseCustomData\": true,] in Config.json.");
- Log.WriteLine($"{FileName} loaded");
+ File.Delete($"custom_{FileName}");
+ File.Move(FileName, $"custom_{FileName}");
+ Save();
+ }
}
catch (Exception ex)
{
Log.WriteException(ex);
}
}
-
- if (saveOnLoad)
+ else
{
Save();
}
- if (Loaded != null)
- {
- Loaded(this, null);
- }
+ Loaded?.Invoke(this, null);
}
- public void Save()
+ public void Save(bool printToLog = true)
{
TryPauseWatching();
try
{
- var settings = new JsonSerializerSettings();
- settings.Formatting = Formatting.Indented;
- settings.NullValueHandling = NullValueHandling.Ignore;
- settings.ContractResolver = new ContractResolver();
-
- settings.Converters.Add(new Newtonsoft.Json.Converters.StringEnumConverter());
- settings.Converters.Add(new StringFloatConverter());
-
- var jsonString = JsonConvert.SerializeObject(Values, settings);
-
- File.WriteAllText(FullPathFileName, jsonString);
-
- Log.WriteLine($"{FileName} saved");
+ File.WriteAllText(FullPathFileName, GetAutoGenerateedJson());
+ if (printToLog)
+ {
+ Log.WriteLine($"{FileName} saved");
+ }
}
catch (Exception ex)
{
@@ -106,5 +114,20 @@ public void Save()
TryUnpauseWatching();
}
+
+ private string GetAutoGenerateedJson()
+ {
+ var settings = new JsonSerializerSettings
+ {
+ Formatting = Formatting.Indented,
+ NullValueHandling = NullValueHandling.Ignore,
+ ContractResolver = new ContractResolver()
+ };
+
+ settings.Converters.Add(new StringEnumConverter());
+ settings.Converters.Add(new StringFloatConverter());
+
+ return JsonConvert.SerializeObject(Values, settings);
+ }
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/Config/ContractResolver.cs b/SmartHunter/Core/Config/ContractResolver.cs
index 6358a3fe..640c60f3 100644
--- a/SmartHunter/Core/Config/ContractResolver.cs
+++ b/SmartHunter/Core/Config/ContractResolver.cs
@@ -1,8 +1,8 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Serialization;
-using System;
+using System;
using System.Collections.Generic;
using System.Reflection;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;
namespace SmartHunter.Core.Config
{
diff --git a/SmartHunter/Core/Config/StringFloatConverter.cs b/SmartHunter/Core/Config/StringFloatConverter.cs
index 52391dca..38332ad9 100644
--- a/SmartHunter/Core/Config/StringFloatConverter.cs
+++ b/SmartHunter/Core/Config/StringFloatConverter.cs
@@ -1,6 +1,6 @@
-using Newtonsoft.Json;
-using System;
+using System;
using System.Globalization;
+using Newtonsoft.Json;
namespace SmartHunter.Core.Config
{
diff --git a/SmartHunter/Core/Config/WidgetConfig.cs b/SmartHunter/Core/Config/WidgetConfig.cs
index a7f1db8a..3725748e 100644
--- a/SmartHunter/Core/Config/WidgetConfig.cs
+++ b/SmartHunter/Core/Config/WidgetConfig.cs
@@ -1,4 +1,4 @@
-namespace SmartHunter.Core.Config
+namespace SmartHunter.Core.Config
{
public class WidgetConfig
{
diff --git a/SmartHunter/Core/Data/Bindable.cs b/SmartHunter/Core/Data/Bindable.cs
index 0a33a724..dabb299f 100644
--- a/SmartHunter/Core/Data/Bindable.cs
+++ b/SmartHunter/Core/Data/Bindable.cs
@@ -16,7 +16,7 @@ public void NotifyPropertyChanged(string propertyName)
protected bool SetProperty(ref T storage, T value, [CallerMemberName] string propertyName = null)
{
- if (object.Equals(storage, value))
+ if (Equals(storage, value))
{
return false;
}
diff --git a/SmartHunter/Core/Data/Progress.cs b/SmartHunter/Core/Data/Progress.cs
index bf2b27b7..0bb53104 100644
--- a/SmartHunter/Core/Data/Progress.cs
+++ b/SmartHunter/Core/Data/Progress.cs
@@ -1,56 +1,74 @@
-using System;
+using System;
+using System.Drawing;
namespace SmartHunter.Core.Data
{
public class Progress : Bindable, IComparable
{
- float m_Max;
+ private float _max;
+ private float _current;
+ private readonly bool _shouldCapCurrent;
+
+ public Progress(float max, float current, bool shouldCapCurrent = false)
+ {
+ _shouldCapCurrent = shouldCapCurrent;
+
+ Max = max;
+ Current = current;
+ }
+
public float Max
{
- get { return m_Max; }
- set
- {
- SetProperty(ref m_Max, value);
- }
+ get => _max;
+ set => SetProperty(ref _max, value);
}
- float m_Current;
public float Current
{
- get { return m_Current; }
+ get => _current;
set
{
- if (ShouldCapCurrent)
- {
- value = Cap(value, m_Max);
+ if (_shouldCapCurrent)
+ {
+ value = Cap(value, _max);
}
- if (SetProperty(ref m_Current, value))
+ if (SetProperty(ref _current, value))
{
- if (m_Current > m_Max)
+ if (_current > _max)
{
- Max = m_Current;
+ Max = _current;
}
NotifyPropertyChanged(nameof(Fraction));
NotifyPropertyChanged(nameof(Angle));
+ NotifyPropertyChanged(nameof(Color));
}
}
}
- public float Fraction { get { return m_Current / m_Max; } }
- public float Angle { get { return Fraction * 359.999f; } }
-
- public bool ShouldCapCurrent { get; set; }
-
- public Progress(float max, float current, bool shouldCapCurrent = false)
+ public string Color
{
- ShouldCapCurrent = shouldCapCurrent;
-
- Max = max;
- Current = current;
+ get
+ {
+ Color c;
+ if (Fraction > 0.5f)
+ {
+ var red = (int)(255f * 2 * (1 - Fraction));
+ c = System.Drawing.Color.FromArgb(255, red, 255, 0);
+ }
+ else
+ {
+ var green = (int)(255f * 2 * Fraction);
+ c = System.Drawing.Color.FromArgb(255, 255, green, 0);
+ }
+ return "#" + c.R.ToString("X2") + c.G.ToString("X2") + "00";
+ }
}
+ public float Fraction => _current / _max;
+ public float Angle => Fraction * 359.999f;
+
// We only really want the default compare to compare nulls.
// We can then compare by Current in a separate pass for better control.
public int CompareTo(object obj)
@@ -63,7 +81,7 @@ public int CompareTo(object obj)
return 0;
}
- public float Cap(float value, float max)
+ private float Cap(float value, float max)
{
if (value < 0)
{
diff --git a/SmartHunter/Core/Data/Widget.cs b/SmartHunter/Core/Data/Widget.cs
index f0103577..6b450a4a 100644
--- a/SmartHunter/Core/Data/Widget.cs
+++ b/SmartHunter/Core/Data/Widget.cs
@@ -1,57 +1,63 @@
-using SmartHunter.Core.Config;
+using SmartHunter.Core.Config;
namespace SmartHunter.Core.Data
{
public class Widget : Bindable
{
- WidgetConfig m_WidgetConfig;
+ readonly WidgetConfig _widgetConfig;
+ private float _x;
+ private float _y;
+ private float _scale = 1;
+ private bool _isVisible = true;
+
+ public Widget(WidgetConfig widgetConfig)
+ {
+ _widgetConfig = widgetConfig;
+ UpdateFromConfig();
+ }
- float m_X;
public float X
{
- get { return m_X; }
+ get => _x;
set
{
- if (SetProperty(ref m_X, value) && m_X != m_WidgetConfig.X)
+ if (SetProperty(ref _x, value) && _x != _widgetConfig.X)
{
UpdateConfig();
}
}
}
- float m_Y;
public float Y
{
- get { return m_Y; }
+ get => _y;
set
{
- if (SetProperty(ref m_Y, value) && m_Y != m_WidgetConfig.Y)
+ if (SetProperty(ref _y, value) && _y != _widgetConfig.Y)
{
UpdateConfig();
}
}
}
- float m_Scale = 1;
public float Scale
{
- get { return m_Scale; }
+ get => _scale;
set
{
- if (SetProperty(ref m_Scale, value) && m_Scale != m_WidgetConfig.Scale)
+ if (SetProperty(ref _scale, value) && _scale != _widgetConfig.Scale)
{
UpdateConfig();
}
}
}
- bool m_IsVisible = true;
public bool IsVisible
{
- get { return m_IsVisible; }
+ get => _isVisible;
set
{
- if (SetProperty(ref m_IsVisible, value) && m_IsVisible != m_WidgetConfig.IsVisible)
+ if (SetProperty(ref _isVisible, value) && _isVisible != _widgetConfig.IsVisible)
{
UpdateConfig();
}
@@ -60,28 +66,22 @@ public bool IsVisible
public bool CanSaveConfig { get; set; }
- public Widget(WidgetConfig widgetConfig)
+ public virtual void UpdateFromConfig()
{
- m_WidgetConfig = widgetConfig;
- UpdateFromConfig();
+ X = _widgetConfig.X;
+ Y = _widgetConfig.Y;
+ Scale = _widgetConfig.Scale;
+ IsVisible = _widgetConfig.IsVisible;
}
- void UpdateConfig()
+ private void UpdateConfig()
{
- m_WidgetConfig.X = m_X;
- m_WidgetConfig.Y = m_Y;
- m_WidgetConfig.Scale = m_Scale;
- m_WidgetConfig.IsVisible = m_IsVisible;
+ _widgetConfig.X = _x;
+ _widgetConfig.Y = _y;
+ _widgetConfig.Scale = _scale;
+ _widgetConfig.IsVisible = _isVisible;
CanSaveConfig = true;
}
-
- public virtual void UpdateFromConfig()
- {
- X = m_WidgetConfig.X;
- Y = m_WidgetConfig.Y;
- Scale = m_WidgetConfig.Scale;
- IsVisible = m_WidgetConfig.IsVisible;
- }
}
}
diff --git a/SmartHunter/Core/FileContainer.cs b/SmartHunter/Core/FileContainer.cs
index bd3fa986..81e097a9 100644
--- a/SmartHunter/Core/FileContainer.cs
+++ b/SmartHunter/Core/FileContainer.cs
@@ -1,5 +1,7 @@
using System;
+using System.ComponentModel;
using System.IO;
+using System.Reflection;
using System.Threading.Tasks;
using System.Windows;
@@ -33,7 +35,7 @@ public FileContainer(string fileName)
{
FileName = fileName;
- bool isDesignInstance = System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime;
+ bool isDesignInstance = LicenseManager.UsageMode == LicenseUsageMode.Designtime;
if (!isDesignInstance)
{
WatchFile(true);
@@ -127,7 +129,7 @@ virtual protected void OnChanged() { }
public static string GetFullPath()
{
- return Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase).Replace("file:\\", "") + "\\";
+ return Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase).Replace("file:\\", "") + "\\";
}
public static string GetFullPathFileName(string fileName)
diff --git a/SmartHunter/Core/Helpers/MemoryHelper.cs b/SmartHunter/Core/Helpers/MemoryHelper.cs
index e5cdee63..49be1e16 100644
--- a/SmartHunter/Core/Helpers/MemoryHelper.cs
+++ b/SmartHunter/Core/Helpers/MemoryHelper.cs
@@ -1,9 +1,10 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
-using System.Windows;
+using System.Text;
+using SmartHunter.Game.Helpers;
namespace SmartHunter.Core.Helpers
{
@@ -23,7 +24,7 @@ static WindowsApi.RegionPageProtection[] ProtectionExclusions
}
}
- static bool CheckProtection(BytePattern pattern, uint flags)
+ static bool CheckProtection(uint flags)
{
var protectionFlags = (WindowsApi.RegionPageProtection)flags;
@@ -35,15 +36,7 @@ static bool CheckProtection(BytePattern pattern, uint flags)
}
}
- foreach (var protectionOrInclusive in pattern.Config.PageProtections)
- {
- if (protectionFlags.HasFlag(protectionOrInclusive))
- {
- return true;
- }
- }
-
- return false;
+ return true;
}
public static List FindPatternAddresses(Process process, AddressRange addressRange, BytePattern pattern, bool stopAfterFirst)
@@ -55,60 +48,52 @@ public static List FindPatternAddresses(Process process, AddressRange add
while (currentAddress < addressRange.End && !process.HasExited)
{
WindowsApi.MEMORY_BASIC_INFORMATION64 memoryRegion;
- var structByteCount = WindowsApi.VirtualQueryEx(process.Handle, (IntPtr)currentAddress, out memoryRegion, (uint)Marshal.SizeOf(typeof(WindowsApi.MEMORY_BASIC_INFORMATION64)));
- if (structByteCount > 0
+ if (WindowsApi.VirtualQueryEx(process.Handle, (IntPtr)currentAddress, out memoryRegion, (uint)Marshal.SizeOf(typeof(WindowsApi.MEMORY_BASIC_INFORMATION64))) > 0
&& memoryRegion.RegionSize > 0
&& memoryRegion.State == (uint)WindowsApi.RegionPageState.MEM_COMMIT
- && CheckProtection(pattern, memoryRegion.Protect))
+ && CheckProtection(memoryRegion.Protect))
{
var regionStartAddress = memoryRegion.BaseAddress;
if (addressRange.Start > regionStartAddress)
{
regionStartAddress = addressRange.Start;
}
-
var regionEndAddress = memoryRegion.BaseAddress + memoryRegion.RegionSize;
if (addressRange.End < regionEndAddress)
{
regionEndAddress = addressRange.End;
}
+ if (regionEndAddress <= regionStartAddress)
+ {
+ regionEndAddress = regionStartAddress + addressRange.Size;
+ }
+ ulong regionBytesToRead = regionEndAddress - regionStartAddress;
+ byte[] regionBytes = new byte[regionBytesToRead];
if (process.HasExited)
{
break;
}
- ulong regionBytesToRead = regionEndAddress - regionStartAddress;
- byte[] regionBytes = new byte[regionBytesToRead];
-
int lpNumberOfBytesRead = 0;
WindowsApi.ReadProcessMemory(process.Handle, (IntPtr)regionStartAddress, regionBytes, regionBytes.Length, ref lpNumberOfBytesRead);
var matchIndices = FindPatternMatchIndices(regionBytes, pattern, stopAfterFirst);
-
- if (matchIndices.Any() && stopAfterFirst)
+ foreach (var matchIndex in matchIndices)
{
- var matchAddress = regionStartAddress + (ulong)matchIndices.First();
+ var matchAddress = regionStartAddress + (ulong)matchIndex;
matchAddresses.Add(matchAddress);
- break;
+ pattern.Config.LastResultAddress = matchAddress.ToString("X8");
+
+ Log.WriteLine($"Found '{pattern.Config.Name}' at address 0x{matchAddress.ToString("X8")}"); //TODO: Rimetti
}
- else
+ if (matchAddresses.Any() && stopAfterFirst)
{
- foreach (var matchIndex in matchIndices)
- {
- var matchAddress = regionStartAddress + (ulong)matchIndex;
- matchAddresses.Add(matchAddress);
- }
+ break;
}
}
- if (structByteCount == 0)
- {
- Log.WriteLine("Page query returned 0 bytes");
- break;
- }
-
currentAddress = memoryRegion.BaseAddress + memoryRegion.RegionSize;
}
@@ -224,7 +209,7 @@ public static List DivideAddressRange(AddressRange addressRange, i
endAddress = addressRange.End;
}
- addressRangeDivisions.Add(new AddressRange(startAddress, endAddress));
+ addressRangeDivisions.Add(new AddressRange(startAddress, endAddress - startAddress));
start = end;
end += (ulong)Math.Floor(rangePerDivision);
@@ -266,7 +251,7 @@ public static string ReadString(Process process, ulong address, uint length)
if (nullTerminatorIndex >= 0)
{
Array.Resize(ref bytes, nullTerminatorIndex);
- return System.Text.Encoding.UTF8.GetString(bytes);
+ return Encoding.UTF8.GetString(bytes);
}
return null;
@@ -320,4 +305,4 @@ public static uint ReadStaticOffset(Process process, ulong address)
return Read(process, address + opcodeLength);
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/Helpers/Updater.cs b/SmartHunter/Core/Helpers/Updater.cs
new file mode 100644
index 00000000..2be28604
--- /dev/null
+++ b/SmartHunter/Core/Helpers/Updater.cs
@@ -0,0 +1,76 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace SmartHunter.Core.Helpers
+{
+ public class Updater
+ {
+ private readonly string _apiEndpoint = "https://api.github.com/repos/sir-wilhelm/SmartHunter/releases/latest";
+ private readonly string _userAgent = "Mozilla/4.0 (Compatible; Windows NT 5.1; MSIE 6.0) (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
+
+ public bool CheckForUpdates()
+ {
+ try
+ {
+ var latestRelease = GetLatestRelease();
+ var needsUpdates = new Version(latestRelease.tag_name) > Assembly.GetExecutingAssembly().GetName().Version;
+ if (!needsUpdates)
+ {
+ Log.WriteLine("No updates found.");
+ }
+ return needsUpdates;
+ }
+ catch (Exception e)
+ {
+ Log.WriteLine($"An error has occured while searching for updates:{Environment.NewLine}{e}");
+ Log.WriteLine("Resuming the normal flow of the application.");
+ return false;
+ }
+ }
+
+ private LatestRelease GetLatestRelease()
+ {
+ var request = WebRequest.CreateHttp(_apiEndpoint);
+ request.ContentType = "application/json";
+ request.UserAgent = _userAgent;
+ using var stream = request.GetResponse().GetResponseStream();
+ using var reader = new StreamReader(stream);
+ var latestReleaseAsJson = reader.ReadToEnd();
+ return JsonConvert.DeserializeObject(latestReleaseAsJson);
+ }
+
+ public bool DownloadUpdates()
+ {
+ try
+ {
+ var latestRelease = GetLatestRelease();
+
+ using var client = new WebClient();
+ var releaseZip = latestRelease.assets[0];
+ Log.WriteLine("Deleting older update.");
+ File.Delete(releaseZip.name);
+ client.DownloadFile(releaseZip.browser_download_url, releaseZip.name);
+ return true;
+ }
+ catch (Exception e)
+ {
+ Log.WriteLine($"An error has occured while downloading update:{Environment.NewLine}{e}");
+ return false;
+ }
+ }
+
+ internal class LatestRelease
+ {
+ public string tag_name { get; set; }
+ public Asset[] assets { get; set; }
+ }
+ internal class Asset
+ {
+ public string name { get; set; }
+ public string browser_download_url { get; set; }
+ }
+ }
+}
diff --git a/SmartHunter/Core/KeyboardInput.cs b/SmartHunter/Core/KeyboardInput.cs
index ff952711..0fd6810d 100644
--- a/SmartHunter/Core/KeyboardInput.cs
+++ b/SmartHunter/Core/KeyboardInput.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Runtime.InteropServices;
using System.Windows.Input;
@@ -72,13 +72,10 @@ IntPtr KeyboardHook(int nCode, IntPtr wParam, IntPtr lParam)
var key = KeyFromVirtualCode(keyboardData.VkCode);
bool isDown = keyboardMessage == WindowsApi.KeyboardMessage.WM_KEYDOWN || keyboardMessage == WindowsApi.KeyboardMessage.WM_SYSKEYDOWN;
- if (InputReceived != null)
- {
- InputReceived(this, new KeyboardInputEventArgs(key, isDown));
- }
+ InputReceived?.Invoke(this, new KeyboardInputEventArgs(key, isDown));
}
return WindowsApi.CallNextHookEx(IntPtr.Zero, nCode, wParam, lParam);
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/Log.cs b/SmartHunter/Core/Log.cs
index 50e6c3aa..c6a1a3fc 100644
--- a/SmartHunter/Core/Log.cs
+++ b/SmartHunter/Core/Log.cs
@@ -1,4 +1,5 @@
-using System;
+using System;
+using System.ComponentModel;
using System.IO;
using System.Security.AccessControl;
@@ -12,35 +13,29 @@ public static class Log
public static void WriteLine(string message)
{
- string line = String.Format("[{0:yyyy-MM-dd HH:mm:ss}] {1}", DateTimeOffset.Now.ToUniversalTime(), message);
+ var line = string.Format("[{0:yyyy-MM-dd HH:mm:ss}] {1}", DateTimeOffset.Now.ToUniversalTime(), message);
Console.WriteLine(line);
- if (LineReceived != null)
- {
- LineReceived(null, new GenericEventArgs(line));
- }
+ LineReceived?.Invoke(null, new GenericEventArgs(line));
- bool isDesignInstance = System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime;
+ bool isDesignInstance = LicenseManager.UsageMode == LicenseUsageMode.Designtime;
if (!isDesignInstance)
{
try
{
- using (FileStream fileStream = new FileStream(s_FileName, FileMode.OpenOrCreate, FileSystemRights.AppendData, FileShare.Write, 4096, FileOptions.None))
- {
- using (StreamWriter streamWriter = new StreamWriter(fileStream))
- {
- streamWriter.AutoFlush = true;
- streamWriter.WriteLine(line);
- }
- }
+ using var fileStream = new FileStream(s_FileName, FileMode.OpenOrCreate, FileSystemRights.AppendData, FileShare.Write, 4096, FileOptions.None);
+ using var streamWriter = new StreamWriter(fileStream);
+ streamWriter.AutoFlush = true;
+ streamWriter.WriteLine(line);
}
catch (Exception) { }
}
}
- public static void WriteException(Exception exception)
- {
- WriteLine($"{exception.GetType().Name}: {exception.Message}\r\n{exception.StackTrace}");
- }
+ public static void WriteException(Exception exception) => WriteLine($"{exception.GetType().Name}: {exception.Message}\r\n{exception.StackTrace}");
+
+ public static void WriteWarning(string warning) =>
+ // prep for adding support for colored messages to ConsoleWindow.
+ WriteLine(warning);
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/MemoryUpdater.cs b/SmartHunter/Core/MemoryUpdater.cs
index ca1c9bba..d4792fc1 100644
--- a/SmartHunter/Core/MemoryUpdater.cs
+++ b/SmartHunter/Core/MemoryUpdater.cs
@@ -1,9 +1,15 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Diagnostics;
+using System.IO;
+using System.IO.Compression;
using System.Linq;
+using System.Reflection;
using System.Windows;
using System.Windows.Threading;
+using SmartHunter.Core.Helpers;
+using SmartHunter.Game.Data.ViewModels;
+using SmartHunter.Game.Helpers;
namespace SmartHunter.Core
{
@@ -12,8 +18,13 @@ public abstract class MemoryUpdater
enum State
{
None,
+ DeleteOldFiles,
+ CheckingForUpdates,
+ DownloadingUpdates,
+ Restarting,
WaitingForProcess,
ProcessFound,
+ FastPatternScanning,
PatternScanning,
PatternScanFailed,
Working
@@ -21,12 +32,13 @@ enum State
StateMachine m_StateMachine;
List m_MemoryScans;
+ List m_FastMemoryScans;
DispatcherTimer m_DispatcherTimer;
protected abstract string ProcessName { get; }
protected abstract BytePattern[] Patterns { get; }
- protected virtual int ThreadsPerScan { get { return 1; } }
+ protected virtual int ThreadsPerScan { get { return 2; } }
protected virtual int UpdatesPerSecond { get { return 20; } }
protected virtual bool ShutdownWhenProcessExits { get { return false; } }
@@ -46,6 +58,8 @@ public MemoryUpdater()
void CreateStateMachine()
{
+ var updater = new Updater();
+
m_StateMachine = new StateMachine();
m_StateMachine.Add(State.None, new StateMachine.StateData(
@@ -53,14 +67,113 @@ void CreateStateMachine()
new StateMachine.Transition[]
{
new StateMachine.Transition(
- State.WaitingForProcess,
+ State.DeleteOldFiles,
() => true,
() =>
{
+ var oldFiles = Directory.GetFiles(Directory.GetCurrentDirectory(), "OLD_*", SearchOption.TopDirectoryOnly);
+ if (oldFiles.Any())
+ {
+ Log.WriteLine("Deleting old update files.");
+ foreach (var oldFile in oldFiles)
+ {
+ Log.WriteLine($"Deleting old file: {oldFile.Substring(oldFile.LastIndexOf('\\') + 1)}");
+ File.Delete(oldFile);
+ }
+ }
+ })
+ }));
+
+ m_StateMachine.Add(State.DeleteOldFiles, new StateMachine.StateData(
+ null,
+ new StateMachine.Transition[]
+ {
+ new StateMachine.Transition(
+ State.CheckingForUpdates,
+ () => ConfigHelper.Main.Values.AutomaticallyCheckAndDownloadUpdates,
+ () =>
+ {
+ Log.WriteLine("Searching for updates...");
+ Log.WriteLine("This can be disabled by setting [\"AutomaticallyCheckAndDownloadUpdates\": true,] in Config.json.");
+ }),
+ new StateMachine.Transition(
+ State.WaitingForProcess,
+ () => !ConfigHelper.Main.Values.AutomaticallyCheckAndDownloadUpdates,
+ () =>
+ {
+ Initialize();
+ })
+ }));
+
+ m_StateMachine.Add(State.CheckingForUpdates, new StateMachine.StateData(
+ null,
+ new StateMachine.Transition[]
+ {
+ new StateMachine.Transition(
+ State.WaitingForProcess,
+ () => !updater.CheckForUpdates(),
+ () =>
+ {
+ Initialize();
+ }),
+ new StateMachine.Transition(
+ State.DownloadingUpdates,
+ () => updater.CheckForUpdates(),
+ () =>
+ {
+ Log.WriteLine("Starting to download Updates.");
+ })
+ }));
+
+ m_StateMachine.Add(State.DownloadingUpdates, new StateMachine.StateData(
+ null,
+ new StateMachine.Transition[]
+ {
+ new StateMachine.Transition(
+ State.Restarting,
+ () => updater.DownloadUpdates(),
+ () =>
+ {
+ Log.WriteLine("Successfully downloaded all files.");
+ }),
+ new StateMachine.Transition(
+ State.WaitingForProcess,
+ () => !updater.DownloadUpdates(),
+ () =>
+ {
+ Log.WriteLine("Failed to download Updates... Resuming the normal flow of the application.");
Initialize();
})
}));
+ m_StateMachine.Add(State.Restarting, new StateMachine.StateData(
+ null,
+ new StateMachine.Transition[]
+ {
+ new StateMachine.Transition(
+ State.Restarting,
+ () => true,
+ () =>
+ {
+ Log.WriteLine("Renaming files that will be replaced");
+ using var archive = ZipFile.OpenRead("SmartHunter.zip");
+ foreach (var entry in archive.Entries)
+ {
+ if (File.Exists(entry.Name))
+ {
+ File.Move(entry.Name, $"OLD_{entry.Name}");
+ }
+ }
+
+ Log.WriteLine("Extracting new files.");
+ archive.ExtractToDirectory(Directory.GetCurrentDirectory());
+
+ Log.WriteLine("Update complete, Starting new SmartHunter, and exiting");
+ Process.Start("SmartHunter.exe");
+ Environment.Exit(1);
+ })
+ }));
+
m_StateMachine.Add(State.WaitingForProcess, new StateMachine.StateData(
null,
new StateMachine.Transition[]
@@ -69,34 +182,74 @@ void CreateStateMachine()
State.ProcessFound,
() =>
{
- var process = Process.GetProcessesByName(ProcessName).FirstOrDefault();
- if (process != null && !process.HasExited)
+ var processes = Process.GetProcesses();
+ foreach (var p in processes)
{
- Process = process;
- return true;
+ try
+ {
+ if (p != null && p.ProcessName.Equals(ProcessName) && !p.HasExited)
+ {
+ Process = p;
+ return true;
+ }
+ }
+ catch
+ {
+ // nothing here
+ }
}
-
return false;
},
+ null)
+ }));
+
+ m_StateMachine.Add(State.ProcessFound, new StateMachine.StateData(
+ null,
+ new StateMachine.Transition[]
+ {
+ new StateMachine.Transition(
+ State.FastPatternScanning,
+ () => true,
() =>
{
- Log.WriteLine($"Attached to {Process.MainWindowTitle}");
+ foreach (var pattern in Patterns)
+ {
+ if (pattern.Config.LastResultAddress.Length > 0)
+ {
+ if (MhwHelper.TryParseHex(pattern.Config.LastResultAddress, out var address))
+ {
+ var memoryScan = new ThreadedMemoryScan(Process, pattern, new AddressRange((ulong)address, (ulong)pattern.Bytes.Length), true, ThreadsPerScan);
+ m_FastMemoryScans.Add(memoryScan);
+ }
+ }
+ }
})
}));
- m_StateMachine.Add(State.ProcessFound, new StateMachine.StateData(
+ m_StateMachine.Add(State.FastPatternScanning, new StateMachine.StateData(
null,
new StateMachine.Transition[]
{
new StateMachine.Transition(
State.PatternScanning,
- () => true,
() =>
{
- foreach (var pattern in Patterns)
+ var completedScans = m_FastMemoryScans.Where(memoryScan => memoryScan.HasCompleted);
+ return completedScans.Count() == m_FastMemoryScans.Count();
+ },
+ () =>
+ {
+ var subPatterns = Patterns.Where(p => p.MatchedAddresses.Count() == 0);
+ if (subPatterns.Count() > 0)
{
- var memoryScan = new ThreadedMemoryScan(Process, pattern, true, ThreadsPerScan);
- m_MemoryScans.Add(memoryScan);
+ AddressRange addressRange = new AddressRange((ulong)Process.MainModule.BaseAddress.ToInt64(), (ulong)Process.MainModule.ModuleMemorySize);
+ Log.WriteLine($"Base: 0x{addressRange.Start.ToString("X")}, End: 0x{addressRange.End.ToString("X")}, Size: 0x{addressRange.Size.ToString("X")}");
+
+ foreach (var pattern in subPatterns)
+ {
+ var memoryScan = new ThreadedMemoryScan(Process, pattern, addressRange, true, ThreadsPerScan);
+ m_MemoryScans.Add(memoryScan);
+ }
}
})
}));
@@ -109,11 +262,27 @@ void CreateStateMachine()
State.Working,
() =>
{
- var finishedWithResults = m_MemoryScans.Where(memoryScan => memoryScan.HasCompleted && memoryScan.Results.SelectMany(result => result.Matches).Any());
- return finishedWithResults.Count() == m_MemoryScans.Count;
+ var completedScans = m_MemoryScans.Where(memoryScan => memoryScan.HasCompleted);
+ if (completedScans.Count() == m_MemoryScans.Count())
+ {
+ var finishedWithResults = m_MemoryScans.Where(memoryScan => memoryScan.HasCompleted && memoryScan.Results.SelectMany(result => result.Matches).Any());
+ return finishedWithResults.Any() || m_MemoryScans.Count() == 0 || m_FastMemoryScans.Where(memoryScan => memoryScan.HasCompleted && memoryScan.Results.SelectMany(result => result.Matches).Any()).Any();
+ }
+
+ return false;
},
() =>
{
+ var failedMemoryScans = m_MemoryScans.Where(memoryScan => !memoryScan.Results.SelectMany(result => result.Matches).Any());
+ if (failedMemoryScans.Any())
+ {
+ var failedPatterns = string.Join(" ", failedMemoryScans.Select(failedMemoryScan => failedMemoryScan.Pattern.Config.Name));
+ Log.WriteLine($"Failed Patterns [{failedMemoryScans.Count()}/{m_MemoryScans.Count()}]: {failedPatterns}");
+ Log.WriteLine($"The application will continue to work but with limited functionalities...");
+ m_MemoryScans.RemoveAll(scan => failedMemoryScans.Contains(scan));
+ }
+ ConfigHelper.Memory.Save(false);
+ m_MemoryScans.AddRange(m_FastMemoryScans.Where(f => f.Results.Where(r => r.Matches.Any()).Any()));
var orderedMatches = m_MemoryScans.Select(memoryScan => memoryScan.Results.Where(result => result.Matches.Any()).First().Matches.First()).OrderBy(match => match);
Log.WriteLine($"Match Range: {orderedMatches.First():X} - {orderedMatches.Last():X}");
}),
@@ -122,19 +291,17 @@ void CreateStateMachine()
() =>
{
var completedScans = m_MemoryScans.Where(memoryScan => memoryScan.HasCompleted);
- if (completedScans.Count() == m_MemoryScans.Count)
+ if (completedScans.Count() == m_MemoryScans.Count())
{
var finishedWithoutResults = m_MemoryScans.Where(memoryScan => !memoryScan.Results.SelectMany(result => result.Matches).Any());
- return finishedWithoutResults.Any();
+ return (finishedWithoutResults.Count() == m_MemoryScans.Count()) && m_FastMemoryScans.Where(memoryScan => memoryScan.HasCompleted && memoryScan.Results.SelectMany(result => result.Matches).Any()).Count() == 0;
}
return false;
},
() =>
{
- var failedMemoryScans = m_MemoryScans.Where(memoryScan => !memoryScan.Results.SelectMany(result => result.Matches).Any());
- string failedPatterns = String.Join("\r\n", failedMemoryScans.Select(failedMemoryScan => failedMemoryScan.Pattern.Config.String));
- Log.WriteLine($"Failed Patterns:\r\n{failedPatterns}");
+ Log.WriteLine($"All pattern failed... Aborting.");
}),
new StateMachine.Transition(
State.WaitingForProcess,
@@ -187,8 +354,11 @@ private void Initialize(bool processExited = false)
}
}
+ m_FastMemoryScans = new List();
m_MemoryScans = new List();
+ OverlayViewModel.Instance.IsGameActive = false;
+
if (processExited && ShutdownWhenProcessExits)
{
Log.WriteLine("Process exited. Shutting down.");
@@ -215,7 +385,7 @@ protected void TryUpdateTimerInterval()
{
const int max = 60;
const int min = 1;
- int clampedUpdatesPerSecond = Math.Min(Math.Max(UpdatesPerSecond, min), max);
+ int clampedUpdatesPerSecond = Math.Min(Math.Max(UpdatesPerSecond, min), max); // TODO: Dynamic updates per second number based on game perfomance
int targetMilliseconds = (int)(1000f / clampedUpdatesPerSecond);
if (m_DispatcherTimer != null && m_DispatcherTimer.Interval.TotalMilliseconds != targetMilliseconds)
@@ -224,4 +394,4 @@ protected void TryUpdateTimerInterval()
}
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/Overlay.cs b/SmartHunter/Core/Overlay.cs
index 75250e80..a8200c0a 100644
--- a/SmartHunter/Core/Overlay.cs
+++ b/SmartHunter/Core/Overlay.cs
@@ -1,8 +1,8 @@
-using SmartHunter.Core.Helpers;
-using SmartHunter.Core.Windows;
-using System;
+using System.ComponentModel;
using System.Windows;
using System.Windows.Input;
+using SmartHunter.Core.Helpers;
+using SmartHunter.Core.Windows;
namespace SmartHunter.Core
{
@@ -13,8 +13,6 @@ public abstract class Overlay
Window m_MainWindow;
protected WidgetWindow[] WidgetWindows { get; private set; }
- protected virtual bool ShowWindows { get { return false; } }
-
public Overlay(Window mainWindow, params WidgetWindow[] widgetWindows)
{
m_MainWindow = mainWindow;
@@ -32,9 +30,20 @@ public Overlay(Window mainWindow, params WidgetWindow[] widgetWindows)
private void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
UpdateWidgetsFromConfig();
+ /*
+ foreach (var widgetWindow in WidgetWindows)
+ {
+ if (!widgetWindow.IsVisible)
+ {
+ widgetWindow.Owner = m_MainWindow;
+ widgetWindow.Opacity = 0.0f;
+ widgetWindow.Hide();
+ }
+ }
+ */
}
- private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ private void MainWindow_Closing(object sender, CancelEventArgs e)
{
foreach (var widgetWindow in WidgetWindows)
{
@@ -44,16 +53,29 @@ private void MainWindow_Closing(object sender, System.ComponentModel.CancelEvent
private void ToggleWidgetWindow(WidgetWindow widgetWindow)
{
+ /*
+ widgetWindow.Owner = m_MainWindow;
+ if (widgetWindow.Visibility != Visibility.Visible)
+ {
+ widgetWindow.Opacity = 1.0f;
+ widgetWindow.Show();
+
+ WindowHelper.SetTopMostTransparent(widgetWindow);
+ }
+ else
+ {
+ widgetWindow.Opacity = 0.0f;
+ widgetWindow.Hide();
+ }
+ */
+
if (widgetWindow.Visibility != Visibility.Visible)
{
widgetWindow.Owner = m_MainWindow;
widgetWindow.Show();
widgetWindow.Owner = null;
- if (!ShowWindows)
- {
- WindowHelper.SetTopMostTransparent(widgetWindow);
- }
+ WindowHelper.SetTopMostTransparent(widgetWindow);
}
else
{
@@ -63,29 +85,8 @@ private void ToggleWidgetWindow(WidgetWindow widgetWindow)
public void UpdateWidgetsFromConfig()
{
- for (int index = 0; index < WidgetWindows.Length; ++index)
+ foreach (var widgetWindow in WidgetWindows)
{
- var widgetWindow = WidgetWindows[index];
-
- // Recreate the window using the appropriate settings if the ShowWindows option is toggled
- bool shouldChangeWindowState = (ShowWindows && widgetWindow.IsConfiguredForLayered) || (!ShowWindows && !widgetWindow.IsConfiguredForLayered);
- if (shouldChangeWindowState)
- {
- widgetWindow.Close();
-
- widgetWindow = Activator.CreateInstance(widgetWindow.GetType(), false) as WidgetWindow;
- WidgetWindows[index] = widgetWindow;
-
- if (ShowWindows)
- {
- widgetWindow.ConfigureForSolid();
- }
- else
- {
- widgetWindow.ConfigureForLayered();
- }
- }
-
widgetWindow.Widget.UpdateFromConfig();
if ((widgetWindow.Widget.IsVisible && widgetWindow.Visibility != Visibility.Visible) ||
@@ -113,4 +114,4 @@ private void KeyboardInput_InputReceived(object sender, KeyboardInputEventArgs e
abstract protected void InputReceived(Key key, bool down);
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/Setting.cs b/SmartHunter/Core/Setting.cs
new file mode 100644
index 00000000..54cee677
--- /dev/null
+++ b/SmartHunter/Core/Setting.cs
@@ -0,0 +1,21 @@
+using System.Collections.Generic;
+
+namespace SmartHunter.Core
+{
+ public class Setting
+ {
+ public bool Value { get; set; }
+ public string Name { get; }
+ public string Description { get; }
+ public ListSubSettings { get; }
+ public Command TriggerAction { get; }
+ public Setting(bool value, string name, string description, Command action = null)
+ {
+ Value = value;
+ Name = name;
+ Description = description;
+ SubSettings = new List();
+ TriggerAction = action;
+ }
+ }
+}
diff --git a/SmartHunter/Core/ThreadedMemoryScan.cs b/SmartHunter/Core/ThreadedMemoryScan.cs
index e47eca6b..b86c86ec 100644
--- a/SmartHunter/Core/ThreadedMemoryScan.cs
+++ b/SmartHunter/Core/ThreadedMemoryScan.cs
@@ -1,4 +1,3 @@
-using SmartHunter.Core.Helpers;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
@@ -6,6 +5,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using SmartHunter.Core.Helpers;
namespace SmartHunter.Core
{
@@ -90,7 +90,7 @@ public List Results
}
}
- public ThreadedMemoryScan(Process process, BytePattern pattern, bool stopAfterFirst, int threads = 2)
+ public ThreadedMemoryScan(Process process, BytePattern pattern, AddressRange addressRange, bool stopAfterFirst, int threads = 2)
{
Process = process;
Pattern = pattern;
@@ -101,7 +101,7 @@ public ThreadedMemoryScan(Process process, BytePattern pattern, bool stopAfterFi
m_Stopwatch = new Stopwatch();
m_Stopwatch.Start();
- var addressRangeDivisions = MemoryHelper.DivideAddressRange(pattern.AddressRange, threads);
+ var addressRangeDivisions = MemoryHelper.DivideAddressRange(addressRange, threads);
foreach (var addressRangeDivision in addressRangeDivisions)
{
AddScanTask(addressRangeDivision);
@@ -218,4 +218,4 @@ void TryComplete()
}
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Core/Windows/WidgetWindow.cs b/SmartHunter/Core/Windows/WidgetWindow.cs
index a0ce01d3..c87d0573 100644
--- a/SmartHunter/Core/Windows/WidgetWindow.cs
+++ b/SmartHunter/Core/Windows/WidgetWindow.cs
@@ -1,7 +1,7 @@
-using SmartHunter.Core.Data;
using System;
using System.Windows;
using System.Windows.Input;
+using SmartHunter.Core.Data;
namespace SmartHunter.Core.Windows
{
@@ -13,34 +13,9 @@ public abstract class WidgetWindow : Window
protected abstract float ScaleMin { get; }
protected abstract float ScaleStep { get; }
- public bool IsConfiguredForLayered { get; private set; }
-
public WidgetWindow(Widget widget)
{
Widget = widget;
-
- ShowActivated = false;
-
- ConfigureForLayered();
- }
-
- public void ConfigureForLayered()
- {
- IsConfiguredForLayered = true;
-
- AllowsTransparency = true;
- WindowStyle = WindowStyle.None;
- ShowInTaskbar = false;
- }
-
- public void ConfigureForSolid()
- {
- IsConfiguredForLayered = false;
-
- AllowsTransparency = false;
- WindowStyle = WindowStyle.SingleBorderWindow;
- ShowInTaskbar = true;
- ResizeMode = ResizeMode.NoResize;
}
protected void WidgetWindow_MouseDown(object sender, MouseButtonEventArgs e)
diff --git a/SmartHunter/Core/WindowsApi.cs b/SmartHunter/Core/WindowsApi.cs
index 6be70f52..1c3ed450 100644
--- a/SmartHunter/Core/WindowsApi.cs
+++ b/SmartHunter/Core/WindowsApi.cs
@@ -85,7 +85,7 @@ public struct MEMORY_BASIC_INFORMATION64
public uint __alignment2;
}
- [DllImport("kernel32.dll", SetLastError = true)]
+ [DllImport("kernel32.dll")]
public static extern int VirtualQueryEx(IntPtr hProcess, IntPtr lpAddress, out MEMORY_BASIC_INFORMATION64 lpBuffer, uint dwLength);
[DllImport("kernel32.dll")]
@@ -269,10 +269,10 @@ public enum DPI_AWARENESS_CONTEXT
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 = 34
}
- [DllImport("user32.dll")]
+ [DllImport("user32.dll", SetLastError = true)]
public static extern bool SetProcessDpiAwarenessContext(int dpiFlag);
- [DllImport("SHCore.dll")]
+ [DllImport("SHCore.dll", SetLastError = true)]
public static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
[DllImport("user32.dll")]
diff --git a/SmartHunter/Game/Config/BytePatternConfig.cs b/SmartHunter/Game/Config/BytePatternConfig.cs
index 9a5492f6..62d74e42 100644
--- a/SmartHunter/Game/Config/BytePatternConfig.cs
+++ b/SmartHunter/Game/Config/BytePatternConfig.cs
@@ -1,20 +1,18 @@
-using SmartHunter.Core;
+using SmartHunter.Core;
namespace SmartHunter.Game.Config
{
public class BytePatternConfig
{
- public string String;
- public string AddressRangeStart = "140000000";
- public string AddressRangeEnd = "145000000";
- public WindowsApi.RegionPageProtection[] PageProtections;
+ public string Name;
+ public string PatternString;
+ public string LastResultAddress;
- public BytePatternConfig(string patternString, string addressRangeStart, string addressRangeEnd, params WindowsApi.RegionPageProtection[] pageProtections)
+ public BytePatternConfig(string name, string patternString, string lastResultAddress = "")
{
- String = patternString;
- AddressRangeStart = addressRangeStart;
- AddressRangeEnd = addressRangeEnd;
- PageProtections = pageProtections;
+ Name = name;
+ PatternString = patternString;
+ LastResultAddress = lastResultAddress;
}
}
}
diff --git a/SmartHunter/Game/Config/CrownPreset.cs b/SmartHunter/Game/Config/CrownPreset.cs
new file mode 100644
index 00000000..c452b388
--- /dev/null
+++ b/SmartHunter/Game/Config/CrownPreset.cs
@@ -0,0 +1,10 @@
+namespace SmartHunter.Game.Config
+{
+ public enum CrownPreset
+ {
+ Standard,
+ Alternate,
+ Savage,
+ Rajang
+ }
+}
diff --git a/SmartHunter/Game/Config/DebugWidgetConfig.cs b/SmartHunter/Game/Config/DebugWidgetConfig.cs
new file mode 100644
index 00000000..906a51e8
--- /dev/null
+++ b/SmartHunter/Game/Config/DebugWidgetConfig.cs
@@ -0,0 +1,12 @@
+using SmartHunter.Core.Config;
+
+namespace SmartHunter.Game.Config
+{
+ public class DebugWidgetConfig : WidgetConfig
+ {
+ public DebugWidgetConfig(float x, float y) : base(x, y)
+ {
+ IsVisible = false;
+ }
+ }
+}
diff --git a/SmartHunter/Game/Config/LocalizationConfig.cs b/SmartHunter/Game/Config/LocalizationConfig.cs
index 3416f3a4..160a6291 100644
--- a/SmartHunter/Game/Config/LocalizationConfig.cs
+++ b/SmartHunter/Game/Config/LocalizationConfig.cs
@@ -1,5 +1,5 @@
-using SmartHunter.Core.Config;
using System.Collections.Generic;
+using SmartHunter.Core.Config;
namespace SmartHunter.Config
{
@@ -12,8 +12,45 @@ public class LocalizationConfig
{ "LOC_WIDGET_MONSTER", "Monster Widget" },
{ "LOC_WIDGET_TEAM", "Team Widget" },
{ "LOC_WIDGET_PLAYER", "Player Widget" },
+ { "LOC_WIDGET_DEBUG", "Debug Widget" },
- { "LOC_MONSTER_UKNOWN", "Unknown Monster" },
+ // Iceborne monsters
+
+ { "LOC_MONSTER_NARGACUGA", "Nargacuga" },
+ { "LOC_MONSTER_NAMIELLE", "Namielle" },
+ { "LOC_MONSTER_SHARA_ISHVALDA", "Shara Ishvalda" },
+ { "LOC_MONSTER_BANBARO", "Banbaro" },
+ { "LOC_MONSTER_TIGREX", "Tigrex" },
+ { "LOC_MONSTER_BRUTE_TIGREX", "Brute Tigrex" },
+ { "LOC_MONSTER_ZINOGRE", "Zinogre" },
+ { "LOC_MONSTER_PAOLUMU_NIGHTSHADE", "Nightshade Paolumu" },
+ { "LOC_MONSTER_EBONY_ODOGARON", "Ebony Odogaron" },
+ { "LOC_MONSTER_ANJANATH_FULGUR", "Fulgur Anjanath" },
+ { "LOC_MONSTER_PUKEI_PUKEI_CORAL", "Coral Pukei-Pukei" },
+ { "LOC_MONSTER_BRACHYDIOS", "Brachydios" },
+ { "LOC_MONSTER_RAGING_BRACHYDIOS", "Raging Brachydios" },
+ { "LOC_MONSTER_VELKHANA", "Velkhana" },
+ { "LOC_MONSTER_BEOTODUS", "Beotodus" },
+ { "LOC_MONSTER_GLAVENUS", "Glavenus" },
+ { "LOC_MONSTER_ACIDIC_GLAVENUS", "Acidic Glavenus" },
+ { "LOC_MONSTER_BLACKVEIL_VAAL_HAZAK", "Blackveil Vaal Hazak" },
+ { "LOC_MONSTER_BARIOTH", "Barioth" },
+ { "LOC_MONSTER_SAVAGE_DEVILJHO", "Savage Deviljho" },
+ { "LOC_MONSTER_RUINER_NERGIGANTE", "Ruiner Nergigante" },
+ { "LOC_MONSTER_VIPER_TOBI_KADACHI", "Viper Tobi Kadachi" },
+ { "LOC_MONSTER_SHRIEKING_LEGIANA", "Shrieking Legiana" },
+ { "LOC_MONSTER_SEETHING_BAZELGEUSE", "Seething Bazelgeuse" },
+ { "LOC_MONSTER_YIAN_GARUGA", "Yian Garuga" },
+ { "LOC_MONSTER_SCARRED_YIAN_GARUGA", "Scarred Yian Garuga" },
+ { "LOC_MONSTER_GOLD_RATHIAN", "Gold Rathian" },
+ { "LOC_MONSTER_SILVER_RATHALOS", "Silver Rathalos" },
+ { "LOC_MONSTER_RAJANG", "Rajang" },
+ { "LOC_MONSTER_FURIOUS_RAJANG", "Furious Rajang" },
+ { "LOC_MONSTER_STYGIAN_ZINOGRE", "Stygian Zinogre" },
+ { "LOC_MONSTER_SAFI_JIIVA", "Safi'jiiva" },
+
+ //{ "LOC_MONSTER_UKNOWN", "Unknown Monster" },
+ { "LOC_MONSTER_UKNOWN", "Kono Dio da!" },
{ "LOC_MONSTER_ANJANATH", "Anjanath" },
{ "LOC_MONSTER_AZURE_RATHALOS", "Azure Rathalos" },
{ "LOC_MONSTER_BARROTH", "Barroth" },
@@ -49,6 +86,29 @@ public class LocalizationConfig
{ "LOC_MONSTER_XENO_JIIVA", "Xeno'jiiva" },
{ "LOC_MONSTER_ZORAH_MAGDAROS", "Zorah Magdaros" },
{ "LOC_PART_UKNOWN", "Unknown Part" },
+
+ { "LOC_PART_HEAD_SNOW", "Head Snow" },
+ { "LOC_PART_BODY_SNOW", "Body Snow" },
+ { "LOC_PART_TAIL_SNOW", "Tail Snow" },
+
+ { "LOC_PART_HEAD_ICE", "Head Ice" },
+ { "LOC_PART_BODY_ICE", "Body Ice" },
+ { "LOC_PART_WINGS_ICE", "Wings Ice" },
+ { "LOC_PART_ARMS_ICE", "Arms Ice" },
+ { "LOC_PART_LEGS_ICE", "Legs Ice" },
+ { "LOC_PART_TAIL_ICE", "Tail Ice" },
+
+ { "LOC_PART_HEAD_ROCK", "Head Rock" },
+ { "LOC_PART_NECK_LEFT_ROCK", "Left Neck Rock" },
+ { "LOC_PART_NECK_RIGHT_ROCK", "Right Right Rock" },
+ { "LOC_PART_TAIL_ROCK", "Tail Rock" },
+ { "LOC_PART_WING_LEFT_ROCK", "Left Wing Rock" },
+ { "LOC_PART_WING_RIGHT_ROCK", "Right Wing Rock" },
+ { "LOC_PART_ARM_LEFT_ROCK", "Left Arm Rock" },
+ { "LOC_PART_ARM_RIGHT_ROCK", "Right Arm Rock" },
+ { "LOC_PART_LEGS_ROCK", "Legs Rock" },
+
+ { "LOC_PART_FIN", "Fin" },
{ "LOC_PART_HEAD", "Head" },
{ "LOC_PART_HEAD_LEFT", "Left Head" },
{ "LOC_PART_HEAD_RIGHT", "Right Head" },
@@ -66,6 +126,7 @@ public class LocalizationConfig
{ "LOC_PART_LIMBS_LEFT", "Left Limbs" },
{ "LOC_PART_LIMBS_RIGHT", "Right Limbs" },
{ "LOC_PART_TAIL", "Tail" },
+ { "LOC_PART_TAIL_BLADE", "Tail Blade" },
{ "LOC_PART_WINGS", "Wings" },
{ "LOC_PART_WING_LEFT", "Left Wing" },
{ "LOC_PART_WING_RIGHT", "Right Wing" },
@@ -102,18 +163,71 @@ public class LocalizationConfig
{ "LOC_REMOVABLE_PART_TAIL", "Removable Tail" },
{ "LOC_REMOVABLE_PART_HORNS", "Removable Horns" },
{ "LOC_REMOVABLE_PART_HORNS_2", "Removable Horn Chip" },
+ { "LOC_REMOVABLE_PART_BALOON", "Removable Baloon" },
+ //To test monster parts
+ { "LOC_PART_0", "Part 0" },
+ { "LOC_PART_1", "Part 1" },
+ { "LOC_PART_2", "Part 2" },
+ { "LOC_PART_3", "Part 3" },
+ { "LOC_PART_4", "Part 4" },
+ { "LOC_PART_5", "Part 5" },
+ { "LOC_PART_6", "Part 6" },
+ { "LOC_PART_7", "Part 7" },
+ { "LOC_PART_8", "Part 8" },
+ { "LOC_PART_9", "Part 9" },
+ { "LOC_PART_10", "Part 10" },
+ { "LOC_PART_11", "Part 11" },
+ { "LOC_PART_12", "Part 12" },
+ { "LOC_PART_13", "Part 13" },
+ { "LOC_PART_14", "Part 14" },
+ { "LOC_PART_15", "Part 15" },
+ { "LOC_PART_16", "Part 16" },
+ { "LOC_PART_17", "Part 17" },
+ { "LOC_PART_18", "Part 18" },
+ { "LOC_PART_19", "Part 19" },
+ { "LOC_PART_20", "Part 20" },
+ { "LOC_PART_21", "Part 21" },
+ { "LOC_PART_22", "Part 22" },
+ { "LOC_PART_23", "Part 23" },
+ { "LOC_PART_24", "Part 24" },
+ { "LOC_PART_25", "Part 25" },
+ { "LOC_PART_26", "Part 26" },
+ { "LOC_PART_27", "Part 27" },
+ { "LOC_PART_28", "Part 28" },
+ { "LOC_PART_29", "Part 29" },
+ { "LOC_PART_30", "Part 30" },
+ { "LOC_PART_31", "Part 31" },
+ { "LOC_PART_32", "Part 32" },
+
+ { "LOC_REMOVABLE_PART_0", "Removable 0" },
+ { "LOC_REMOVABLE_PART_1", "Removable 1" },
+
+ //removables
+ { "LOC_REMOVABLE_PART_HEAD", "Removable Head" },
+ { "LOC_REMOVABLE_PART_HEAD_HEAD", "Removable Head+" },
+ { "LOC_REMOVABLE_PART_HEAD_HEAD_HEAD", "Removable Head++" },
+
+ //statuses
+ { "LOC_STATUS_0", "Status 0" },
{ "LOC_STATUS_EFFECT_UNKNOWN", "Unknown Status Effect" },
{ "LOC_STATUS_EFFECT_POISON", "Poison" },
+ { "LOC_STATUS_EFFECT_NOXIOUS_POISON", "Noxious Poison"},
{ "LOC_STATUS_EFFECT_PARALYSIS", "Paralysis" },
{ "LOC_STATUS_EFFECT_SLEEP", "Sleep" },
{ "LOC_STATUS_EFFECT_BLAST", "Blast" },
{ "LOC_STATUS_EFFECT_MOUNT", "Mount" },
{ "LOC_STATUS_EFFECT_EXHAUST", "Exhaust" },
{ "LOC_STATUS_EFFECT_STUN", "Stun" },
+ { "LOC_STATUS_EFFECT_KO", "KO" },
{ "LOC_STATUS_EFFECT_TRANQUILIZE", "Tranquilize" },
{ "LOC_STATUS_EFFECT_FLASH", "Flash" },
- { "LOC_STATUS_EFFECT_DUNG", "Dung" },
+ { "LOC_STATUS_EFFECT_DUNG", "Dung Pods" },
+ { "LOC_STATUS_EFFECT_KNOW_DOWN", "Knockdown" },
+ { "LOC_STATUS_EFFECT_SMOKING", "Smoking" },
+ { "LOC_STATUS_EFFECT_VIOLATED", "Violated" },
+ { "LOC_STATUS_EFFECT_CLAW_ATTACK", "Claw Attack" },
+ { "LOC_STATUS_EFFECT_FELVYNE_KNOCK_DOWN_TRAP", "Felvyne Knock Down Trap" },
// Hunting Horn
{ "LOC_STATUS_EFFECT_SELF_IMPROVEMENT", "Self-improvement" },
@@ -139,7 +253,7 @@ public class LocalizationConfig
{ "LOC_STATUS_EFFECT_STUN_NEGATED", "Stun Negated" },
{ "LOC_STATUS_EFFECT_PARALYSIS_NEGATED", "Paralysis Negated" },
{ "LOC_STATUS_EFFECT_TREMORS_NEGATED", "Tremors Negated" },
- { "LOC_STATUS_EFFECT_MUCK_RESISTANCE", "Muck Res" },
+ { "LOC_STATUS_EFFECT_MUCK_RESISTANCE", "Much/Water/Deep Snow Res" },
{ "LOC_STATUS_EFFECT_FIRE_RESISTANCE_BOOST_S", "Fire Res Boost (S)" },
{ "LOC_STATUS_EFFECT_FIRE_RESISTANCE_BOOST_L", "Fire Res Boost (L)" },
{ "LOC_STATUS_EFFECT_WATER_RESISTANCE_BOOST_S", "Water Res Boost (S)" },
@@ -153,13 +267,18 @@ public class LocalizationConfig
{ "LOC_STATUS_EFFECT_ELEMENTAL_ATTACK_BOOST", "Elemental Attack Boost" },
{ "LOC_STATUS_EFFECT_BLIGHT_NEGATED", "Blight Negated" },
{ "LOC_STATUS_EFFECT_KNOCKBACKS_NEGATED", "Knockbacks Negated" },
- { "LOC_STATUS_EFFECT_ELEMENTAL_RESISTANCE_UP", "Elemental Resistance Up" },
+ { "LOC_STATUS_EFFECT_BLIGHT_RESISTANCE_UP", "Blight Resistance Up" },
{ "LOC_STATUS_EFFECT_AFFINITY_UP", "Affinity Up" },
{ "LOC_STATUS_EFFECT_ALL_AILMENTS_NEGATED", "All Ailments Negated" },
{ "LOC_STATUS_EFFECT_WIND_PRESSURE_NEGATED_AND_EARPLUGS_S", "Wind Pressure Negated & Earplugs (S)" },
{ "LOC_STATUS_EFFECT_ABNORMAL_STATUS_ATTACK_INCREASED", "Abnormal Status Atk. Increased" },
+ { "LOC_STATUS_EFFECT_MAX_STAM_UP_REC", "Max Stamina Up / Recovery" },
+ { "LOC_STATUS_EFFECT_EXT_HEALTH_REC", "Extended Health Recovery" },
+ { "LOC_STATUS_EFFECT_SPEED_BOOST_EVADE_UP", "Speed Boost / Evade Window Up" },
+ { "LOC_STATUS_EFFECT_ELE_EFF_UP", "Elemental Effectiveness Up" },
// Orchestra
+ { "LOC_STATUS_EFFECT_RESUSCITATE", "Resuscitate" },
{ "LOC_STATUS_EFFECT_HEALTH_RECOVERY", "Health Recovery" },
{ "LOC_STATUS_EFFECT_HEALTH_BOOST", "Health Boost" },
{ "LOC_STATUS_EFFECT_STAMINA_USE_REDUCED", "Stamina Use Reduced" },
@@ -177,25 +296,32 @@ public class LocalizationConfig
{ "LOC_STATUS_EFFECT_ELEMENTAL_RESISTANCE_DOWN", "Elemental Resistance Down" },
{ "LOC_STATUS_EFFECT_NO_ITEMS", "No Items" },
{ "LOC_STATUS_EFFECT_BLASTBLIGHT", "Blastblight" },
+ { "LOC_STATUS_EFFECT_BLASTSCOURGE", "Blastscourge" },
// Buffs
{ "LOC_STATUS_EFFECT_DASH_JUICE", "Dash Juice" },
{ "LOC_STATUS_EFFECT_WIGGLY_LITCHI", "Wiggly Litchi" },
- { "LOC_STATUS_EFFECT_IMMUNIZER", "Immunizer" },
+ { "LOC_STATUS_EFFECT_IMMUNIZER", "Immunizer" },
{ "LOC_STATUS_EFFECT_MIGHT_PILL", "Might Pill" },
- { "LOC_STATUS_EFFECT_MIGHT_SEED", "Might Seed" },
+ { "LOC_STATUS_EFFECT_MIGHT_SEED", "Might Seed" },
{ "LOC_STATUS_EFFECT_ADAMANT_PILL", "Adamant Pill" },
- { "LOC_STATUS_EFFECT_ADAMANT_SEED", "Adamant Seed" },
+ { "LOC_STATUS_EFFECT_ADAMANT_SEED", "Adamant Seed" },
{ "LOC_STATUS_EFFECT_DEMON_POWDER", "Demon Powder" },
- { "LOC_STATUS_EFFECT_HARDSHELL_POWDER", "Hardshell Powder" },
+ { "LOC_STATUS_EFFECT_HARDSHELL_POWDER", "Hardshell Powder" },
{ "LOC_STATUS_EFFECT_DEMONDRUG", "Demondrug" },
{ "LOC_STATUS_EFFECT_MEGA_DEMONDRUG", "Mega Demondrug" },
{ "LOC_STATUS_EFFECT_ARMORSKIN", "Armorskin" },
{ "LOC_STATUS_EFFECT_MEGA_ARMORSKIN", "Mega Armorskin" },
{ "LOC_STATUS_EFFECT_COOL_DRINK", "Cool Drink" },
+ { "LOC_STATUS_EFFECT_HOT_DRINK", "Hot Drink" },
{ "LOC_STATUS_EFFECT_PROTECTIVE_POLISH", "Protective Polish" },
{ "LOC_STATUS_EFFECT_AFFINITY_SLIDING", "Affinity Sliding" },
+ { "LOC_STATUS_EFFECT_HOT_SPRING_HEALTH_RECOVERY","Health Recovery (Hot Spring)"},
+ { "LOC_STATUS_EFFECT_HOT_SPRING_CLODPROOF","Clodproof (Hot Spring)"},
+ { "LOC_STATUS_EFFECT_POWERCONE_ATTACK_UP","Attack UP (Powercone)"},
+ { "LOC_STATUS_EFFECT_THAWPUFFS_ICEPROOF","Iceproof (Thawpuffs)"},
+
// Equipment
{ "LOC_EQUIPMENT_MANTLE_GHILLIE", "Ghillie Mantle" },
{ "LOC_EQUIPMENT_MANTLE_TEMPORAL", "Temporal Mantle" },
@@ -214,15 +340,44 @@ public class LocalizationConfig
{ "LOC_EQUIPMENT_MANTLE_IMMUNITY", "Immunity Mantle" },
{ "LOC_EQUIPMENT_MANTLE_BANDIT", "Bandit Mantle" },
{ "LOC_EQUIPMENT_AFFINITY_BOOSTER", "Affinity Booster" },
+ { "LOC_EQUIPMENT_CLEANSER_BOOSTER", "Cleanser Booster" },
+ { "LOC_EQUIPMENT_HEALTH_BOOSTER", "Health Booster" },
+ { "LOC_EQUIPMENT_ASSASSINS_HOOD", "Assassin's Hood" },
+
+ // Equipment recharg time
+
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_GHILLIE", "Recharge Ghillie Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_TEMPORAL", "Recharge Temporal Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_ROCKSTEADY", "Recharge Rocksteady Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_CHALLENGER", "Recharge Challenger Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_VITALITY", "Recharge Vitality Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_FIREPROOF", "Recharge Fireproof Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_WATERPROOF", "Recharge Waterproof Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_ICEPROOF", "Recharge Iceproof Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_THUNDERPROOF", "Recharge Thunderproof Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_DRAGONPROOF", "Recharge Dragonproof Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_GLIDER", "Recharge Glider Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_EVASION", "Recharge Evasion Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_IMPACT", "Recharge Impact Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_APOTHECARY", "Recharge Apothecary Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_IMMUNITY", "Recharge Immunity Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_MANTLE_BANDIT", "Recharge Bandit Mantle" },
+ { "LOC_EQUIPMENT_RECHARGE_AFFINITY_BOOSTER", "Recharge Affinity Booster" },
+ { "LOC_EQUIPMENT_RECHARGE_CLEANSER_BOOSTER", "Recharge Cleanser Booster" },
+ { "LOC_EQUIPMENT_RECHARGE_HEALTH_BOOSTER", "Recharge Health Booster" },
+ { "LOC_EQUIPMENT_RECHARGE_ASSASSINS_HOOD", "Recharge Assassin's Hood" },
// Weapon
{ "LOC_WEAPON_INSECT_GLAIVE_ATTACK", "Attack Up" },
{ "LOC_WEAPON_INSECT_GLAIVE_SPEED", "Speed Up" },
{ "LOC_WEAPON_INSECT_GLAIVE_DEFENSE", "Defense Up" },
- { "LOC_WEAPON_LONGSWORD_SPIRIT_GAUGE_REGEN", "Spirit Gauge Regen" },
{ "LOC_WEAPON_LONGSWORD_STEADY_SPIRIT_LEVEL", "Steady Spirit Level" },
+ { "LOC_WEAPON_LONGSWORD_SPIRIT_GAUGE_REGEN", "Spirit Gauge Regen" },
+ { "LOC_WEAPON_LONGSWORD_SPIRIT_GAUGE_REGEN_HELM_BREAKER", "Spirit Gauge Regen (Helm Breaker)" },
+ { "LOC_WEAPON_LONGSWORD_SPIRIT_GAUGE_REGEN_LAI_SLASH", "Spirit Gauge Regen (Lai Slash)" },
{ "LOC_WEAPON_CHARGE_BLADE_SHIELD_CHARGE", "Shield Charge" },
{ "LOC_WEAPON_CHARGE_BLADE_BLADE_CHARGE", "Blade Charge" },
+ { "LOC_WEAPON_CHARGE_BLADE_PHIAL_EXPIRES", "Phial expires" },
{ "LOC_WEAPON_SWITCH_AXE_AMPED_STATE", "Amped State" },
{ "LOC_WEAPON_HAMMER_POWER_CHARGE", "Power Charge" },
@@ -238,20 +393,20 @@ public class LocalizationConfig
{ "LOC_STATUS_EFFECT_PITFALL_TRAP", "Pitfall Trap" },
{ "LOC_STATUS_EFFECT_ELDERSEAL", "Elderseal" },
- { "LOC_EQUIPMENT_ASSASSINS_HOOD", "Assassin's Hood" },
{ "LOC_MONSTER_LESHEN", "Leshen" },
+ { "LOC_MONSTER_ANCIENT_LESHEN", "Ancient Leshen" },
{ "LOC_REMOVABLE_PART_ANTLER_LEFT", "Removable Left Antler" },
{ "LOC_REMOVABLE_PART_ANTLER_RIGHT", "Removable Right Antler" },
+ { "LOC_JAGRAS_SUMMONER", "Jagras Summoner" },
{ "LOC_STATUS_EFFECT_RAGE", "Rage" },
{ "LOC_STATUS_EFFECT_STAMINA", "Stamina" },
{ "LOC_STATUS_EFFECT_FATIGUE", "Fatigue" },
-
- { "LOC_MONSTER_ANCIENT_LESHEN", "Ancient Leshen" },
};
-
+
public LocalizationConfig()
{
+
}
}
}
diff --git a/SmartHunter/Game/Config/MainConfig.cs b/SmartHunter/Game/Config/MainConfig.cs
index 124df629..46be29f2 100644
--- a/SmartHunter/Game/Config/MainConfig.cs
+++ b/SmartHunter/Game/Config/MainConfig.cs
@@ -1,6 +1,6 @@
-using SmartHunter.Core.Config;
using System.Collections.Generic;
using System.Windows.Input;
+using SmartHunter.Core.Config;
namespace SmartHunter.Game.Config
{
@@ -13,6 +13,8 @@ public class MainConfig
public string MemoryFileName = "Memory.json";
public bool ShutdownWhenProcessExits = false;
+ public bool UseCustomData = false;
+ public bool AutomaticallyCheckAndDownloadUpdates = true;
public OverlayConfig Overlay = new OverlayConfig();
@@ -20,9 +22,10 @@ public class MainConfig
public Dictionary Keybinds = new Dictionary()
{
{ InputControl.ManipulateWidget, Key.LeftAlt },
- { InputControl.HideWidgets, Key.F1 }
+ { InputControl.HideWidgets, Key.F1 },
+ { InputControl.ToggleWidgests, Key.RightCtrl },
};
public DebugConfig Debug = new DebugConfig();
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Game/Config/MemoryConfig.cs b/SmartHunter/Game/Config/MemoryConfig.cs
index b35542a2..9f27de48 100644
--- a/SmartHunter/Game/Config/MemoryConfig.cs
+++ b/SmartHunter/Game/Config/MemoryConfig.cs
@@ -1,4 +1,4 @@
-using SmartHunter.Core;
+using SmartHunter.Core;
namespace SmartHunter.Game.Config
{
@@ -8,39 +8,44 @@ public class MemoryConfig
public int ThreadsPerScan = 1;
+ public BytePatternConfig CurrentPlayerNamePattern = new BytePatternConfig(
+ "CurrentPlayerNamePattern",
+ "48 8B 0D ?? ?? ?? ?? 48 8D 55 ?? 45 31 C9 41 89 C0 E8"
+ );
+
+ public BytePatternConfig CurrentWeaponPattern = new BytePatternConfig(
+ "CurrentWeaponPattern",
+ "48 8B 0D ?? ?? ?? ?? 4C 8D 45 ?? 48 8D 97 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B D8 48 85 C0 "
+ );
+
public BytePatternConfig PlayerDamagePattern = new BytePatternConfig(
- "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B D8 48 85 C0 75 04 33 C9",
- "140000000",
- "145000000",
- WindowsApi.RegionPageProtection.PAGE_EXECUTE_READ
+ "PlayerDamagePattern",
+ "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B D8 48 85 C0 75 04 33 C9"
);
public BytePatternConfig PlayerNamePattern = new BytePatternConfig(
- "48 8B 0D ?? ?? ?? ?? 48 8D 54 24 38 C6 44 24 20 00 4D 8B 40 08 E8 ?? ?? ?? ?? 48 8B 5C 24 60 48 83 C4 50 5F C3",
- "140000000",
- "145000000",
- WindowsApi.RegionPageProtection.PAGE_EXECUTE_READ
+ "PlayerNamePattern",
+ "48 8B 0D ?? ?? ?? ?? 48 8D 54 24 38 C6 44 24 20 00 E8 ?? ?? ?? ?? 48 8B 5C 24 70 48 8B 7C 24 60 48 83 C4 68 C3"
);
public BytePatternConfig MonsterPattern = new BytePatternConfig(
- "48 8B 05 ?? ?? ?? ?? 8B 48 ?? 89 8F ?? ?? ?? ??",
- "140000000",
- "145000000",
- WindowsApi.RegionPageProtection.PAGE_EXECUTE_READ
+ "MonsterPattern",
+ "48 8B 0D ?? ?? ?? ?? B2 01 E8 ?? ?? ?? ?? C6 83 ?? ?? ?? ?? ?? 48 8B 0D"
);
- public BytePatternConfig MonsterOffsetPattern = new BytePatternConfig(
- "48 8B 8B ?? ?? ?? ?? 48 8B 01 FF 50 ?? 48 8B 8B ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 8B ?? ?? ?? ?? B2 01 E8 ?? ?? ?? ??",
- "140000000",
- "145000000",
- WindowsApi.RegionPageProtection.PAGE_EXECUTE_READ
+ public BytePatternConfig PlayerBuffPattern = new BytePatternConfig(
+ "PlayerBuffPattern",
+ "48 8B 05 ?? ?? ?? ?? 41 8B 94 00 ?? ?? ?? ?? 89 57 ??"
);
- public BytePatternConfig PlayerBuffPattern = new BytePatternConfig(
- "48 8B 05 ?? ?? ?? ?? 41 8B 94 00 ?? ?? ?? ?? 89 51 ??",
- "140000000",
- "145000000",
- WindowsApi.RegionPageProtection.PAGE_EXECUTE_READ
+ public BytePatternConfig SelectedMonsterPattern = new BytePatternConfig(
+ "SelectedMonsterPattern",
+ "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 05 ?? ?? ?? ?? 83 A0 ?? ?? ?? ?? ?? C6 43 ?? ??"
+ );
+
+ public BytePatternConfig LobbyStatusPattern = new BytePatternConfig(
+ "LobbyStatusPattern",
+ "48 8B 0D ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 4E ?? F3 0F 10 86 ?? ?? ?? ?? F3 0F 58 86 ?? ?? ?? ?? F3 0F 11 86 ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8B 4E ??"
);
}
}
diff --git a/SmartHunter/Game/Config/MemorySource.cs b/SmartHunter/Game/Config/MemorySource.cs
new file mode 100644
index 00000000..4cca738f
--- /dev/null
+++ b/SmartHunter/Game/Config/MemorySource.cs
@@ -0,0 +1,9 @@
+namespace SmartHunter.Game.Config
+{
+ public enum MemorySource
+ {
+ Base,
+ Equipment,
+ Weapon,
+ }
+}
diff --git a/SmartHunter/Game/Config/MonsterConfig.cs b/SmartHunter/Game/Config/MonsterConfig.cs
index f9fa3fbb..6d5c2c59 100644
--- a/SmartHunter/Game/Config/MonsterConfig.cs
+++ b/SmartHunter/Game/Config/MonsterConfig.cs
@@ -1,4 +1,4 @@
-// Monster Size Differences
+// Monster Size Differences
// https://docs.google.com/spreadsheets/d/1zoRCvF4qKUZCgMGQw3vdtjVS-laX7-px6k1oPCJMg5E
// Monster Crown Sizes
@@ -13,14 +13,15 @@ public class MonsterConfig
public float BaseSize;
public float ScaleModifier = 1f;
public MonsterCrownConfig Crowns;
+ public bool isElder = false;
- public MonsterConfig(string nameStringId, MonsterPartConfig[] parts, float baseSize, float scaleModifier, MonsterCrownConfig crowns)
+ public MonsterConfig(string nameStringId, MonsterPartConfig[] parts, float baseSize, MonsterCrownConfig crowns, bool elder = false)
{
NameStringId = nameStringId;
Parts = parts;
BaseSize = baseSize;
- ScaleModifier = scaleModifier;
Crowns = crowns;
+ isElder = elder;
}
}
}
diff --git a/SmartHunter/Game/Config/MonsterCrownConfig.cs b/SmartHunter/Game/Config/MonsterCrownConfig.cs
index b3c1855b..44127d96 100644
--- a/SmartHunter/Game/Config/MonsterCrownConfig.cs
+++ b/SmartHunter/Game/Config/MonsterCrownConfig.cs
@@ -1,48 +1,40 @@
-using SmartHunter.Core;
+using System.ComponentModel;
namespace SmartHunter.Game.Config
{
- public enum CrownPreset
- {
- Standard,
- Alternate
- }
-
public class MonsterCrownConfig
{
- public float Mini = 0.9f;
- public float Silver = 1.15f;
- public float Gold = 1.23f;
-
- public MonsterCrownConfig()
- {
- }
+ public float Mini;
+ public float Silver;
+ public float Gold;
public MonsterCrownConfig(CrownPreset crownPreset)
{
- if (crownPreset == CrownPreset.Standard)
+ switch (crownPreset)
{
- Mini = 0.9f;
- Silver = 1.15f;
- Gold = 1.23f;
+ case CrownPreset.Standard:
+ Mini = 0.9f;
+ Silver = 1.15f;
+ Gold = 1.23f;
+ break;
+ case CrownPreset.Alternate:
+ Mini = 0.9f;
+ Silver = 1.1f;
+ Gold = 1.2f;
+ break;
+ case CrownPreset.Savage:
+ Mini = 0.99f;
+ Silver = 1.14f;
+ Gold = 1.2f;
+ break;
+ case CrownPreset.Rajang:
+ Mini = 0.9f;
+ Silver = 1.11f;
+ Gold = 1.18f;
+ break;
+ default:
+ throw new InvalidEnumArgumentException(nameof(crownPreset), (int)crownPreset, typeof(CrownPreset));
}
- else if (crownPreset == CrownPreset.Alternate)
- {
- Mini = 0.9f;
- Silver = 1.1f;
- Gold = 1.2f;
- }
- else
- {
- Log.WriteLine($"MonsterCrownConfig: Unhandled CrownPreset {crownPreset.ToString()}");
- }
- }
-
- public MonsterCrownConfig(float mini, float silver, float gold)
- {
- Mini = mini;
- Silver = silver;
- Gold = gold;
}
}
}
diff --git a/SmartHunter/Game/Config/MonsterDataConfig.cs b/SmartHunter/Game/Config/MonsterDataConfig.cs
index 01b34666..57bfaf93 100644
--- a/SmartHunter/Game/Config/MonsterDataConfig.cs
+++ b/SmartHunter/Game/Config/MonsterDataConfig.cs
@@ -1,332 +1,335 @@
-using System.Collections.Generic;
-using System.Linq;
+using System.Collections.Generic;
namespace SmartHunter.Game.Config
{
public class MonsterDataConfig
{
- static class PartTags
- {
- public static string[] RemovableTail = { "Tail", "Removable" };
- public static string[] Head = { "Head" };
- public static string[] Body = { "Body" };
- public static string[] Legs = { "Legs", "Limbs" };
- public static string[] Tail = { "Tail" };
- public static string[] Wings = { "Wings" };
- public static string[] Arms = { "Arms", "Limbs" };
- public static string[] Horns = { "Horns" };
- public static string[] RemovableHorns = { "Horns", "Removable" };
- public static string[] Limbs = { "Limbs" };
- public static string[] Mud = { "Mud" };
- }
-
- static class StatusEffectTags
- {
- public static string[] Poison = { "Poison", "Debuff" };
- public static string[] Paralysis = { "Paralysis", "Debuff" };
- public static string[] Sleep = { "Sleep", "Debuff" };
- public static string[] Blast = { "Blast", "Debuff" };
- public static string[] Mount = { "Mount", "Debuff" };
- public static string[] Exhaust = { "Exhaust", "Debuff" };
- public static string[] Stun = { "Stun", "Debuff" };
- public static string[] Tranquilize = { "Tranquilize", "Debuff" };
- public static string[] Flash = { "Flash", "Debuff" };
- public static string[] Dung = { "Dung", "Debuff" };
- public static string[] ShockTrap = { "ShockTrap", "Debuff" };
- public static string[] PitfallTrap = { "PitfallTrap", "Debuff" };
- public static string[] Elderseal = { "Elderseal", "Debuff" };
- public static string[] Rage = { "Rage", "Behavior" };
- public static string[] Fatigue = { "Fatigue", "Behavior" };
- }
-
public Dictionary Monsters = new Dictionary()
{
{
- "em100_00",
- new MonsterConfig("LOC_MONSTER_ANJANATH",
+ "em001_00", // true
+ new MonsterConfig("LOC_MONSTER_RATHIAN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1646.46f, 1f,
- new MonsterCrownConfig(CrownPreset.Alternate)
+ 1754.37f,
+ new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em002_01",
- new MonsterConfig("LOC_MONSTER_AZURE_RATHALOS",
+ "em001_01", // true
+ new MonsterConfig("LOC_MONSTER_PINK_RATHIAN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1704.22f, 1f,
+ 1754.37f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em044_00",
- new MonsterConfig("LOC_MONSTER_BARROTH",
+ {
+ "em001_02", // true
+ new MonsterConfig("LOC_MONSTER_GOLD_RATHIAN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_HEAD_MUD", PartTags.Head.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_BODY_MUD", PartTags.Body.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_ARMS_MUD", PartTags.Arms.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_LEFT_MUD", PartTags.Legs.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT_MUD", PartTags.Legs.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_TAIL_MUD", PartTags.Tail.Union(PartTags.Mud)),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1383.07f, 0.81f,
+ 1754.37f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em118_00",
- new MonsterConfig("LOC_MONSTER_BAZELGEUSE",
+ "em002_00", // true
+ new MonsterConfig("LOC_MONSTER_RATHALOS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1928.38f, 1.1f,
+ 1704.22f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em121_00",
- new MonsterConfig("LOC_MONSTER_BEHEMOTH",
+ "em002_01", // true
+ new MonsterConfig("LOC_MONSTER_AZURE_RATHALOS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HORNS", PartTags.Horns),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARM_LEFT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_ARM_RIGHT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 3423.65f, 1f,
- null
+ 1704.22f,
+ new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em007_01",
- new MonsterConfig("LOC_MONSTER_BLACK_DIABLOS",
+ {
+ "em002_02", // true
+ new MonsterConfig("LOC_MONSTER_SILVER_RATHALOS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 2096.25f, 1.2f,
+ 1704.22f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em043_00",
- new MonsterConfig("LOC_MONSTER_DEVILJHO",
+ "em007_00", // true
+ new MonsterConfig("LOC_MONSTER_DIABLOS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_CHEST", PartTags.Body),
- new MonsterPartConfig("LOC_PART_REAR", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 2063.82f, 1f,
- new MonsterCrownConfig(CrownPreset.Alternate)
+ 2096.25f,
+ new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em007_00",
- new MonsterConfig("LOC_MONSTER_DIABLOS",
+ "em007_01", // true
+ new MonsterConfig("LOC_MONSTER_BLACK_DIABLOS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 2096.25f, 1.2f,
+ 2096.25f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em116_00",
- new MonsterConfig("LOC_MONSTER_DODOGAMA",
+ "em011_00", // true
+ new MonsterConfig("LOC_MONSTER_KIRIN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS")
},
- 1111.11f, 1f,
- new MonsterCrownConfig(CrownPreset.Standard)
+ 536.26f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
)
},
- {
- "em112_00",
- new MonsterConfig("LOC_MONSTER_GREAT_GIRROS",
+ { // true
+ "em018_00",
+ new MonsterConfig("LOC_MONSTER_YIAN_GARUGA",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1053.15f, 0.9f,
+ 1389.01f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em101_00",
- new MonsterConfig("LOC_MONSTER_GREAT_JAGRAS",
+ { // true
+ "em018_05",
+ new MonsterConfig("LOC_MONSTER_SCARRED_YIAN_GARUGA",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_ABDOMEN", PartTags.Body),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1109.66f, 1f,
+ 1389.01f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em108_00",
- new MonsterConfig("LOC_MONSTER_JYURATODUS",
+ { // true
+ "em023_00",
+ new MonsterConfig("LOC_MONSTER_RAJANG",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_HEAD_MUD", PartTags.Head.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_BODY_MUD", PartTags.Body.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_LEG_LEFT_MUD", PartTags.Legs.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT_MUD", PartTags.Legs.Union(PartTags.Mud)),
- new MonsterPartConfig("LOC_PART_TAIL_MUD", PartTags.Tail.Union(PartTags.Mud)),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Removable", "LOC_PART_UKNOWN", true),
},
- 1508.71f, 1f,
- new MonsterCrownConfig(CrownPreset.Standard)
+ 829.11f,
+ new MonsterCrownConfig(CrownPreset.Rajang)
)
},
{
- "em011_00",
- new MonsterConfig("LOC_MONSTER_KIRIN",
+ "em023_05",
+ new MonsterConfig("LOC_MONSTER_FURIOUS_RAJANG",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS_2", true),
+ new MonsterPartConfig("Removable", "LOC_PART_UKNOWN", true),
},
- 536.26f, 1f,
- new MonsterCrownConfig(CrownPreset.Standard)
+ 829.11f,
+ new MonsterCrownConfig(CrownPreset.Rajang)
)
},
- {
- "em107_00",
- new MonsterConfig("LOC_MONSTER_KULU_YA_KU",
+ { // true
+ "em024_00",
+ new MonsterConfig("LOC_MONSTER_KUSHALA_DAORA",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_ROCK", PartTags.Body), // TODO: Tag?
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_LIMBS_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LIMBS_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS")
},
- 901.24f, 0.9f,
- new MonsterCrownConfig(CrownPreset.Standard)
+ 1913.13f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
+ { // true
+ "em026_00",
+ new MonsterConfig("LOC_MONSTER_LUNASTRA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LIMBS"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1828.69f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
+ { // true
+ "em027_00",
+ new MonsterConfig("LOC_MONSTER_TEOSTRA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1790.15f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
)
},
{
- "em117_00",
- new MonsterConfig("LOC_MONSTER_KULVE_TAROTH",
+ "em032_00",
+ new MonsterConfig("LOC_MONSTER_TIGREX",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_HORNS", PartTags.RemovableHorns, true),
- new MonsterPartConfig("LOC_REMOVABLE_PART_HORNS_2", PartTags.RemovableHorns, true),
- new MonsterPartConfig("LOC_PART_HORNS", PartTags.Horns),
- new MonsterPartConfig("LOC_PART_CHEST", PartTags.Body),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LIMBS_LEFT", PartTags.Limbs),
- new MonsterPartConfig("LOC_PART_LIMBS_RIGHT", PartTags.Limbs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_HORNS_GOLD", PartTags.Horns),
- new MonsterPartConfig("LOC_PART_MANE_GOLD", PartTags.Body),
- new MonsterPartConfig("LOC_PART_CHEST_LEFT_GOLD", PartTags.Body),
- new MonsterPartConfig("LOC_PART_CHEST_RIGHT_GOLD", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARM_LEFT_GOLD", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_ARM_RIGHT_GOLD", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEG_LEFT_GOLD", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT_GOLD", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL_LEFT_GOLD", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_TAIL_RIGHT_GOLD", PartTags.Tail),
- },
- 4573.25f, 1f,
- null
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1943.2f,
+ new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em024_00",
- new MonsterConfig("LOC_MONSTER_KUSHALA_DAORA",
+ "em032_01",
+ new MonsterConfig("LOC_MONSTER_BRUTE_TIGREX",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_LIMBS_LEFT", PartTags.Limbs),
- new MonsterPartConfig("LOC_PART_LIMBS_RIGHT", PartTags.Limbs),
- new MonsterPartConfig("LOC_PART_WINGS", PartTags.Wings),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1913.13f, 0.85f,
+ 1943.2f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
@@ -335,381 +338,1011 @@ static class StatusEffectTags
new MonsterConfig("LOC_MONSTER_LAVASIOTH",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ABDOMEN", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ABDOMEN"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1797.24f, 1.2f,
+ 1797.24f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em111_00",
- new MonsterConfig("LOC_MONSTER_LEGIANA",
+ { // true
+ "em037_00",
+ new MonsterConfig("LOC_MONSTER_NARGACUGA",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1699.75f, 0.9f,
+ 1914.74f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em026_00",
- new MonsterConfig("LOC_MONSTER_LUNASTRA",
+ { // true
+ "em042_00",
+ new MonsterConfig("LOC_MONSTER_BARIOTH",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LIMBS", PartTags.Limbs),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1828.69f, 0.85f,
+ 2098.3f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em103_00",
- new MonsterConfig("LOC_MONSTER_NERGIGANTE",
+ { // true
+ "em043_00",
+ new MonsterConfig("LOC_MONSTER_DEVILJHO",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HORNS", PartTags.Horns),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARM_LEFT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_ARM_RIGHT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST"),
+ new MonsterPartConfig("Part", "LOC_PART_REAR"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1848.12f, 1f,
+ 2063.82f,
+ new MonsterCrownConfig(CrownPreset.Alternate)
+ )
+ },
+ { // true
+ "em043_05",
+ new MonsterConfig("LOC_MONSTER_SAVAGE_DEVILJHO",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST"),
+ new MonsterPartConfig("Part", "LOC_PART_REAR"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 2063.82f,
+ new MonsterCrownConfig(CrownPreset.Savage)
+ )
+ },
+ { // true
+ "em044_00",
+ new MonsterConfig("LOC_MONSTER_BARROTH",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HEAD", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL_MUD")
+ },
+ 1383.07f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em113_00",
- new MonsterConfig("LOC_MONSTER_ODOGARON",
+ { // true
+ "em045_00",
+ new MonsterConfig("LOC_MONSTER_URAGAAN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_JAW"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1388.75f, 1.15f,
+ 2058.63f,
+ new MonsterCrownConfig(CrownPreset.Alternate)
+ )
+ },
+ { // true
+ "em057_00",
+ new MonsterConfig("LOC_MONSTER_ZINOGRE",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1743.49f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em110_00",
- new MonsterConfig("LOC_MONSTER_PAOLUMU",
+ { // true
+ "em063_00",
+ new MonsterConfig("LOC_MONSTER_BRACHYDIOS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BALLOON", PartTags.Body),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1143.36f, 1.05f,
+ 1630.55f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
- "em001_01",
- new MonsterConfig("LOC_MONSTER_PINK_RATHIAN",
+ "em063_05",
+ new MonsterConfig("LOC_MONSTER_RAGING_BRACHYDIOS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
},
- 1754.37f, 1f,
+ 2282.77f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
{
+ "em057_01",
+ new MonsterConfig("LOC_MONSTER_STYGIAN_ZINOGRE",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1743.49f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em080_00",
+ new MonsterConfig("LOC_MONSTER_GLAVENUS",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_FIN"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 2461.5f,
+ new MonsterCrownConfig(CrownPreset.Alternate)
+ )
+ },
+ { // true
+ "em080_01",
+ new MonsterConfig("LOC_MONSTER_ACIDIC_GLAVENUS",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_FIN"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 2372.44f,
+ new MonsterCrownConfig(CrownPreset.Alternate)
+ )
+ },
+ { // true
+ "em100_00",
+ new MonsterConfig("LOC_MONSTER_ANJANATH",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1646.46f,
+ new MonsterCrownConfig(CrownPreset.Alternate)
+ )
+ },
+ { // true
+ "em100_01",
+ new MonsterConfig("LOC_MONSTER_ANJANATH_FULGUR",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1646.46f,
+ new MonsterCrownConfig(CrownPreset.Alternate)
+ )
+ },
+ { // true
+ "em101_00",
+ new MonsterConfig("LOC_MONSTER_GREAT_JAGRAS",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_ABDOMEN")
+ },
+ 1109.66f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
"em102_00",
new MonsterConfig("LOC_MONSTER_PUKEI_PUKEI",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1102.45f, 1f,
+ 1102.45f,
new MonsterCrownConfig(CrownPreset.Alternate)
)
},
- {
- "em114_00",
- new MonsterConfig("LOC_MONSTER_RADOBAAN",
+ { // true
+ "em102_01",
+ new MonsterConfig("LOC_MONSTER_PUKEI_PUKEI_CORAL",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_JAW", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BACK", PartTags.Body),
- new MonsterPartConfig("LOC_PART_BONE_LEFT", PartTags.Body),
- new MonsterPartConfig("LOC_PART_BONE_RIGHT", PartTags.Body),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1803.47f, 0.9f,
+ 1102.45f,
new MonsterCrownConfig(CrownPreset.Alternate)
)
},
+ { // true
+ "em103_00",
+ new MonsterConfig("LOC_MONSTER_NERGIGANTE",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HORNS"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1848.12f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
+ { // true
+ "em103_05",
+ new MonsterConfig("LOC_MONSTER_RUINER_NERGIGANTE",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HORNS"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1848.12f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
{
- "em002_00",
- new MonsterConfig("LOC_MONSTER_RATHALOS",
+ "em104_00",
+ new MonsterConfig("LOC_MONSTER_SAFI_JIIVA",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ABDOMEN"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_NECK"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
},
- 1704.22f, 1f,
+ 4799.78f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em001_00",
- new MonsterConfig("LOC_MONSTER_RATHIAN",
+ { // true
+ "em105_00",
+ new MonsterConfig("LOC_MONSTER_XENO_JIIVA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_NECK"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST"),
+ new MonsterPartConfig("Part", "LOC_PART_HAND_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_HAND_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_FOOT_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_FOOT_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 4509.1f,
+ null,
+ true
+ )
+ },
+ { // true
+ "em106_00",
+ new MonsterConfig("LOC_MONSTER_ZORAH_MAGDAROS",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_SHELL"),
+ new MonsterPartConfig("Part", "LOC_PART_EXHAUST_ORGAN_CENTRAL"),
+ new MonsterPartConfig("Part", "LOC_PART_EXHAUST_ORGAN_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_EXHAUST_ORGAN_CRATER"),
+ new MonsterPartConfig("Part", "LOC_PART_EXHAUST_ORGAN_REAR"),
+ new MonsterPartConfig("Part", "LOC_PART_WEAK_SHELL_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WEAK_SHELL_RIGHT")
+ },
+ 25764.59f,
+ null,
+ true
+ )
+ },
+ { // true
+ "em107_00",
+ new MonsterConfig("LOC_MONSTER_KULU_YA_KU",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WING_LEFT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_WING_RIGHT", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_ROCK")
},
- 1754.37f, 1f,
+ 901.24f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em027_00",
- new MonsterConfig("LOC_MONSTER_TEOSTRA",
+ { // true
+ "em108_00",
+ new MonsterConfig("LOC_MONSTER_JYURATODUS",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_WINGS", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT_MUD"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL_MUD")
},
- 1790.15f, 0.85f,
+ 1508.71f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
+ { // true
"em109_00",
new MonsterConfig("LOC_MONSTER_TOBI_KADACHI",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_MANE", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ABDOMEN", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_MANE"),
+ new MonsterPartConfig("Part", "LOC_PART_ABDOMEN"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 1300.52f, 1f,
+ 1300.52f,
new MonsterCrownConfig(CrownPreset.Alternate)
)
},
- {
- "em120_00",
- new MonsterConfig("LOC_MONSTER_TZITZI_YA_KU",
+ { // true
+ "em109_01",
+ new MonsterConfig("LOC_MONSTER_VIPER_TOBI_KADACHI",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_MANE"),
+ new MonsterPartConfig("Part", "LOC_PART_ABDOMEN"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1300.52f,
+ new MonsterCrownConfig(CrownPreset.Alternate)
+ )
+ },
+ { // true
+ "em110_00",
+ new MonsterConfig("LOC_MONSTER_PAOLUMU",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD_LEFT", PartTags.Head),
- new MonsterPartConfig("LOC_PART_HEAD_RIGHT", PartTags.Head),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_BALOON", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BALLOON"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 894.04f, 0.9f,
+ 1143.36f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em045_00",
- new MonsterConfig("LOC_MONSTER_URAGAAN",
+ { // true
+ "em110_01",
+ new MonsterConfig("LOC_MONSTER_PAOLUMU_NIGHTSHADE",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_BALOON", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BALLOON"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1143.36f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em111_00",
+ new MonsterConfig("LOC_MONSTER_LEGIANA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1699.75f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em111_05",
+ new MonsterConfig("LOC_MONSTER_SHRIEKING_LEGIANA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1831.69f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em112_00",
+ new MonsterConfig("LOC_MONSTER_GREAT_GIRROS",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1053.15f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em113_00",
+ new MonsterConfig("LOC_MONSTER_ODOGARON",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1388.75f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em113_01",
+ new MonsterConfig("LOC_MONSTER_EBONY_ODOGARON",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1388.75f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em114_00",
+ new MonsterConfig("LOC_MONSTER_RADOBAAN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_JAW", PartTags.Head),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_JAW"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_BONE_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_BONE_RIGHT")
},
- 2058.63f, 1f,
+ 1803.47f,
new MonsterCrownConfig(CrownPreset.Alternate)
)
},
- {
+ { // true
"em115_00",
new MonsterConfig("LOC_MONSTER_VAAL_HAZAK",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BACK", PartTags.Body),
- new MonsterPartConfig("LOC_PART_CHEST", PartTags.Body),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_ARM_LEFT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_ARM_RIGHT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_WINGS", PartTags.Wings),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS")
},
- 2095.4f, 0.9f,
+ 2095.4f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
+ { // true
+ "em115_05",
+ new MonsterConfig("LOC_MONSTER_BLACKVEIL_VAAL_HAZAK",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS")
+ },
+ 2095.4f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
+ { // true
+ "em116_00",
+ new MonsterConfig("LOC_MONSTER_DODOGAMA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1111.11f,
new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
- "em105_00",
- new MonsterConfig("LOC_MONSTER_XENO_JIIVA",
+ { // true
+ "em117_00",
+ new MonsterConfig("LOC_MONSTER_KULVE_TAROTH",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_TAIL", PartTags.RemovableTail, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_NECK", PartTags.Body),
- new MonsterPartConfig("LOC_PART_BACK", PartTags.Body),
- new MonsterPartConfig("LOC_PART_CHEST", PartTags.Body),
- new MonsterPartConfig("LOC_PART_HAND_LEFT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_HAND_RIGHT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_FOOT_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_FOOT_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_WINGS", PartTags.Wings),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS_2", true),
+ new MonsterPartConfig("Part", "LOC_PART_HORNS"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LIMBS_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LIMBS_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_HORNS_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_MANE_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST_LEFT_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_CHEST_RIGHT_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL_LEFT_GOLD"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL_RIGHT_GOLD")
},
- 4509.1f, 1f,
- null
+ 4573.25f,
+ null,
+ true
)
},
- {
- "em106_00",
- new MonsterConfig("LOC_MONSTER_ZORAH_MAGDAROS",
+ { // true
+ "em118_00",
+ new MonsterConfig("LOC_MONSTER_BAZELGEUSE",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_CHEST", PartTags.Body),
- new MonsterPartConfig("LOC_PART_ARM_LEFT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_ARM_RIGHT", PartTags.Arms),
- new MonsterPartConfig("LOC_PART_LEG_LEFT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_LEG_RIGHT", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_TAIL", PartTags.Tail),
- new MonsterPartConfig("LOC_PART_SHELL", PartTags.Body),
- new MonsterPartConfig("LOC_PART_EXHAUST_ORGAN_CENTRAL", PartTags.Body),
- new MonsterPartConfig("LOC_PART_EXHAUST_ORGAN_HEAD", PartTags.Body),
- new MonsterPartConfig("LOC_PART_EXHAUST_ORGAN_CRATER", PartTags.Body),
- new MonsterPartConfig("LOC_PART_EXHAUST_ORGAN_REAR", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WEAK_SHELL_LEFT", PartTags.Body),
- new MonsterPartConfig("LOC_PART_WEAK_SHELL_RIGHT", PartTags.Body),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
},
- 25764.59f, 1f,
- null
+ 1928.38f,
+ new MonsterCrownConfig(CrownPreset.Standard)
)
},
- {
+ { // true
+ "em118_05",
+ new MonsterConfig("LOC_MONSTER_SEETHING_BAZELGEUSE",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 1928.38f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em120_00",
+ new MonsterConfig("LOC_MONSTER_TZITZI_YA_KU",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Part", "LOC_PART_HEAD_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 894.04f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em121_00",
+ new MonsterConfig("LOC_MONSTER_BEHEMOTH",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HORNS"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 3423.65f,
+ null,
+ true
+ )
+ },
+ { // true
+ "em122_00",
+ new MonsterConfig("LOC_MONSTER_BEOTODUS",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD_SNOW"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY_SNOW"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL_SNOW")
+ },
+ 1661.99f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em123_00",
+ new MonsterConfig("LOC_MONSTER_BANBARO",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HORNS", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HORNS"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_LEG_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 2404.84f,
+ new MonsterCrownConfig(CrownPreset.Standard)
+ )
+ },
+ { // true
+ "em124_00",
+ new MonsterConfig("LOC_MONSTER_VELKHANA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD_ICE"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY_ICE"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS_ICE"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS_ICE"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS_ICE"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL_ICE")
+ },
+ 2596.05f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
+ { // true
+ "em125_00",
+ new MonsterConfig("LOC_MONSTER_NAMIELLE",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_TAIL", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BACK"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_WINGS")
+ },
+ 2048.25f,
+ new MonsterCrownConfig(CrownPreset.Standard),
+ true
+ )
+ },
+ { // true
+ "em126_00",
+ new MonsterConfig("LOC_MONSTER_SHARA_ISHVALDA",
+ new MonsterPartConfig[]
+ {
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_HEAD", true),
+ new MonsterPartConfig("Part", "LOC_PART_NECK_LEFT_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_NECK_RIGHT_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS_ROCK"),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_WING_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_LEFT"),
+ new MonsterPartConfig("Part", "LOC_PART_ARM_RIGHT"),
+ new MonsterPartConfig("Part", "LOC_PART_TAIL")
+ },
+ 2910.91f,
+ null,
+ true
+ )
+ },
+ { // true
"em127_00",
new MonsterConfig("LOC_MONSTER_LESHEN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_ANTLER_LEFT", PartTags.RemovableHorns, true),
- new MonsterPartConfig("LOC_REMOVABLE_PART_ANTLER_RIGHT", PartTags.RemovableHorns, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_ANTLER_LEFT", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_ANTLER_RIGHT", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_4"),
+ new MonsterPartConfig("Part", "LOC_5"),
+ new MonsterPartConfig("Part", "LOC_JAGRAS_SUMMONER")
},
- 549.70f, 1f,
- null
+ 549.70f,
+ null,
+ true
)
},
- {
+ { // true
"em127_01",
new MonsterConfig("LOC_MONSTER_ANCIENT_LESHEN",
new MonsterPartConfig[]
{
- new MonsterPartConfig("LOC_REMOVABLE_PART_ANTLER_LEFT", PartTags.RemovableHorns, true),
- new MonsterPartConfig("LOC_REMOVABLE_PART_ANTLER_RIGHT", PartTags.RemovableHorns, true),
- new MonsterPartConfig("LOC_PART_HEAD", PartTags.Head),
- new MonsterPartConfig("LOC_PART_BODY", PartTags.Body),
- new MonsterPartConfig("LOC_PART_LEGS", PartTags.Legs),
- new MonsterPartConfig("LOC_PART_ARMS", PartTags.Arms),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_ANTLER_LEFT", true),
+ new MonsterPartConfig("Removable", "LOC_REMOVABLE_PART_ANTLER_RIGHT", true),
+ new MonsterPartConfig("Part", "LOC_PART_HEAD"),
+ new MonsterPartConfig("Part", "LOC_PART_BODY"),
+ new MonsterPartConfig("Part", "LOC_PART_LEGS"),
+ new MonsterPartConfig("Part", "LOC_PART_ARMS"),
+ new MonsterPartConfig("Part", "LOC_4"),
+ new MonsterPartConfig("Part", "LOC_5"),
+ new MonsterPartConfig("Part", "LOC_JAGRAS_SUMMONER")
},
- 549.70f, 1f,
- null
+ 633.81f,
+ null,
+ true
)
}
};
-
+ /*
public MonsterStatusEffectConfig[] StatusEffects =
{
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_POISON", StatusEffectTags.Poison, "08", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_PARALYSIS", StatusEffectTags.Paralysis, "10", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_SLEEP", StatusEffectTags.Sleep, "18", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_BLAST", StatusEffectTags.Blast, "20", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_MOUNT", StatusEffectTags.Mount, "28", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_EXHAUST", StatusEffectTags.Exhaust, "30", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_STUN", StatusEffectTags.Stun, "38", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_TRANQUILIZE", StatusEffectTags.Tranquilize, "40", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_FLASH", StatusEffectTags.Flash, "48", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_DUNG", StatusEffectTags.Dung, "58", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_SHOCK_TRAP", StatusEffectTags.ShockTrap, "68", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_PITFALL_TRAP", StatusEffectTags.PitfallTrap, "70", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_ELDERSEAL", StatusEffectTags.Elderseal, "88", "15C", "178", "17C", "1A4", "1A8"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_RAGE", StatusEffectTags.Rage, null, "190", "180", "1A0", "18C", "198"),
- new MonsterStatusEffectConfig("LOC_STATUS_EFFECT_FATIGUE", StatusEffectTags.Fatigue, null, "42C", "420", "424", "430", null, true),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_POISON", "08", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_PARALYSIS", "10", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_SLEEP", "18", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_BLAST", "20", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_MOUNT", "28", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_EXHAUST", "30", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_STUN", "38", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_TRANQUILIZE", "40", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_FLASH", "48", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_KNOW_DOWN", "48", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_DUNG", "58", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_SHOCK_TRAP", "68", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_PITFALL_TRAP", "70", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_ELDERSEAL", "88", "15C", "178", "17C", "1A4", "1A8"),
+ new MonsterStatusEffectConfig("Rage", "LOC_STATUS_EFFECT_RAGE", null, "190", "180", "1A0", "18C", "198"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_FATIGUE", null, "42C", "420", "424", "430", null, true)
+ };
+ */
+
+ public MonsterStatusEffectConfig[] StatusEffects =
+ {
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_0"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_POISON"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_PARALYSIS"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_SLEEP"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_BLAST"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_MOUNT"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_EXHAUST"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_STUN"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_TRANQUILIZE"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_FLASH"), // 9
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_FLASH"), // 10
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_KNOW_DOWN"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_DUNG"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_13"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_SHOCK_TRAP"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_PITFALL_TRAP"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_16"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_17"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_ELDERSEAL"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_SMOKING"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_20"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_FELVYNE_KNOCK_DOWN_TRAP"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_CLAW_ATTACK", true),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_STATUS_EFFECT_VIOLATED"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_24"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_25"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_26"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_27"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_28"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_29"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_30"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_31"),
+ new MonsterStatusEffectConfig("StatusEffect", "LOC_PART_32"),
+
+ new MonsterStatusEffectConfig("Rage", "LOC_STATUS_EFFECT_RAGE"),
+ new MonsterStatusEffectConfig("Stamina", "LOC_STATUS_EFFECT_STAMINA"),
+ new MonsterStatusEffectConfig("Fatigue", "LOC_STATUS_EFFECT_FATIGUE"),
};
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Game/Config/MonsterPartConfig.cs b/SmartHunter/Game/Config/MonsterPartConfig.cs
index b548dd63..a69d7b6f 100644
--- a/SmartHunter/Game/Config/MonsterPartConfig.cs
+++ b/SmartHunter/Game/Config/MonsterPartConfig.cs
@@ -1,18 +1,15 @@
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SmartHunter.Game.Config
+namespace SmartHunter.Game.Config
{
public class MonsterPartConfig
{
+ public string GroupId;
public string StringId;
- public string[] Tags;
public bool IsRemovable;
- public MonsterPartConfig(string stringId, IEnumerable tags, bool isRemovable = false)
+ public MonsterPartConfig(string groupId, string stringId, bool isRemovable = false)
{
+ GroupId = groupId;
StringId = stringId;
- Tags = tags.ToArray();
IsRemovable = isRemovable;
}
}
diff --git a/SmartHunter/Game/Config/MonsterStatusEffectConfig.cs b/SmartHunter/Game/Config/MonsterStatusEffectConfig.cs
index 4ab81b6f..0854cd22 100644
--- a/SmartHunter/Game/Config/MonsterStatusEffectConfig.cs
+++ b/SmartHunter/Game/Config/MonsterStatusEffectConfig.cs
@@ -1,33 +1,20 @@
-using System.Collections.Generic;
-using System.Linq;
-
namespace SmartHunter.Game.Config
{
public class MonsterStatusEffectConfig
{
+ public string GroupId;
public string NameStringId;
- public string[] Tags;
- public string PointerOffset;
- public string MaxDurationOffset;
- public string CurrentBuildupOffset;
- public string MaxBuildupOffset;
- public string CurrentDurationOffset;
- public string TimesActivatedOffset;
+
public bool InvertBuildup;
public bool InvertDuration;
- public MonsterStatusEffectConfig(string nameStringId, IEnumerable tags, string pointerOffset, string maxDurationOffset, string currentBuildupOffset, string maxBuildupOffset, string currentDurationoffset, string timesActivatedOffset, bool invertBuildup = false, bool invertDuration = true)
+ public MonsterStatusEffectConfig(string groupId, string nameStringId, bool invertBuildup = false, bool invertDuration = true)
{
+ GroupId = groupId;
NameStringId = nameStringId;
- Tags = tags.ToArray();
- PointerOffset = pointerOffset;
- MaxDurationOffset = maxDurationOffset;
- CurrentBuildupOffset = currentBuildupOffset;
- MaxBuildupOffset = maxBuildupOffset;
- CurrentDurationOffset = currentDurationoffset;
- TimesActivatedOffset = timesActivatedOffset;
+
InvertBuildup = invertBuildup;
InvertDuration = invertDuration;
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Game/Config/MonsterWidgetConfig.cs b/SmartHunter/Game/Config/MonsterWidgetConfig.cs
index 93962b62..a2ecc9ab 100644
--- a/SmartHunter/Game/Config/MonsterWidgetConfig.cs
+++ b/SmartHunter/Game/Config/MonsterWidgetConfig.cs
@@ -1,44 +1,46 @@
-using SmartHunter.Core.Config;
-using System;
using System.Text.RegularExpressions;
+using SmartHunter.Core.Config;
namespace SmartHunter.Game.Config
{
public class MonsterWidgetConfig : WidgetConfig
{
// em[0-9]|ems[0-9]|gm[0-9]
- public string MonsterIdRegex = "em[0-9]";
- public string PartTagsRegex = ".*|Removable|Head|Body|Tail|Wings|Limbs|Arms|Legs|Horns|Mud";
- public string StatusEffectTagsRegex = ".*|Debuff|Behavior|Poison|Paralysis|Sleep|Blast|Mount|Exhaust|Stun|Tranquilize|Flash|Dung|ShockTrap|PitfallTrap|Elderseal|Rage|Fatigue";
+ public string IncludeMonsterIdRegex = "em[0-9]";
+ public string IncludePartGroupIdRegex = ".*";
+ public string IncludeStatusEffectGroupIdRegex = ".*";
public bool ShowUnchangedMonsters = true;
- public float HideMonstersAfterSeconds = 9999;
+ public float HideMonstersAfterSeconds = 999f;
public bool ShowUnchangedParts = false;
public float HidePartsAfterSeconds = 12f;
public bool ShowUnchangedStatusEffects = false;
public float HideStatusEffectsAfterSeconds = 12f;
+ public bool ShowSize = false;
public bool ShowCrown = true;
public bool ShowBars = true;
public bool ShowNumbers = true;
public bool ShowPercents = false;
+ public bool UseAnimations = false;
+ public bool ShowOnlySelectedMonster = false;
public MonsterWidgetConfig(float x, float y) : base(x, y)
{
}
- public bool MatchMonsterId(string monsterId)
+ public bool MatchIncludeMonsterIdRegex(string monsterId)
{
- return new Regex(MonsterIdRegex, RegexOptions.CultureInvariant).IsMatch(monsterId);
+ return new Regex(IncludeMonsterIdRegex).IsMatch(monsterId);
}
- public bool MatchPartTags(string[] tags)
+ public bool MatchIncludePartGroupIdRegex(string groupId)
{
- return new Regex(PartTagsRegex, RegexOptions.CultureInvariant).IsMatch(String.Join(" ", tags));
+ return new Regex(IncludePartGroupIdRegex).IsMatch(groupId);
}
- public bool MatchStatusEffectTags(string[] tags)
+ public bool MatchIncludeStatusEffectGroupIdRegex(string groupId)
{
- return new Regex(StatusEffectTagsRegex, RegexOptions.CultureInvariant).IsMatch(String.Join(" ", tags));
+ return new Regex(IncludeStatusEffectGroupIdRegex).IsMatch(groupId);
}
}
}
diff --git a/SmartHunter/Game/Config/OverlayConfig.cs b/SmartHunter/Game/Config/OverlayConfig.cs
index 955fd227..cc708ba1 100644
--- a/SmartHunter/Game/Config/OverlayConfig.cs
+++ b/SmartHunter/Game/Config/OverlayConfig.cs
@@ -1,4 +1,4 @@
-namespace SmartHunter.Game.Config
+namespace SmartHunter.Game.Config
{
public class OverlayConfig
{
@@ -7,10 +7,10 @@ public class OverlayConfig
public float ScaleStep = 0.1f;
public bool HideWhenGameWindowIsInactive = false;
public int UpdatesPerSecond = 20;
- public bool ShowWindows = false;
public TeamWidgetConfig TeamWidget = new TeamWidgetConfig(220, 220);
public MonsterWidgetConfig MonsterWidget = new MonsterWidgetConfig(320, 120);
public PlayerWidgetConfig PlayerWidget = new PlayerWidgetConfig(120, 320);
+ public DebugWidgetConfig DebugWidget = new DebugWidgetConfig(120, 320);
}
}
diff --git a/SmartHunter/Game/Config/PlayerDataConfig.cs b/SmartHunter/Game/Config/PlayerDataConfig.cs
index 69353988..c000abb9 100644
--- a/SmartHunter/Game/Config/PlayerDataConfig.cs
+++ b/SmartHunter/Game/Config/PlayerDataConfig.cs
@@ -1,137 +1,203 @@
-namespace SmartHunter.Game.Config
+using SmartHunter.Game.Data;
+
+namespace SmartHunter.Game.Config
{
public class PlayerDataConfig
{
- static class StatusEffectTags
+ private static string indexToHexStr(int index, ulong baseOffset)
{
- public static string[] Buff = { "Buff" };
- public static string[] Debuff = { "Debuff" };
- public static string[] HuntingHorn = { "HuntingHorn", "Buff" };
- public static string[] CoralOrchestra = { "CoralOrchestra", "Buff" };
- public static string[] Equipment = { "Equipment", "Buff" };
- public static string[] Weapon = { "Weapon", "Buff" };
+ var prefix = "";
+ if (index < 0)
+ {
+ index = (-1) * index;
+ prefix = "-";
+ }
+ ulong multiplier = 0x4;
+ var hex = baseOffset + (multiplier * (ulong)index);
+ return $"{prefix}{hex.ToString("X")}";
}
+ private static string indexToHexStrMantles(int index) => indexToHexStr(index, 0xEFC);
+ private static string indexToHexStrMantlesRecharging(int index) => indexToHexStr(index, 0xEAC);
+ private static string indexToHexStrNoOffset(int index) => indexToHexStr(index, 0x0);
+
public StatusEffectConfig[] StatusEffects =
{
- new StatusEffectConfig("LOC_STATUS_EFFECT_SELF_IMPROVEMENT", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "38"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ATTACK_UP_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "3C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ATTACK_UP_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "40"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_HEALTH_BOOST_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "44"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_HEALTH_BOOST_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "48"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_STAMINA_USE_REDUCED_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "4C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_STAMINA_USE_REDUCED_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "50"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_WIND_PRESSURE_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "54"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ALL_WIND_PRESSURE_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "58"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DEFENSE_UP_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "5C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DEFENSE_UP_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "60"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_TOOL_USE_DRAIN_REDUCED_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "64"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_TOOL_USE_DRAIN_REDUCED_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "68"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_HEALTH_RECOVERY_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "80"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_HEALTH_RECOVERY_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "84"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_EARPLUGS_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "88"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_EARPLUGS_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "8C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DIVINE_PROTECTION", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "90"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_SCOUTFLY_POWER_UP", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "94"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ENVIRONMENTAL_DAMAGE_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "98"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_STUN_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "9C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_PARALYSIS_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "A0"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_TREMORS_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "A4"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_MUCK_RESISTANCE", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "A8"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_FIRE_RESISTANCE_BOOST_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "AC"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_FIRE_RESISTANCE_BOOST_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "B0"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_WATER_RESISTANCE_BOOST_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "B4"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_WATER_RESISTANCE_BOOST_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "B8"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_THUNDER_RESISTANCE_BOOST_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "BC"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_THUNDER_RESISTANCE_BOOST_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "C0"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ICE_RESISTANCE_BOOST_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "C4"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ICE_RESISTANCE_BOOST_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "C8"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DRAGON_RESISTANCE_BOOST_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "CC"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DRAGON_RESISTANCE_BOOST_L", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "D0"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ELEMENTAL_ATTACK_BOOST", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "D4"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_BLIGHT_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "D8"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_KNOCKBACKS_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "E4"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ELEMENTAL_RESISTANCE_UP", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "EC"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_AFFINITY_UP", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "F0"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ALL_AILMENTS_NEGATED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "F4"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_WIND_PRESSURE_NEGATED_AND_EARPLUGS_S", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "F8"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ABNORMAL_STATUS_ATTACK_INCREASED", StatusEffectTags.HuntingHorn, StatusEffectConfig.MemorySource.Base, "FC"),
-
- new StatusEffectConfig("LOC_STATUS_EFFECT_ATTACK_UP_S", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "104"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ATTACK_UP_L", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "108"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DEFENSE_UP_S", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "10C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DEFENSE_UP_L", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "110"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_AFFINITY_UP", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "114"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_HEALTH_RECOVERY", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "118"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_HEALTH_BOOST", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "11C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_STAMINA_USE_REDUCED", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "120"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DIVINE_PROTECTION", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "128"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_STUN_NEGATED", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "130"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_PARALYSIS_NEGATED", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "134"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_TREMORS_NEGATED", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "138"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_EARPLUGS_S", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "13C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_WIND_PRESSURE_NEGATED", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "140"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ENVIRONMENTAL_DAMAGE_NEGATED", StatusEffectTags.CoralOrchestra, StatusEffectConfig.MemorySource.Base, "144"),
-
- new StatusEffectConfig("LOC_STATUS_EFFECT_POISON", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "554"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_FIREBLIGHT", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "55C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_THUNDERBLIGHT", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "560"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_WATERBLIGHT", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "564"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ICEBLIGHT", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "568"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DRAGONBLIGHT", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "56C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_BLEEDING", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "570"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_BLEEDING_RECOVERY", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "574"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_EFFLUVIA", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "578"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DEFENSE_DOWN", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "57C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ELEMENTAL_RESISTANCE_DOWN", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "584"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_NO_ITEMS", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "58C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_BLASTBLIGHT", StatusEffectTags.Debuff, StatusEffectConfig.MemorySource.Base, "590"),
-
- new StatusEffectConfig("LOC_STATUS_EFFECT_DASH_JUICE", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5B8"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_WIGGLY_LITCHI", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5BC"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_IMMUNIZER", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5C0"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_MIGHT_PILL", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5C8", new MemoryConditionConfig((byte)1, "5D0")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_MIGHT_SEED", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5C8", new MemoryConditionConfig((byte)0, "5D0")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ADAMANT_PILL", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5D8", new MemoryConditionConfig((byte)1, "5E4")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ADAMANT_SEED", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5D8", new MemoryConditionConfig((byte)0, "5E4")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DEMON_POWDER", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5EC"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_HARDSHELL_POWDER", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "5F0"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_DEMONDRUG", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, null, new MemoryConditionConfig(1, "5FC")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_MEGA_DEMONDRUG", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, null, new MemoryConditionConfig(2, "5FC")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_ARMORSKIN", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, null, new MemoryConditionConfig(1, "600")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_MEGA_ARMORSKIN", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, null, new MemoryConditionConfig(2, "600")),
- new StatusEffectConfig("LOC_STATUS_EFFECT_COOL_DRINK", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "60C"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_PROTECTIVE_POLISH", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "644"),
- new StatusEffectConfig("LOC_STATUS_EFFECT_AFFINITY_SLIDING", StatusEffectTags.Buff, StatusEffectConfig.MemorySource.Base, "648"),
-
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_GHILLIE", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "A8C"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_TEMPORAL", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "A90"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_ROCKSTEADY", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "A98"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_CHALLENGER", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "A9C"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_VITALITY", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AA0"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_FIREPROOF", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AA4"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_WATERPROOF", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AA8"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_ICEPROOF", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AAC"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_THUNDERPROOF", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AB0"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_DRAGONPROOF", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AB4"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_GLIDER", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "ABC"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_EVASION", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AC0"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_IMPACT", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AC4"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_APOTHECARY", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AC8"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_IMMUNITY", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "ACC"),
- new StatusEffectConfig("LOC_EQUIPMENT_MANTLE_BANDIT", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AD4"),
- new StatusEffectConfig("LOC_EQUIPMENT_ASSASSINS_HOOD", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "AD8"),
- new StatusEffectConfig("LOC_EQUIPMENT_AFFINITY_BOOSTER", StatusEffectTags.Equipment, StatusEffectConfig.MemorySource.Equipment, "B68"),
-
- new StatusEffectConfig("LOC_WEAPON_INSECT_GLAIVE_ATTACK", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "1FE8", new MemoryConditionConfig(".*rod[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_INSECT_GLAIVE_SPEED", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "1FEC", new MemoryConditionConfig(".*rod[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_INSECT_GLAIVE_DEFENSE", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "1FF0", new MemoryConditionConfig(".*rod[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_LONGSWORD_SPIRIT_GAUGE_REGEN", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "1FF8", new MemoryConditionConfig(".*swo[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_LONGSWORD_STEADY_SPIRIT_LEVEL", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "2008", new MemoryConditionConfig(".*swo[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_CHARGE_BLADE_SHIELD_CHARGE", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "1FF8", new MemoryConditionConfig(".*caxe[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_CHARGE_BLADE_BLADE_CHARGE", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "1FFC", new MemoryConditionConfig(".*caxe[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_SWITCH_AXE_AMPED_STATE", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, "1FD4", new MemoryConditionConfig(".*saxe[0-9]", "290", "3E0", "10")),
- new StatusEffectConfig("LOC_WEAPON_HAMMER_POWER_CHARGE", StatusEffectTags.Weapon, StatusEffectConfig.MemorySource.Weapon, null, new MemoryConditionConfig((byte)1, "1FC4"), new MemoryConditionConfig(".*ham[0-9]", "290", "3E0", "10"))
- };
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_SELF_IMPROVEMENT", MemorySource.Base, indexToHexStrNoOffset(14)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ATTACK_UP_S", MemorySource.Base,indexToHexStrNoOffset(15)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ATTACK_UP_L", MemorySource.Base, indexToHexStrNoOffset(16)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_HEALTH_BOOST_S", MemorySource.Base, indexToHexStrNoOffset(17)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_HEALTH_BOOST_L", MemorySource.Base, indexToHexStrNoOffset(18)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_STAMINA_USE_REDUCED_S", MemorySource.Base, indexToHexStrNoOffset(19)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_STAMINA_USE_REDUCED_L", MemorySource.Base, indexToHexStrNoOffset(20)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_WIND_PRESSURE_NEGATED", MemorySource.Base, indexToHexStrNoOffset(21)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ALL_WIND_PRESSURE_NEGATED", MemorySource.Base, indexToHexStrNoOffset(22)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_DEFENSE_UP_S", MemorySource.Base, indexToHexStrNoOffset(23)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_DEFENSE_UP_L", MemorySource.Base, indexToHexStrNoOffset(24)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_TOOL_USE_DRAIN_REDUCED_S", MemorySource.Base, indexToHexStrNoOffset(25)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_TOOL_USE_DRAIN_REDUCED_L", MemorySource.Base, indexToHexStrNoOffset(26)),
+
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_HEALTH_RECOVERY_S", MemorySource.Base, indexToHexStrNoOffset(32)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_HEALTH_RECOVERY_L", MemorySource.Base, indexToHexStrNoOffset(33)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_EARPLUGS_S", MemorySource.Base, indexToHexStrNoOffset(34)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_EARPLUGS_L", MemorySource.Base, indexToHexStrNoOffset(35)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_DIVINE_PROTECTION", MemorySource.Base, indexToHexStrNoOffset(36)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_SCOUTFLY_POWER_UP", MemorySource.Base, indexToHexStrNoOffset(37)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ENVIRONMENTAL_DAMAGE_NEGATED", MemorySource.Base, indexToHexStrNoOffset(38)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_STUN_NEGATED", MemorySource.Base, indexToHexStrNoOffset(39)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_PARALYSIS_NEGATED", MemorySource.Base, indexToHexStrNoOffset(40)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_TREMORS_NEGATED", MemorySource.Base, indexToHexStrNoOffset(41)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_MUCK_RESISTANCE", MemorySource.Base, indexToHexStrNoOffset(42)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_FIRE_RESISTANCE_BOOST_S", MemorySource.Base, indexToHexStrNoOffset(43)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_FIRE_RESISTANCE_BOOST_L", MemorySource.Base, indexToHexStrNoOffset(44)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_WATER_RESISTANCE_BOOST_S", MemorySource.Base, indexToHexStrNoOffset(45)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_WATER_RESISTANCE_BOOST_L", MemorySource.Base, indexToHexStrNoOffset(46)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_THUNDER_RESISTANCE_BOOST_S", MemorySource.Base, indexToHexStrNoOffset(47)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_THUNDER_RESISTANCE_BOOST_L", MemorySource.Base, indexToHexStrNoOffset(48)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ICE_RESISTANCE_BOOST_S", MemorySource.Base, indexToHexStrNoOffset(49)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ICE_RESISTANCE_BOOST_L", MemorySource.Base, indexToHexStrNoOffset(50)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_DRAGON_RESISTANCE_BOOST_S", MemorySource.Base, indexToHexStrNoOffset(51)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_DRAGON_RESISTANCE_BOOST_L", MemorySource.Base, indexToHexStrNoOffset(52)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ELEMENTAL_ATTACK_BOOST", MemorySource.Base, indexToHexStrNoOffset(53)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_BLIGHT_NEGATED", MemorySource.Base, indexToHexStrNoOffset(54)),
+
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_KNOCKBACKS_NEGATED", MemorySource.Base, indexToHexStrNoOffset(57)),
+
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_BLIGHT_RESISTANCE_UP", MemorySource.Base, indexToHexStrNoOffset(59)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_AFFINITY_UP", MemorySource.Base, indexToHexStrNoOffset(60)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ALL_AILMENTS_NEGATED", MemorySource.Base, indexToHexStrNoOffset(61)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_WIND_PRESSURE_NEGATED_AND_EARPLUGS_S", MemorySource.Base, indexToHexStrNoOffset(62)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ABNORMAL_STATUS_ATTACK_INCREASED", MemorySource.Base, indexToHexStrNoOffset(63)),
+
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_MAX_STAM_UP_REC", MemorySource.Base, indexToHexStrNoOffset(67)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_EXT_HEALTH_REC", MemorySource.Base, indexToHexStrNoOffset(68)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_SPEED_BOOST_EVADE_UP", MemorySource.Base, indexToHexStrNoOffset(69)),
+ new StatusEffectConfig("Horn", "LOC_STATUS_EFFECT_ELE_EFF_UP", MemorySource.Base, indexToHexStrNoOffset(70)),
+
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_RESUSCITATE", MemorySource.Base, indexToHexStrNoOffset(71)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_ATTACK_UP_S", MemorySource.Base, indexToHexStrNoOffset(72)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_ATTACK_UP_L", MemorySource.Base, indexToHexStrNoOffset(73)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_DEFENSE_UP_S", MemorySource.Base, indexToHexStrNoOffset(74)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_DEFENSE_UP_L", MemorySource.Base, indexToHexStrNoOffset(75)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_AFFINITY_UP", MemorySource.Base, indexToHexStrNoOffset(76)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_HEALTH_RECOVERY", MemorySource.Base, indexToHexStrNoOffset(77)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_HEALTH_BOOST", MemorySource.Base, indexToHexStrNoOffset(78)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_STAMINA_USE_REDUCED", MemorySource.Base, indexToHexStrNoOffset(79)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_DIVINE_PROTECTION", MemorySource.Base, indexToHexStrNoOffset(82)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_STUN_NEGATED", MemorySource.Base, indexToHexStrNoOffset(83)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_PARALYSIS_NEGATED", MemorySource.Base, indexToHexStrNoOffset(84)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_TREMORS_NEGATED", MemorySource.Base, indexToHexStrNoOffset(85)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_EARPLUGS_S", MemorySource.Base, indexToHexStrNoOffset(86)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_WIND_PRESSURE_NEGATED", MemorySource.Base, indexToHexStrNoOffset(87)),
+ new StatusEffectConfig("Coral", "LOC_STATUS_EFFECT_ENVIRONMENTAL_DAMAGE_NEGATED", MemorySource.Base, indexToHexStrNoOffset(88)),
+
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_POISON", MemorySource.Base, indexToHexStrNoOffset(375)),
+
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_NOXIOUS_POISON", MemorySource.Base, indexToHexStrNoOffset(376)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_FIREBLIGHT", MemorySource.Base, indexToHexStrNoOffset(379)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_THUNDERBLIGHT", MemorySource.Base, indexToHexStrNoOffset(380)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_WATERBLIGHT", MemorySource.Base, indexToHexStrNoOffset(381)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_ICEBLIGHT", MemorySource.Base, indexToHexStrNoOffset(382)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_DRAGONBLIGHT", MemorySource.Base, indexToHexStrNoOffset(383)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_BLEEDING", MemorySource.Base, indexToHexStrNoOffset(384)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_BLEEDING_RECOVERY", MemorySource.Base, indexToHexStrNoOffset(385)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_EFFLUVIA", MemorySource.Base, indexToHexStrNoOffset(386)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_DEFENSE_DOWN", MemorySource.Base, indexToHexStrNoOffset(387)),
+
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_ELEMENTAL_RESISTANCE_DOWN", MemorySource.Base, indexToHexStrNoOffset(389)),
+
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_NO_ITEMS", MemorySource.Base, indexToHexStrNoOffset(391)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_BLASTBLIGHT", MemorySource.Base, indexToHexStrNoOffset(392)),
+ new StatusEffectConfig("Debuff", "LOC_STATUS_EFFECT_BLASTSCOURGE", MemorySource.Base, indexToHexStrNoOffset(432)),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_DASH_JUICE", MemorySource.Base, indexToHexStrNoOffset(420)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_WIGGLY_LITCHI", MemorySource.Base, indexToHexStrNoOffset(421)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_IMMUNIZER", MemorySource.Base, indexToHexStrNoOffset(422)),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_DEMON_POWDER", MemorySource.Base, indexToHexStrNoOffset(433)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_HARDSHELL_POWDER", MemorySource.Base, indexToHexStrNoOffset(434)),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_MIGHT_SEED", MemorySource.Base, indexToHexStrNoOffset(424), new MemoryConditionConfig(10, indexToHexStrNoOffset(425))),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_MIGHT_PILL", MemorySource.Base, indexToHexStrNoOffset(424), new MemoryConditionConfig(25, indexToHexStrNoOffset(425))),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_ADAMANT_SEED", MemorySource.Base, indexToHexStrNoOffset(428), new MemoryConditionConfig(20, indexToHexStrNoOffset(429))),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_ADAMANT_PILL", MemorySource.Base, indexToHexStrNoOffset(428), new MemoryConditionConfig(0, indexToHexStrNoOffset(429))),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_DEMONDRUG", MemorySource.Base, null, new MemoryConditionConfig(1, indexToHexStrNoOffset(437))),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_MEGA_DEMONDRUG", MemorySource.Base, null, new MemoryConditionConfig(2, indexToHexStrNoOffset(437))),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_ARMORSKIN", MemorySource.Base, null, new MemoryConditionConfig(1, indexToHexStrNoOffset(438))),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_MEGA_ARMORSKIN", MemorySource.Base, null, new MemoryConditionConfig(2, indexToHexStrNoOffset(438))),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_HOT_SPRING_HEALTH_RECOVERY", MemorySource.Base, indexToHexStrNoOffset(446)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_HOT_SPRING_CLODPROOF", MemorySource.Base, indexToHexStrNoOffset(447)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_POWERCONE_ATTACK_UP", MemorySource.Base, indexToHexStrNoOffset(454)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_THAWPUFFS_ICEPROOF", MemorySource.Base, indexToHexStrNoOffset(455)),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_COOL_DRINK", MemorySource.Base, indexToHexStrNoOffset(443)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_HOT_DRINK", MemorySource.Base, indexToHexStrNoOffset(444)),
+
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_PROTECTIVE_POLISH", MemorySource.Base, indexToHexStrNoOffset(475)),
+ new StatusEffectConfig("Buff", "LOC_STATUS_EFFECT_AFFINITY_SLIDING", MemorySource.Base, indexToHexStrNoOffset(476)),
+
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_GHILLIE", MemorySource.Equipment, indexToHexStrMantles(0)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_TEMPORAL", MemorySource.Equipment, indexToHexStrMantles(1)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_HEALTH_BOOSTER", MemorySource.Equipment, indexToHexStrMantles(2)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_ROCKSTEADY", MemorySource.Equipment, indexToHexStrMantles(3)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_CHALLENGER", MemorySource.Equipment, indexToHexStrMantles(4)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_VITALITY", MemorySource.Equipment, indexToHexStrMantles(5)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_FIREPROOF", MemorySource.Equipment, indexToHexStrMantles(6)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_WATERPROOF", MemorySource.Equipment, indexToHexStrMantles(7)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_ICEPROOF", MemorySource.Equipment, indexToHexStrMantles(8)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_THUNDERPROOF", MemorySource.Equipment, indexToHexStrMantles(9)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_DRAGONPROOF", MemorySource.Equipment, indexToHexStrMantles(10)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_CLEANSER_BOOSTER", MemorySource.Equipment, indexToHexStrMantles(11)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_GLIDER", MemorySource.Equipment, indexToHexStrMantles(12)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_EVASION", MemorySource.Equipment, indexToHexStrMantles(13)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_IMPACT", MemorySource.Equipment, indexToHexStrMantles(14)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_APOTHECARY", MemorySource.Equipment, indexToHexStrMantles(15)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_IMMUNITY", MemorySource.Equipment, indexToHexStrMantles(16)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_AFFINITY_BOOSTER", MemorySource.Equipment, indexToHexStrMantles(17)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_MANTLE_BANDIT", MemorySource.Equipment, indexToHexStrMantles(18)),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_ASSASSINS_HOOD", MemorySource.Equipment, indexToHexStrMantles(19)),
+
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_GHILLIE", MemorySource.Equipment, indexToHexStrMantlesRecharging(0), new MemoryConditionConfig(0, indexToHexStrMantles(0))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_TEMPORAL", MemorySource.Equipment, indexToHexStrMantlesRecharging(1), new MemoryConditionConfig(0,indexToHexStrMantles(1))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_HEALTH_BOOSTER", MemorySource.Equipment, indexToHexStrMantlesRecharging(2), new MemoryConditionConfig(0, indexToHexStrMantles(2))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_ROCKSTEADY", MemorySource.Equipment, indexToHexStrMantlesRecharging(3), new MemoryConditionConfig(0, indexToHexStrMantles(3))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_CHALLENGER", MemorySource.Equipment, indexToHexStrMantlesRecharging(4), new MemoryConditionConfig(0, indexToHexStrMantles(4))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_VITALITY", MemorySource.Equipment, indexToHexStrMantlesRecharging(5), new MemoryConditionConfig(0, indexToHexStrMantles(5))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_FIREPROOF", MemorySource.Equipment, indexToHexStrMantlesRecharging(6), new MemoryConditionConfig(0, indexToHexStrMantles(6))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_WATERPROOF", MemorySource.Equipment, indexToHexStrMantlesRecharging(7), new MemoryConditionConfig(0, indexToHexStrMantles(7))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_ICEPROOF", MemorySource.Equipment, indexToHexStrMantlesRecharging(8), new MemoryConditionConfig(0, indexToHexStrMantles(8))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_THUNDERPROOF", MemorySource.Equipment, indexToHexStrMantlesRecharging(9), new MemoryConditionConfig(0, indexToHexStrMantles(9))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_DRAGONPROOF", MemorySource.Equipment, indexToHexStrMantlesRecharging(10), new MemoryConditionConfig(0, indexToHexStrMantles(10))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_CLEANSER_BOOSTER", MemorySource.Equipment, indexToHexStrMantlesRecharging(11), new MemoryConditionConfig(0, indexToHexStrMantles(11))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_GLIDER", MemorySource.Equipment, indexToHexStrMantlesRecharging(12), new MemoryConditionConfig(0, indexToHexStrMantles(12))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_EVASION", MemorySource.Equipment, indexToHexStrMantlesRecharging(13), new MemoryConditionConfig(0, indexToHexStrMantles(13))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_IMPACT", MemorySource.Equipment, indexToHexStrMantlesRecharging(14), new MemoryConditionConfig(0, indexToHexStrMantles(14))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_APOTHECARY", MemorySource.Equipment, indexToHexStrMantlesRecharging(15), new MemoryConditionConfig(0, indexToHexStrMantles(15))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_IMMUNITY", MemorySource.Equipment, indexToHexStrMantlesRecharging(16), new MemoryConditionConfig(0, indexToHexStrMantles(16))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_AFFINITY_BOOSTER", MemorySource.Equipment, indexToHexStrMantlesRecharging(17), new MemoryConditionConfig(0, indexToHexStrMantles(17))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_MANTLE_BANDIT", MemorySource.Equipment, indexToHexStrMantlesRecharging(18), new MemoryConditionConfig(0, indexToHexStrMantles(18))),
+ new StatusEffectConfig("Equipment", "LOC_EQUIPMENT_RECHARGE_ASSASSINS_HOOD", MemorySource.Equipment, indexToHexStrMantlesRecharging(19), new MemoryConditionConfig(0, indexToHexStrMantles(19))),
+
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_CHARGE_BLADE_SHIELD_CHARGE", MemorySource.Weapon, indexToHexStrNoOffset(2270), WeaponType.CHARGE_BLADE),
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_CHARGE_BLADE_BLADE_CHARGE", MemorySource.Weapon, indexToHexStrNoOffset(2271), WeaponType.CHARGE_BLADE),
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_CHARGE_BLADE_PHIAL_EXPIRES", MemorySource.Weapon, indexToHexStrNoOffset(2332), WeaponType.CHARGE_BLADE),
+
+ //unverified
+ //new StatusEffectConfig("Weapon", "LOC_WEAPON_LONGSWORD_SPIRIT_GAUGE_REGEN_HELM_BREAKER", MemorySource.Weapon, indexToHexStrNoOffset(2402), WeaponType.LONG_SWORD),
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_LONGSWORD_SPIRIT_GAUGE_REGEN_LAI_SLASH", MemorySource.Weapon, indexToHexStrNoOffset(2269), WeaponType.LONG_SWORD),
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_LONGSWORD_STEADY_SPIRIT_LEVEL", MemorySource.Weapon, indexToHexStrNoOffset(2268), WeaponType.LONG_SWORD),
+
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_INSECT_GLAIVE_ATTACK", MemorySource.Weapon, indexToHexStrNoOffset(2266), WeaponType.INSECT_GLAIVE),
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_INSECT_GLAIVE_SPEED", MemorySource.Weapon, indexToHexStrNoOffset(2267), WeaponType.INSECT_GLAIVE),
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_INSECT_GLAIVE_DEFENSE", MemorySource.Weapon, indexToHexStrNoOffset(2268), WeaponType.INSECT_GLAIVE),
+
+ new StatusEffectConfig("Weapon", "LOC_WEAPON_SWITCH_AXE_AMPED_STATE", MemorySource.Weapon, indexToHexStrNoOffset(2260), WeaponType.SWITCH_AXE),
+
+ //new StatusEffectConfig("Weapon", "LOC_WEAPON_HAMMER_POWER_CHARGE", MemorySource.Weapon, null, WeaponType.HAMMER, new MemoryConditionConfig((byte)1, "1FC4"))
+
+ };
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Game/Config/PlayerWidgetConfig.cs b/SmartHunter/Game/Config/PlayerWidgetConfig.cs
index 5f2dbdbf..5ca7a252 100644
--- a/SmartHunter/Game/Config/PlayerWidgetConfig.cs
+++ b/SmartHunter/Game/Config/PlayerWidgetConfig.cs
@@ -1,20 +1,19 @@
-using SmartHunter.Core.Config;
-using System;
-using System.Text.RegularExpressions;
+using System.Text.RegularExpressions;
+using SmartHunter.Core.Config;
namespace SmartHunter.Game.Config
{
public class PlayerWidgetConfig : WidgetConfig
{
- public string StatusEffectTagsRegex = ".*|Buff|Debuff|HuntingHorn|CoralOrchestra|Equipment|Weapon";
+ public string IncludeStatusEffectGroupIdRegex = ".*";
public PlayerWidgetConfig(float x, float y) : base(x, y)
{
}
- public bool MatchStatusEffectTags(string[] tags)
+ public bool MatchIncludeStatusEffectGroupIdRegex(string groupId)
{
- return new Regex(StatusEffectTagsRegex, RegexOptions.CultureInvariant).IsMatch(String.Join(" ", tags));
+ return new Regex(IncludeStatusEffectGroupIdRegex).IsMatch(groupId);
}
}
}
diff --git a/SmartHunter/Game/Config/StatusEffectConfig.cs b/SmartHunter/Game/Config/StatusEffectConfig.cs
index 376a0583..7d655b11 100644
--- a/SmartHunter/Game/Config/StatusEffectConfig.cs
+++ b/SmartHunter/Game/Config/StatusEffectConfig.cs
@@ -1,30 +1,35 @@
-using System.Collections.Generic;
-using System.Linq;
+using SmartHunter.Game.Data;
namespace SmartHunter.Game.Config
{
- public class StatusEffectConfig
+ public partial class StatusEffectConfig
{
- public enum MemorySource
- {
- Base,
- Equipment,
- Weapon
- }
+ public string GroupId;
public string NameStringId;
- public string[] Tags;
public string TimerOffset;
public MemorySource Source;
public MemoryConditionConfig[] Conditions;
+ public WeaponType WeaponType;
+
+ public StatusEffectConfig() { }
- public StatusEffectConfig(string nameStringId, IEnumerable tags, MemorySource source, string timerOffset, params MemoryConditionConfig[] conditions)
+ public StatusEffectConfig(string groupId, string nameStringId, MemorySource source, string timerOffset, params MemoryConditionConfig[] conditions)
{
+ GroupId = groupId;
NameStringId = nameStringId;
- Tags = tags.ToArray();
Source = source;
TimerOffset = timerOffset;
Conditions = conditions;
}
+
+ public StatusEffectConfig(string groupId, string nameStringId, MemorySource source, string timerOffset, WeaponType weaponType)
+ {
+ GroupId = groupId;
+ NameStringId = nameStringId;
+ Source = source;
+ TimerOffset = timerOffset;
+ WeaponType = weaponType;
+ }
}
}
diff --git a/SmartHunter/Game/Config/TeamWidgetConfig.cs b/SmartHunter/Game/Config/TeamWidgetConfig.cs
index aba5d43b..c9984087 100644
--- a/SmartHunter/Game/Config/TeamWidgetConfig.cs
+++ b/SmartHunter/Game/Config/TeamWidgetConfig.cs
@@ -1,9 +1,10 @@
-using SmartHunter.Core.Config;
+using SmartHunter.Core.Config;
namespace SmartHunter.Game.Config
{
public class TeamWidgetConfig : WidgetConfig
{
+ public bool DontShowIfAlone = false;
public bool ShowBars = true;
public bool ShowNumbers = true;
public bool ShowPercents = true;
diff --git a/SmartHunter/Game/Data/Game.cs b/SmartHunter/Game/Data/Game.cs
new file mode 100644
index 00000000..7f4955c9
--- /dev/null
+++ b/SmartHunter/Game/Data/Game.cs
@@ -0,0 +1,201 @@
+using SmartHunter.Core.Data;
+
+namespace SmartHunter.Game.Data
+{
+ public class Game : Bindable
+ {
+ public bool IsValid = false;
+
+ string m_SessionHostPlayerName = "";
+ public string SessionHostPlayerName
+ {
+ get { return m_SessionHostPlayerName; }
+ set
+ {
+ if (SetProperty(ref m_SessionHostPlayerName, value))
+ {
+ NotifyPropertyChanged(nameof(SessionHostPlayerName));
+ }
+ }
+ }
+
+ string m_LobbyHostPlayerName = "";
+ public string LobbyHostPlayerName
+ {
+ get { return m_LobbyHostPlayerName; }
+ set
+ {
+ if (SetProperty(ref m_LobbyHostPlayerName, value))
+ {
+ NotifyPropertyChanged(nameof(LobbyHostPlayerName));
+ }
+ }
+ }
+
+ string m_SessionID = "";
+ public string SessionID
+ {
+ get { return m_SessionID; }
+ set
+ {
+ if (SetProperty(ref m_SessionID, value))
+ {
+ NotifyPropertyChanged(nameof(SessionID));
+ }
+ }
+ }
+
+ string m_LobbyID = "";
+ public string LobbyID
+ {
+ get { return m_LobbyID; }
+ set
+ {
+ if (SetProperty(ref m_LobbyID, value))
+ {
+ NotifyPropertyChanged(nameof(LobbyID));
+ }
+ }
+ }
+
+ string m_CurrentPlayerName = "";
+ public string CurrentPlayerName
+ {
+ get { return m_CurrentPlayerName; }
+ set
+ {
+ if (SetProperty(ref m_CurrentPlayerName, value))
+ {
+ NotifyPropertyChanged(nameof(CurrentPlayerName));
+ }
+ }
+ }
+
+ string m_CurrentWeaponString = "";
+ public string CurrentWeaponString
+ {
+ get { return m_CurrentWeaponString; }
+ set
+ {
+ if (SetProperty(ref m_CurrentWeaponString, value))
+ {
+ NotifyPropertyChanged(nameof(CurrentWeaponString));
+ NotifyPropertyChanged(nameof(EquippedWeaponType));
+ }
+ }
+ }
+ public WeaponType EquippedWeaponType
+ {
+ get
+ {
+ return CurrentEquippedWeaponType();
+ }
+ }
+
+ public int LobbyPlayerCount
+ {
+ get
+ {
+ return ViewModels.OverlayViewModel.Instance.TeamWidget.Context.Players.Count;
+ }
+ }
+
+ public bool IsPlayerOnline()
+ {
+ return SessionID.Length > 0;
+ }
+
+ public bool IsPlayerInLobby()
+ {
+ return LobbyID.Length > 0;
+ }
+
+ public bool IsCurrentPlayerSessionHost()
+ {
+ return CurrentPlayerName.Equals(SessionHostPlayerName) || SessionHostPlayerName.Length == 0 || CurrentPlayerName.Length == 0;
+ }
+
+ public bool IsCurrentPlayerLobbyHost()
+ {
+ return CurrentPlayerName.Equals(LobbyHostPlayerName) || LobbyHostPlayerName.Length == 0 || CurrentPlayerName.Length == 0;
+ }
+
+ public bool IsPlayerAlone()
+ {
+ return LobbyPlayerCount == 1 || !IsPlayerOnline();
+ }
+
+ public WeaponType CurrentEquippedWeaponType()
+ {
+ if (CurrentWeaponString.Equals(""))
+ {
+ return WeaponType.NO_WEAPON;
+ }
+ if (CurrentWeaponString.Contains("wp11") || CurrentWeaponString.Contains("bow"))
+ {
+ return WeaponType.BOW;
+ }
+ if (CurrentWeaponString.Contains("wp09") || CurrentWeaponString.Contains("caxe"))
+ {
+ return WeaponType.CHARGE_BLADE;
+ }
+ if (CurrentWeaponString.Contains("wp07") || CurrentWeaponString.Contains("gun"))
+ {
+ return WeaponType.GUNLANCE;
+ }
+ if (CurrentWeaponString.Contains("wp04") || CurrentWeaponString.Contains("ham"))
+ {
+ return WeaponType.HAMMER;
+ }
+ if (CurrentWeaponString.Contains("wp12") || CurrentWeaponString.Contains("hbg"))
+ {
+ return WeaponType.HEAVY_BOWGUN;
+ }
+ if (CurrentWeaponString.Contains("wp05") || CurrentWeaponString.Contains("hue"))
+ {
+ return WeaponType.HUNTING_HORN;
+ }
+ if (CurrentWeaponString.Contains("wp06") || CurrentWeaponString.Contains("lan"))
+ {
+ return WeaponType.LANCE;
+ }
+ if (CurrentWeaponString.Contains("wp13") || CurrentWeaponString.Contains("lbg"))
+ {
+ return WeaponType.LIGHT_BOWGUN;
+ }
+ if (CurrentWeaponString.Contains("wp10") || CurrentWeaponString.Contains("rod"))
+ {
+ return WeaponType.INSECT_GLAIVE;
+ }
+ if (CurrentWeaponString.Contains("mus"))
+ {
+ return WeaponType.KINSECT;
+ }
+ if (CurrentWeaponString.Contains("wp01") || CurrentWeaponString.Contains("one"))
+ {
+ return WeaponType.SWORD_AND_SHIELD;
+ }
+ if (CurrentWeaponString.Contains("wp08") || CurrentWeaponString.Contains("saxe"))
+ {
+ return WeaponType.SWITCH_AXE;
+ }
+ if (CurrentWeaponString.Contains("wp02") || CurrentWeaponString.Contains("sou"))
+ {
+ return WeaponType.DUAL_BLADES;
+ }
+ if (CurrentWeaponString.Contains("wp03") || CurrentWeaponString.Contains("swo"))
+ {
+ return WeaponType.LONG_SWORD;
+ }
+ if (CurrentWeaponString.Contains("wp00") || CurrentWeaponString.Contains("two"))
+ {
+ return WeaponType.GREAT_SWORD;
+ }
+ if (CurrentWeaponString.Contains("slg"))
+ {
+ return WeaponType.SLINGER;
+ }
+ return WeaponType.WEAPON_UNKNOWN;
+ }
+ }
+}
diff --git a/SmartHunter/Game/Data/Monster.cs b/SmartHunter/Game/Data/Monster.cs
index 8598a56c..da702acc 100644
--- a/SmartHunter/Game/Data/Monster.cs
+++ b/SmartHunter/Game/Data/Monster.cs
@@ -1,21 +1,12 @@
-using SmartHunter.Core;
-using SmartHunter.Core.Data;
-using SmartHunter.Game.Config;
-using SmartHunter.Game.Helpers;
using System;
using System.Collections.ObjectModel;
using System.Linq;
+using SmartHunter.Core;
+using SmartHunter.Core.Data;
+using SmartHunter.Game.Helpers;
namespace SmartHunter.Game.Data
{
- public enum MonsterCrown
- {
- None,
- Mini,
- Silver,
- Gold
- }
-
public class Monster : TimedVisibility
{
public ulong Address { get; private set; }
@@ -34,18 +25,14 @@ public string Id
}
}
- public string Name
- {
- get
- {
- return LocalizationHelper.GetMonsterName(Id);
- }
- }
+ public bool isElder => ConfigHelper.MonsterData.Values.Monsters.TryGetValue(Id, out var config) ? config.isElder : false;
+
+ public string Name => LocalizationHelper.GetMonsterName(Id);
float m_SizeScale;
public float SizeScale
{
- get { return m_SizeScale; }
+ get => m_SizeScale;
set
{
if (SetProperty(ref m_SizeScale, value))
@@ -57,64 +44,47 @@ public float SizeScale
}
}
- public float ModifiedSizeScale
+ float m_ScaleModifier;
+ public float ScaleModifier
{
- get
+ get => m_ScaleModifier;
+ set
{
- float modifiedSizeScale = SizeScale;
-
- MonsterConfig config = null;
- if (ConfigHelper.MonsterData.Values.Monsters.TryGetValue(Id, out config))
+ if (SetProperty(ref m_ScaleModifier, value))
{
- modifiedSizeScale /= config.ScaleModifier;
+ NotifyPropertyChanged(nameof(ModifiedSizeScale));
+ NotifyPropertyChanged(nameof(Size));
+ NotifyPropertyChanged(nameof(Crown));
}
-
- return modifiedSizeScale;
}
}
- public float Size
- {
- get
- {
- float size = 0;
-
- MonsterConfig config = null;
- if (ConfigHelper.MonsterData.Values.Monsters.TryGetValue(Id, out config))
- {
- size = config.BaseSize * ModifiedSizeScale;
- }
+ public float ModifiedSizeScale => (float)Math.Round((decimal)(SizeScale / ScaleModifier), 2);
- return size;
- }
- }
+ public float Size => ConfigHelper.MonsterData.Values.Monsters.TryGetValue(Id, out var config) ? config.BaseSize * ModifiedSizeScale : 0;
public MonsterCrown Crown
{
get
{
- MonsterCrown crown = MonsterCrown.None;
-
- MonsterConfig config = null;
- if (ConfigHelper.MonsterData.Values.Monsters.TryGetValue(Id, out config) && config.Crowns != null)
+ if (ConfigHelper.MonsterData.Values.Monsters.TryGetValue(Id, out var config) && config.Crowns != null)
{
- int modifiedSizeScale = (int)Math.Round(ModifiedSizeScale * 100, 0);
+ var modifiedSizeScale = ModifiedSizeScale;
- if (modifiedSizeScale <= (int)Math.Round(config.Crowns.Mini * 100, 0))
+ if (modifiedSizeScale <= config.Crowns.Mini)
{
- crown = MonsterCrown.Mini;
+ return MonsterCrown.Mini;
}
- else if (modifiedSizeScale >= (int)Math.Round(config.Crowns.Gold * 100, 0))
+ else if (modifiedSizeScale >= config.Crowns.Gold)
{
- crown = MonsterCrown.Gold;
+ return MonsterCrown.Gold;
}
- else if (modifiedSizeScale >= (int)Math.Round(config.Crowns.Silver * 100, 0))
+ else if (modifiedSizeScale >= config.Crowns.Silver)
{
- crown = MonsterCrown.Silver;
+ return MonsterCrown.Silver;
}
}
-
- return crown;
+ return MonsterCrown.None;
}
}
@@ -122,20 +92,15 @@ public MonsterCrown Crown
public ObservableCollection Parts { get; private set; }
public ObservableCollection StatusEffects { get; private set; }
- public bool IsVisible
- {
- get
- {
- return IsIncluded(Id) && IsTimeVisible(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedMonsters, ConfigHelper.Main.Values.Overlay.MonsterWidget.HideMonstersAfterSeconds);
- }
- }
+ public bool IsVisible => IsIncluded(Id) && IsTimeVisible(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedMonsters, ConfigHelper.Main.Values.Overlay.MonsterWidget.HideMonstersAfterSeconds);
- public Monster(ulong address, string id, float maxHealth, float currentHealth, float sizeScale)
+ public Monster(ulong address, string id, float maxHealth, float currentHealth, float sizeScale, float scaleModifier)
{
Address = address;
m_Id = id;
Health = new Progress(maxHealth, currentHealth);
m_SizeScale = sizeScale;
+ m_ScaleModifier = scaleModifier;
Parts = new ObservableCollection();
StatusEffects = new ObservableCollection();
@@ -143,7 +108,7 @@ public Monster(ulong address, string id, float maxHealth, float currentHealth, f
public MonsterPart UpdateAndGetPart(ulong address, bool isRemovable, float maxHealth, float currentHealth, int timesBrokenCount)
{
- MonsterPart part = Parts.SingleOrDefault(collectionPart => collectionPart.Address == address);
+ var part = Parts.SingleOrDefault(collectionPart => collectionPart.Address == address);
if (part != null)
{
part.IsRemovable = isRemovable;
@@ -164,11 +129,13 @@ public MonsterPart UpdateAndGetPart(ulong address, bool isRemovable, float maxHe
return part;
}
- public MonsterStatusEffect UpdateAndGetStatusEffect(int index, float maxBuildup, float currentBuildup, float maxDuration, float currentDuration, int timesActivatedCount)
+ public MonsterStatusEffect UpdateAndGetStatusEffect(ulong address, int index, float maxBuildup, float currentBuildup, float maxDuration, float currentDuration, int timesActivatedCount)
{
- MonsterStatusEffect statusEffect = StatusEffects.SingleOrDefault(collectionStatusEffect => collectionStatusEffect.Index == index);
+ var statusEffect = StatusEffects.SingleOrDefault(collectionStatusEffect => collectionStatusEffect.Index == index); // TODO: check address???
+
if (statusEffect != null)
{
+ //statusEffect.Address = Address;
statusEffect.Duration.Max = maxDuration;
statusEffect.Duration.Current = currentDuration;
statusEffect.Buildup.Max = maxBuildup;
@@ -177,7 +144,7 @@ public MonsterStatusEffect UpdateAndGetStatusEffect(int index, float maxBuildup,
}
else
{
- statusEffect = new MonsterStatusEffect(this, index, maxBuildup, currentBuildup, maxDuration, currentDuration, timesActivatedCount);
+ statusEffect = new MonsterStatusEffect(this, address, index, maxBuildup, currentBuildup, maxDuration, currentDuration, timesActivatedCount);
statusEffect.Changed += PartOrStatusEffect_Changed;
StatusEffects.Add(statusEffect);
@@ -202,14 +169,8 @@ public void UpdateLocalization()
}
}
- public static bool IsIncluded(string monsterId)
- {
- return ConfigHelper.Main.Values.Overlay.MonsterWidget.MatchMonsterId(monsterId);
- }
+ public static bool IsIncluded(string monsterId) => ConfigHelper.Main.Values.Overlay.MonsterWidget.MatchIncludeMonsterIdRegex(monsterId);
- private void PartOrStatusEffect_Changed(object sender, GenericEventArgs e)
- {
- UpdateLastChangedTime();
- }
+ private void PartOrStatusEffect_Changed(object sender, GenericEventArgs e) => UpdateLastChangedTime();
}
}
diff --git a/SmartHunter/Game/Data/MonsterCrown.cs b/SmartHunter/Game/Data/MonsterCrown.cs
new file mode 100644
index 00000000..54a35698
--- /dev/null
+++ b/SmartHunter/Game/Data/MonsterCrown.cs
@@ -0,0 +1,10 @@
+namespace SmartHunter.Game.Data
+{
+ public enum MonsterCrown
+ {
+ None,
+ Mini,
+ Silver,
+ Gold
+ }
+}
diff --git a/SmartHunter/Game/Data/MonsterPart.cs b/SmartHunter/Game/Data/MonsterPart.cs
index 9fde974f..be02d9be 100644
--- a/SmartHunter/Game/Data/MonsterPart.cs
+++ b/SmartHunter/Game/Data/MonsterPart.cs
@@ -1,6 +1,7 @@
-using SmartHunter.Core.Data;
-using SmartHunter.Game.Helpers;
+using System.ComponentModel;
using System.Linq;
+using SmartHunter.Core.Data;
+using SmartHunter.Game.Helpers;
namespace SmartHunter.Game.Data
{
@@ -33,11 +34,11 @@ public string Name
}
}
- public string[] Tags
+ public string GroupId
{
get
{
- return GetTagsFromIndex(m_Owner.Id, m_Owner.Parts.Where(part => part.IsRemovable == IsRemovable).ToList().IndexOf(this), IsRemovable);
+ return GetGroupIdFromIndex(m_Owner.Id, m_Owner.Parts.Where(part => part.IsRemovable == IsRemovable).ToList().IndexOf(this), IsRemovable);
}
}
@@ -45,7 +46,7 @@ public bool IsVisible
{
get
{
- return IsIncluded(Tags) && IsTimeVisible(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedParts, ConfigHelper.Main.Values.Overlay.MonsterWidget.HidePartsAfterSeconds);
+ return IsIncluded(GroupId) && IsTimeVisible(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedParts, ConfigHelper.Main.Values.Overlay.MonsterWidget.HidePartsAfterSeconds);
}
}
@@ -61,7 +62,7 @@ public MonsterPart(Monster owner, ulong address, bool isRemovable, float maxHeal
Health.PropertyChanged += Health_PropertyChanged;
}
- private void MonsterPart_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ private void MonsterPart_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(TimesBrokenCount))
{
@@ -69,7 +70,7 @@ private void MonsterPart_PropertyChanged(object sender, System.ComponentModel.Pr
}
}
- private void Health_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ private void Health_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Progress.Current))
{
@@ -77,23 +78,23 @@ private void Health_PropertyChanged(object sender, System.ComponentModel.Propert
}
}
- public static string[] GetTagsFromIndex(string monsterId, int index, bool isRemovable)
+ public static string GetGroupIdFromIndex(string monsterId, int index, bool isRemovable)
{
if (ConfigHelper.MonsterData.Values.Monsters.TryGetValue(monsterId, out var monsterConfig))
{
var parts = monsterConfig.Parts.Where(part => part.IsRemovable == isRemovable);
if (parts.Count() > index)
{
- return parts.ElementAt(index).Tags;
+ return parts.ElementAt(index).GroupId;
}
}
- return new string[] { };
+ return "";
}
- public static bool IsIncluded(string[] tags)
+ public static bool IsIncluded(string groupId)
{
- return ConfigHelper.Main.Values.Overlay.MonsterWidget.MatchPartTags(tags);
+ return ConfigHelper.Main.Values.Overlay.MonsterWidget.MatchIncludePartGroupIdRegex(groupId);
}
}
}
diff --git a/SmartHunter/Game/Data/MonsterStatusEffect.cs b/SmartHunter/Game/Data/MonsterStatusEffect.cs
index a6d52afe..d0cd0162 100644
--- a/SmartHunter/Game/Data/MonsterStatusEffect.cs
+++ b/SmartHunter/Game/Data/MonsterStatusEffect.cs
@@ -1,4 +1,5 @@
-using SmartHunter.Core.Data;
+using System.ComponentModel;
+using SmartHunter.Core.Data;
using SmartHunter.Game.Helpers;
namespace SmartHunter.Game.Data
@@ -15,13 +16,23 @@ public int Index
{
if (SetProperty(ref m_Index, value))
{
- NotifyPropertyChanged(nameof(Tags));
+ NotifyPropertyChanged(nameof(GroupId));
NotifyPropertyChanged(nameof(Name));
NotifyPropertyChanged(nameof(IsVisible));
}
}
}
+ public ulong Address;
+
+ public string GroupId
+ {
+ get
+ {
+ return GetGroupIdFromIndex(Index);
+ }
+ }
+
public Progress Buildup { get; private set; }
public Progress Duration { get; private set; }
@@ -40,25 +51,18 @@ public string Name
}
}
- public string[] Tags
- {
- get
- {
- return GetTagsFromIndex(Index);
- }
- }
-
public bool IsVisible
{
get
{
- return IsIncluded(Tags) && IsTimeVisible(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedStatusEffects, ConfigHelper.Main.Values.Overlay.MonsterWidget.HideStatusEffectsAfterSeconds);
+ return IsIncluded(GroupId) && IsTimeVisible(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedStatusEffects, ConfigHelper.Main.Values.Overlay.MonsterWidget.HideStatusEffectsAfterSeconds);
}
}
- public MonsterStatusEffect(Monster owner, int index, float maxBuildup, float currentBuildup, float maxDuration, float currentDuration, int timesActivatedCount)
+ public MonsterStatusEffect(Monster owner, ulong address, int index, float maxBuildup, float currentBuildup, float maxDuration, float currentDuration, int timesActivatedCount)
{
m_Owner = owner;
+ Address = address;
m_Index = index;
Buildup = new Progress(maxBuildup, currentBuildup, true);
Duration = new Progress(maxDuration, currentDuration, true);
@@ -69,7 +73,7 @@ public MonsterStatusEffect(Monster owner, int index, float maxBuildup, float cur
Duration.PropertyChanged += Bar_PropertyChanged;
}
- private void MonsterStatusEffect_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ private void MonsterStatusEffect_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(TimesActivatedCount))
{
@@ -77,19 +81,19 @@ private void MonsterStatusEffect_PropertyChanged(object sender, System.Component
}
}
- private void Bar_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+ private void Bar_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
UpdateLastChangedTime();
}
- public static string[] GetTagsFromIndex(int index)
+ public static string GetGroupIdFromIndex(int index)
{
- return ConfigHelper.MonsterData.Values.StatusEffects[index].Tags;
+ return ConfigHelper.MonsterData.Values.StatusEffects[index].GroupId;
}
- public static bool IsIncluded(string[] tags)
+ public static bool IsIncluded(string groupId)
{
- return ConfigHelper.Main.Values.Overlay.MonsterWidget.MatchStatusEffectTags(tags);
+ return ConfigHelper.Main.Values.Overlay.MonsterWidget.MatchIncludeStatusEffectGroupIdRegex(groupId);
}
}
}
diff --git a/SmartHunter/Game/Data/Player.cs b/SmartHunter/Game/Data/Player.cs
index 48cad42a..79692d8e 100644
--- a/SmartHunter/Game/Data/Player.cs
+++ b/SmartHunter/Game/Data/Player.cs
@@ -1,10 +1,11 @@
-using SmartHunter.Core.Data;
+using SmartHunter.Core.Data;
namespace SmartHunter.Game.Data
{
public class Player : Bindable
{
int m_Index;
+
public int Index
{
get { return m_Index; }
diff --git a/SmartHunter/Game/Data/PlayerStatusEffect.cs b/SmartHunter/Game/Data/PlayerStatusEffect.cs
index c66af365..afb97bd2 100644
--- a/SmartHunter/Game/Data/PlayerStatusEffect.cs
+++ b/SmartHunter/Game/Data/PlayerStatusEffect.cs
@@ -13,7 +13,7 @@ public int Index
{
if (SetProperty(ref m_Index, value))
{
- NotifyPropertyChanged(nameof(Tags));
+ NotifyPropertyChanged(nameof(GroupId));
NotifyPropertyChanged(nameof(Name));
NotifyPropertyChanged(nameof(IsVisible));
}
@@ -35,19 +35,19 @@ public bool IsConditionPassed
}
}
- public string Name
+ public string GroupId
{
get
{
- return LocalizationHelper.GetPlayerStatusEffectName(Index);
+ return GetGroupIdFromIndex(Index);
}
}
- public string[] Tags
+ public string Name
{
get
{
- return GetTagsFromIndex(Index);
+ return LocalizationHelper.GetPlayerStatusEffectName(Index);
}
}
@@ -55,7 +55,7 @@ public bool IsVisible
{
get
{
- return IsIncluded(Tags) && IsConditionPassed;
+ return IsIncluded(GroupId) && IsConditionPassed;
}
}
@@ -71,14 +71,14 @@ public PlayerStatusEffect(int index, float? maxTime, float? currentTime, bool is
m_IsConditionPassed = isConditionPassed;
}
- public static string[] GetTagsFromIndex(int index)
+ public static string GetGroupIdFromIndex(int index)
{
- return ConfigHelper.PlayerData.Values.StatusEffects[index].Tags;
+ return ConfigHelper.PlayerData.Values.StatusEffects[index].GroupId;
}
- public static bool IsIncluded(string[] tags)
+ public static bool IsIncluded(string groupId)
{
- return ConfigHelper.Main.Values.Overlay.PlayerWidget.MatchStatusEffectTags(tags);
+ return ConfigHelper.Main.Values.Overlay.PlayerWidget.MatchIncludeStatusEffectGroupIdRegex(groupId);
}
}
}
diff --git a/SmartHunter/Game/Data/ViewModels/OverlayViewModel.cs b/SmartHunter/Game/Data/ViewModels/OverlayViewModel.cs
index 9e1cb7a6..1d757c40 100644
--- a/SmartHunter/Game/Data/ViewModels/OverlayViewModel.cs
+++ b/SmartHunter/Game/Data/ViewModels/OverlayViewModel.cs
@@ -1,4 +1,5 @@
-using SmartHunter.Core.Data;
+using System.ComponentModel;
+using SmartHunter.Core.Data;
using SmartHunter.Game.Data.WidgetContexts;
using SmartHunter.Game.Helpers;
@@ -15,7 +16,7 @@ public static OverlayViewModel Instance
{
s_Instance = new OverlayViewModel();
- bool isDesignInstance = System.ComponentModel.LicenseManager.UsageMode == System.ComponentModel.LicenseUsageMode.Designtime;
+ bool isDesignInstance = LicenseManager.UsageMode == LicenseUsageMode.Designtime;
if (isDesignInstance || ConfigHelper.Main.Values.Debug.UseSampleData)
{
s_Instance.GenerateSampleData();
@@ -29,6 +30,7 @@ public static OverlayViewModel Instance
public ContextualWidget TeamWidget { get; private set; }
public ContextualWidget MonsterWidget { get; private set; }
public ContextualWidget PlayerWidget { get; private set; }
+ public ContextualWidget DebugWidget { get; private set; }
bool m_CanManipulateWindows;
public bool CanManipulateWindows
@@ -50,7 +52,7 @@ public bool HideWidgetsRequested
}
}
- bool m_IsGameActive = true;
+ bool m_IsGameActive = false;
public bool IsGameActive
{
get { return m_IsGameActive; }
@@ -76,10 +78,12 @@ public OverlayViewModel()
TeamWidget = new ContextualWidget(ConfigHelper.Main.Values.Overlay.TeamWidget, new TeamWidgetContext());
MonsterWidget = new ContextualWidget(ConfigHelper.Main.Values.Overlay.MonsterWidget, new MonsterWidgetContext());
PlayerWidget = new ContextualWidget(ConfigHelper.Main.Values.Overlay.PlayerWidget, new PlayerWidgetContext());
+ DebugWidget = new ContextualWidget(ConfigHelper.Main.Values.Overlay.DebugWidget, new DebugWidgetContext());
}
void GenerateSampleData()
{
+ /*
TeamWidget.Context.UpdateAndGetPlayer(0, "Jade", 3244);
TeamWidget.Context.UpdateAndGetPlayer(1, "Kabuto", 2182);
TeamWidget.Context.UpdateAndGetPlayer(2, "mike the father", 569);
@@ -180,6 +184,7 @@ void GenerateSampleData()
//// Mega Demondrug
//PlayerWidget.Context.UpdateAndGetPlayerStatusEffect(80, null, true);
+ */
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Game/Data/ViewModels/SettingsViewModel.cs b/SmartHunter/Game/Data/ViewModels/SettingsViewModel.cs
new file mode 100644
index 00000000..7f214b70
--- /dev/null
+++ b/SmartHunter/Game/Data/ViewModels/SettingsViewModel.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Reflection;
+using System.Windows;
+using SmartHunter.Core;
+using SmartHunter.Core.Data;
+using SmartHunter.Game.Helpers;
+
+namespace SmartHunter.Game.Data.ViewModels
+{
+ public class SettingsViewModel : Bindable
+ {
+ static SettingsViewModel s_Instance = null;
+ public static SettingsViewModel Instance
+ {
+ get
+ {
+ if (s_Instance == null)
+ {
+ s_Instance = new SettingsViewModel();
+ }
+
+ return s_Instance;
+ }
+ }
+
+ public List Settings { get; }
+
+ private void restartSmartHunter()
+ {
+ string exec = Assembly.GetEntryAssembly()?.Location;
+ if (exec != null)
+ {
+ Process.Start("SmartHunter.exe");
+ }
+ Environment.Exit(0);
+ }
+
+ public SettingsViewModel()
+ {
+ Settings = new List();
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.ShutdownWhenProcessExits, "Shutdown when process exits", "Shutdown SmartHunter as soon as MonsterHunterWorld is killed", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.ShutdownWhenProcessExits = !ConfigHelper.Main.Values.ShutdownWhenProcessExits;
+ ConfigHelper.Main.Save();
+ })));
+ Settings.Add(new Setting(ConfigHelper.Main.Values.AutomaticallyCheckAndDownloadUpdates, "Automatically check and download updates", "If enabled SmartHunter will automatically check and download new updates", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.AutomaticallyCheckAndDownloadUpdates = !ConfigHelper.Main.Values.AutomaticallyCheckAndDownloadUpdates;
+ ConfigHelper.Main.Save();
+ if (!ConfigHelper.Main.Values.AutomaticallyCheckAndDownloadUpdates)
+ {
+ var result = MessageBox.Show("This feature will work on the next open of Smarthunter. Would you like to reopen it now?", "Restart", MessageBoxButton.YesNo, MessageBoxImage.Information);
+ if (result == MessageBoxResult.Yes)
+ {
+ restartSmartHunter();
+ }
+ }
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.HideWhenGameWindowIsInactive, "Hide when game window is inactive", "Automatically hide every SmartHunter window when MonsterHunterWorld it not top most application", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.HideWhenGameWindowIsInactive = !ConfigHelper.Main.Values.Overlay.HideWhenGameWindowIsInactive;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.TeamWidget.IsVisible, "Team Widget", "Show/Hide Team Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.TeamWidget.IsVisible = !ConfigHelper.Main.Values.Overlay.TeamWidget.IsVisible;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.TeamWidget.DontShowIfAlone, "Dont show if alone", "Automatically hide Team Widget if you are alone in a mission", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.TeamWidget.DontShowIfAlone = !ConfigHelper.Main.Values.Overlay.TeamWidget.DontShowIfAlone;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.TeamWidget.ShowBars, "Team Widget show bars", "Show Bars inside Team Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.TeamWidget.ShowBars = !ConfigHelper.Main.Values.Overlay.TeamWidget.ShowBars;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.TeamWidget.ShowNumbers, "Team Widget show numbers", "Show Numbers inside Team Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.TeamWidget.ShowNumbers = !ConfigHelper.Main.Values.Overlay.TeamWidget.ShowNumbers;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.TeamWidget.ShowPercents, "Team Widget show percents", "Show Percents inside Team Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.TeamWidget.ShowPercents = !ConfigHelper.Main.Values.Overlay.TeamWidget.ShowPercents;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.IsVisible, "Monster Widget", "Show/Hide Monsters Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.IsVisible = !ConfigHelper.Main.Values.Overlay.MonsterWidget.IsVisible;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedMonsters, "Show unchanged monsters", "Automatically hide monsters if they are not damaged", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedMonsters = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedMonsters;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedParts, "Show unchanged parts", "Automatically hide monsters parts if they are not damaged", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedParts = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedParts;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedStatusEffects, "Show unchanged status effects", "Automatically hide monsters status effects when there weren't any changes", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedStatusEffects = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowUnchangedStatusEffects;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowSize, "Show monster size", "Show monster size hover its name", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowSize = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowSize;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowCrown, "Show monster crown", "Show monster crown image", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowCrown = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowCrown;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowBars, "Monster Widget show bars", "Show Bars inside Monster Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowBars = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowBars;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowNumbers, "Monster Widget show numbers", "Show Numbers inside Monster Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowNumbers = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowNumbers;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowPercents, "Monster Widget show percents", "Show Percents inside Monster Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowPercents = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowPercents;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.UseAnimations, "Use animations", "Enable/Disable Animations for status effects", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.UseAnimations = !ConfigHelper.Main.Values.Overlay.MonsterWidget.UseAnimations;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowOnlySelectedMonster, "Show only selected monster", "Show only the monster that you selected for your hunt", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowOnlySelectedMonster = !ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowOnlySelectedMonster;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.PlayerWidget.IsVisible, "Player Widget", "Show/Hide Player Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.PlayerWidget.IsVisible = !ConfigHelper.Main.Values.Overlay.PlayerWidget.IsVisible;
+ ConfigHelper.Main.Save();
+ })));
+
+ Settings.Add(new Setting(ConfigHelper.Main.Values.Overlay.DebugWidget.IsVisible, "Debug Widget", "Show/Hide Debug Widget", new Command(_ =>
+ {
+ ConfigHelper.Main.Values.Overlay.DebugWidget.IsVisible = !ConfigHelper.Main.Values.Overlay.DebugWidget.IsVisible;
+ ConfigHelper.Main.Save();
+ })));
+ }
+ }
+}
diff --git a/SmartHunter/Game/Data/WeaponType.cs b/SmartHunter/Game/Data/WeaponType.cs
new file mode 100644
index 00000000..49723ee0
--- /dev/null
+++ b/SmartHunter/Game/Data/WeaponType.cs
@@ -0,0 +1,24 @@
+namespace SmartHunter.Game.Data
+{
+ public enum WeaponType
+ {
+ NO_WEAPON,
+ WEAPON_UNKNOWN,
+ BOW,
+ CHARGE_BLADE,
+ GUNLANCE,
+ HAMMER,
+ HEAVY_BOWGUN,
+ HUNTING_HORN,
+ LANCE,
+ LIGHT_BOWGUN,
+ INSECT_GLAIVE,
+ KINSECT,
+ SWORD_AND_SHIELD,
+ SWITCH_AXE,
+ DUAL_BLADES,
+ LONG_SWORD,
+ GREAT_SWORD,
+ SLINGER
+ }
+}
diff --git a/SmartHunter/Game/Data/WidgetContexts/DebugWidgetContext.cs b/SmartHunter/Game/Data/WidgetContexts/DebugWidgetContext.cs
new file mode 100644
index 00000000..a3035966
--- /dev/null
+++ b/SmartHunter/Game/Data/WidgetContexts/DebugWidgetContext.cs
@@ -0,0 +1,32 @@
+using System.Collections.ObjectModel;
+using System.Linq;
+using SmartHunter.Core.Data;
+using SmartHunter.Game.Data;
+
+namespace SmartHunter.Game.Data.WidgetContexts
+{
+ public class DebugWidgetContext : WidgetContext
+ {
+ public Game CurrentGame { get; set; }
+
+ public void UpdateCurrentGame(string playerName, string weaponString, string sessionID, string sessionHostName, string lobbyID, string lobbyHostName)
+ {
+ CurrentGame.CurrentPlayerName = playerName;
+ CurrentGame.CurrentWeaponString = weaponString;
+ CurrentGame.SessionID = sessionID;
+ CurrentGame.SessionHostPlayerName = sessionHostName;
+ CurrentGame.LobbyID = lobbyID;
+ CurrentGame.LobbyHostPlayerName = lobbyHostName;
+ CurrentGame.IsValid = true;
+ }
+ public DebugWidgetContext()
+ {
+ CurrentGame = new Game();
+ }
+
+ public override void UpdateFromConfig()
+ {
+ base.UpdateFromConfig();
+ }
+ }
+}
diff --git a/SmartHunter/Game/Data/WidgetContexts/MonsterWidgetContext.cs b/SmartHunter/Game/Data/WidgetContexts/MonsterWidgetContext.cs
index d8196a6e..d202f481 100644
--- a/SmartHunter/Game/Data/WidgetContexts/MonsterWidgetContext.cs
+++ b/SmartHunter/Game/Data/WidgetContexts/MonsterWidgetContext.cs
@@ -1,7 +1,7 @@
-using SmartHunter.Core.Data;
-using SmartHunter.Game.Helpers;
using System.Collections.ObjectModel;
using System.Linq;
+using SmartHunter.Core.Data;
+using SmartHunter.Game.Helpers;
namespace SmartHunter.Game.Data.WidgetContexts
{
@@ -9,6 +9,13 @@ public class MonsterWidgetContext : WidgetContext
{
public ObservableCollection Monsters { get; private set; }
+ bool m_ShowSize = false;
+ public bool ShowSize
+ {
+ get { return m_ShowSize; }
+ set { SetProperty(ref m_ShowSize, value); }
+ }
+
bool m_ShowCrown = true;
public bool ShowCrown
{
@@ -37,6 +44,13 @@ public bool ShowPercents
set { SetProperty(ref m_ShowPercents, value); }
}
+ bool m_UseAnimations = true;
+ public bool UseAnimations
+ {
+ get { return m_UseAnimations; }
+ set { SetProperty(ref m_UseAnimations, value); }
+ }
+
public MonsterWidgetContext()
{
Monsters = new ObservableCollection();
@@ -44,7 +58,7 @@ public MonsterWidgetContext()
UpdateFromConfig();
}
- public Monster UpdateAndGetMonster(ulong address, string id, float maxHealth, float currentHealth, float sizeScale)
+ public Monster UpdateAndGetMonster(ulong address, string id, float maxHealth, float currentHealth, float sizeScale, float scaleModifier)
{
Monster monster = null;
@@ -55,10 +69,11 @@ public Monster UpdateAndGetMonster(ulong address, string id, float maxHealth, fl
monster.Health.Max = maxHealth;
monster.Health.Current = currentHealth;
monster.SizeScale = sizeScale;
+ monster.ScaleModifier = scaleModifier;
}
else
{
- monster = new Monster(address, id, maxHealth, currentHealth, sizeScale);
+ monster = new Monster(address, id, maxHealth, currentHealth, sizeScale, scaleModifier);
Monsters.Add(monster);
}
@@ -71,10 +86,12 @@ public override void UpdateFromConfig()
{
base.UpdateFromConfig();
+ ShowSize = ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowSize;
ShowCrown = ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowCrown;
ShowBars = ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowBars;
ShowNumbers = ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowNumbers;
ShowPercents = ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowPercents;
+ UseAnimations = ConfigHelper.Main.Values.Overlay.MonsterWidget.UseAnimations;
foreach (var monster in Monsters)
{
diff --git a/SmartHunter/Game/Data/WidgetContexts/PlayerWidgetContext.cs b/SmartHunter/Game/Data/WidgetContexts/PlayerWidgetContext.cs
index 00fe7d66..409d8b73 100644
--- a/SmartHunter/Game/Data/WidgetContexts/PlayerWidgetContext.cs
+++ b/SmartHunter/Game/Data/WidgetContexts/PlayerWidgetContext.cs
@@ -1,6 +1,6 @@
-using SmartHunter.Core.Data;
-using System.Collections.ObjectModel;
+using System.Collections.ObjectModel;
using System.Linq;
+using SmartHunter.Core.Data;
namespace SmartHunter.Game.Data.WidgetContexts
{
diff --git a/SmartHunter/Game/Data/WidgetContexts/TeamWidgetContext.cs b/SmartHunter/Game/Data/WidgetContexts/TeamWidgetContext.cs
index 928cbcf3..e8020102 100644
--- a/SmartHunter/Game/Data/WidgetContexts/TeamWidgetContext.cs
+++ b/SmartHunter/Game/Data/WidgetContexts/TeamWidgetContext.cs
@@ -1,14 +1,22 @@
-using SmartHunter.Core.Data;
-using SmartHunter.Game.Helpers;
using System;
using System.Collections.ObjectModel;
using System.Linq;
+using SmartHunter.Core.Data;
+using SmartHunter.Game.Helpers;
namespace SmartHunter.Game.Data.WidgetContexts
{
public class TeamWidgetContext : WidgetContext
{
- public ObservableCollection Players { get; private set; }
+ public Collection Players { get; private set; }
+ public ObservableCollection Fake_Players { get; private set; } // TODO: Can dis be done inside the xaml file?
+
+ bool m_DontShowIfAlone = false;
+ public bool DontShowIfAlone
+ {
+ get { return m_DontShowIfAlone; }
+ set { SetProperty(ref m_DontShowIfAlone, value); }
+ }
bool m_ShowBars = true;
public bool ShowBars
@@ -33,29 +41,51 @@ public bool ShowPercents
public TeamWidgetContext()
{
- Players = new ObservableCollection();
+ Players = new Collection();
+ Fake_Players = new ObservableCollection();
UpdateFromConfig();
}
public Player UpdateAndGetPlayer(int index, string name, int damage)
{
- if (String.IsNullOrEmpty(name) && damage == 0)
+ if (string.IsNullOrEmpty(name) && damage == 0)
{
+ if (index < Players.Count)
+ {
+ Players.RemoveAt(index);
+ if (DontShowIfAlone && Players.Count() <= 1)
+ {
+ Fake_Players.Clear();
+ }
+ else
+ {
+ Fake_Players.RemoveAt(index);
+ }
+ }
return null;
}
while (index >= Players.Count)
{
Players.Add(new Player() { Index = Players.Count, Name = LocalizationHelper.GetString(LocalizationHelper.UnknownPlayerStringId) });
+
+ if (DontShowIfAlone && Players.Count() <= 1)
+ {
+ Fake_Players.Clear();
+ }
+ else
+ {
+ Fake_Players.Add(Players[Players.Count() - 1]);
+ }
}
- Player player = Players[index];
- if (!String.IsNullOrEmpty(name))
+ var player = Players[index];
+ if (!string.IsNullOrEmpty(name))
{
player.Name = name;
}
- else if (String.IsNullOrEmpty(player.Name))
+ else if (string.IsNullOrEmpty(player.Name))
{
player.Name = LocalizationHelper.GetString(LocalizationHelper.UnknownPlayerStringId);
}
@@ -96,10 +126,17 @@ public void UpdateFractions()
}
}
+ public void ClearPlayers()
+ {
+ Players.Clear();
+ Fake_Players.Clear();
+ }
+
public override void UpdateFromConfig()
{
base.UpdateFromConfig();
+ DontShowIfAlone = ConfigHelper.Main.Values.Overlay.TeamWidget.DontShowIfAlone;
ShowBars = ConfigHelper.Main.Values.Overlay.TeamWidget.ShowBars;
ShowNumbers = ConfigHelper.Main.Values.Overlay.TeamWidget.ShowNumbers;
ShowPercents = ConfigHelper.Main.Values.Overlay.TeamWidget.ShowPercents;
diff --git a/SmartHunter/Game/Helpers/ConfigHelper.cs b/SmartHunter/Game/Helpers/ConfigHelper.cs
index 78c9c4ae..ce0bd44d 100644
--- a/SmartHunter/Game/Helpers/ConfigHelper.cs
+++ b/SmartHunter/Game/Helpers/ConfigHelper.cs
@@ -1,4 +1,5 @@
-using SmartHunter.Config;
+using System;
+using SmartHunter.Config;
using SmartHunter.Core.Config;
using SmartHunter.Game.Config;
@@ -83,14 +84,14 @@ public static ConfigContainer Memory
// Ensures configs are loaded
public static void EnsureConfigs()
{
- var main = Main;
- var localization = Localization;
- var monsterData = MonsterData;
- var playerData = PlayerData;
- var memory = Memory;
+ _ = Main;
+ _ = Localization;
+ _ = MonsterData;
+ _ = PlayerData;
+ _ = Memory;
}
- static void Main_Loaded(object sender, System.EventArgs e)
+ static void Main_Loaded(object sender, EventArgs e)
{
Localization.TryChangeFileName(Main.Values.LocalizationFileName);
MonsterData.TryChangeFileName(Main.Values.MonsterDataFileName);
@@ -98,4 +99,4 @@ static void Main_Loaded(object sender, System.EventArgs e)
Memory.TryChangeFileName(Main.Values.MemoryFileName);
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Game/Helpers/LocalizationHelper.cs b/SmartHunter/Game/Helpers/LocalizationHelper.cs
index 6d7d1a96..79c1cf59 100644
--- a/SmartHunter/Game/Helpers/LocalizationHelper.cs
+++ b/SmartHunter/Game/Helpers/LocalizationHelper.cs
@@ -1,5 +1,5 @@
-using SmartHunter.Core;
-using System.Linq;
+using System.Linq;
+using SmartHunter.Core;
namespace SmartHunter.Game.Helpers
{
diff --git a/SmartHunter/Game/Helpers/MhwHelper.cs b/SmartHunter/Game/Helpers/MhwHelper.cs
index a7d3e66c..4ae5113d 100644
--- a/SmartHunter/Game/Helpers/MhwHelper.cs
+++ b/SmartHunter/Game/Helpers/MhwHelper.cs
@@ -1,12 +1,13 @@
-using SmartHunter.Core.Helpers;
-using SmartHunter.Game.Data;
-using SmartHunter.Game.Data.ViewModels;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
+using SmartHunter.Core.Helpers;
+using SmartHunter.Game.Config;
+using SmartHunter.Game.Data;
+using SmartHunter.Game.Data.ViewModels;
namespace SmartHunter.Game.Helpers
{
@@ -14,6 +15,12 @@ public static class MhwHelper
{
public static bool TryParseHex(string hexString, out long hexNumber)
{
+ if (hexString.StartsWith("-"))
+ {
+ bool res = long.TryParse(hexString.Substring(1), NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hexNumber);
+ hexNumber = (-1) * hexNumber;
+ return res;
+ }
return long.TryParse(hexString, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out hexNumber);
}
@@ -23,24 +30,28 @@ public static ulong AddOffset(ulong address, long offset)
}
// TODO: Wouldn't it be nice if all this were data driven?
- private static class DataOffsets
+ public static class DataOffsets
{
public static class Monster
{
// Doubly linked list
- public static readonly ulong PreviousMonsterPtr = 0x28;
- public static readonly ulong NextMonsterPtr = 0x30;
- public static readonly ulong SizeScale = 0x174;
- public static readonly ulong ModelPtr = 0x290;
- public static readonly ulong PartCollection = 0x129D8;
- public static readonly ulong RemovablePartCollection = PartCollection + 0x1ED0;
+ public static readonly ulong MonsterStartOfStructOffset = 0x40;
+ public static readonly ulong NextMonsterOffset = 0x18;
+ public static readonly ulong MonsterHealthComponentOffset = 0x7670;
+ public static readonly ulong PreviousMonsterOffset = 0x10;
+ public static readonly ulong SizeScale = 0x188;
+ public static readonly ulong ScaleModifier = 0x7730;
+ public static readonly ulong PartCollection = 0x14528;
+ public static readonly ulong RemovablePartCollection = PartCollection + 0x22A0 - 0xF0 - 0xF0 - 0xF0 - 0x38;
public static readonly ulong StatusEffectCollection = 0x19900;
+ public static readonly ulong MonsterStaminaOffset = 0x1C0F0;
+ public static readonly ulong MonsterRageOffset = 0x1BE54;
}
public static class MonsterModel
{
- public static readonly int IdLength = 64;
- public static readonly ulong Id = 0x0C;
+ public static readonly uint IdLength = 32;
+ public static readonly ulong IdOffset = 0x179;
}
public static class MonsterHealthComponent
@@ -52,32 +63,28 @@ public static class MonsterHealthComponent
public static class MonsterPartCollection
{
public static readonly int MaxItemCount = 16;
- public static readonly ulong HealthComponentPtr = 0x48;
- public static readonly ulong FirstPart = 0x50;
+ public static readonly ulong FirstPart = 0x1C;
}
public static class MonsterPart
{
- public static readonly ulong MaxHealth = 0x0C;
- public static readonly ulong CurrentHealth = 0x10;
- public static readonly ulong TimesBrokenCount = 0x18;
- public static readonly ulong NextPart = 0x1E8;
+ public static readonly ulong MaxHealth = 0x00;
+ public static readonly ulong CurrentHealth = 0x04;
+ public static readonly ulong TimesBrokenCount = 0x0C;
+ public static readonly ulong NextPart = 0x1F8;
}
public static class MonsterRemovablePartCollection
{
public static readonly int MaxItemCount = 32;
- public static readonly ulong FirstRemovablePart = 0x08;
+ public static readonly ulong FirstRemovablePart = 0x78;
}
public static class MonsterRemovablePart
{
public static readonly ulong MaxHealth = 0x0C;
public static readonly ulong CurrentHealth = 0x10;
- public static readonly ulong Validity1 = 0x14;
public static readonly ulong TimesBrokenCount = 0x18;
- public static readonly ulong Validity2 = 0x28;
- public static readonly ulong Validity3 = 0x40;
public static readonly ulong NextRemovablePart = 0x78;
}
@@ -89,18 +96,23 @@ public static class MonsterStatusEffectCollection
public static class MonsterStatusEffect
{
- public static readonly ulong Id = 0x158;
- public static readonly ulong MaxDuration = 0x15C;
- public static readonly ulong CurrentBuildup = 0x178;
- public static readonly ulong MaxBuildup = 0x17C;
- public static readonly ulong CurrentDuration = 0x1A4;
- public static readonly ulong TimesActivatedCount = 0x1A8;
+ public static readonly ulong MaxDuration = 0x19C;
+ public static readonly ulong CurrentBuildup = 0x1B8;
+ public static readonly ulong MaxBuildup = 0x1C8;
+ public static readonly ulong CurrentDuration = 0x1F8;
+ public static readonly ulong TimesActivatedCount = 0x200;
}
public static class PlayerNameCollection
{
+ public static readonly int IDLength = 12 + 1; // +1 for null terminator
public static readonly int PlayerNameLength = 32 + 1; // +1 for null terminator
- public static readonly ulong FirstPlayerName = 0x54A45;
+ public static readonly ulong FirstPlayerName = 0x532ED;
+ public static readonly ulong SessionID = FirstPlayerName + 0xF43;
+ public static readonly ulong SessionHostPlayerName = SessionID + 0x3F;
+ public static readonly ulong LobbyID = FirstPlayerName + 0x463;
+ public static readonly ulong LobbyHostPlayerName = LobbyID + 0x29;
+ public static readonly ulong NextLobbyHostName = 0x2F; // Is dis even right?
}
public static class PlayerDamageCollection
@@ -116,29 +128,71 @@ public static class PlayerDamage
}
}
- public static void UpdatePlayerWidget(Process process, ulong baseAddress, ulong equipmentAddress, ulong weaponAddress)
+ public static void UpdateCurrentGame(Process process, ulong playerNameCollectionAddress, ulong currentPlayerNameAddress, ulong currentWeaponAddress, ulong lobbyStatusAddress)
{
- for (int index = 0; index < ConfigHelper.PlayerData.Values.StatusEffects.Length; ++index)
+ string currentSessionID = MemoryHelper.ReadString(process, playerNameCollectionAddress + DataOffsets.PlayerNameCollection.SessionID, (uint)DataOffsets.PlayerNameCollection.IDLength);
+ string currentSessionPlayerName = "";
+ if (currentSessionID.Length > 0)
{
- var statusEffectConfig = ConfigHelper.PlayerData.Values.StatusEffects[index];
+ currentSessionPlayerName = MemoryHelper.ReadString(process, playerNameCollectionAddress + DataOffsets.PlayerNameCollection.SessionHostPlayerName, (uint)DataOffsets.PlayerNameCollection.PlayerNameLength);
+ }
- ulong sourceAddress = baseAddress;
- if (statusEffectConfig.Source == Config.StatusEffectConfig.MemorySource.Equipment)
+ string currentPlayerName = MemoryHelper.ReadString(process, currentPlayerNameAddress, (uint)DataOffsets.PlayerNameCollection.PlayerNameLength);
+
+ string currentLobbyID = "";
+ string currentLobbyPlayerName = "";
+ bool isPlayerInMission = MemoryHelper.Read(process, lobbyStatusAddress + 0x54) != 0x0;
+ bool isPlayerInExpedition = MemoryHelper.Read(process, lobbyStatusAddress + 0x38) != 0x1;
+ if (isPlayerInMission || isPlayerInExpedition)
+ {
+ if (currentSessionID.Length > 0)
{
- sourceAddress = equipmentAddress;
+ currentLobbyID = MemoryHelper.ReadString(process, playerNameCollectionAddress + DataOffsets.PlayerNameCollection.LobbyID, (uint)DataOffsets.PlayerNameCollection.IDLength);
+ if (currentLobbyID.Length > 0)
+ {
+ for (int index = 0; index < 4; index++)
+ {
+ ulong PlayerNameOffset = DataOffsets.PlayerNameCollection.NextLobbyHostName * (ulong)index;
+ currentLobbyPlayerName = MemoryHelper.ReadString(process, playerNameCollectionAddress + DataOffsets.PlayerNameCollection.LobbyHostPlayerName + PlayerNameOffset, (uint)DataOffsets.PlayerNameCollection.PlayerNameLength);
+ if (currentLobbyPlayerName.Length > 0)
+ {
+ break;
+ }
+ }
+ }
}
- else if (statusEffectConfig.Source == Config.StatusEffectConfig.MemorySource.Weapon)
+ else
{
- sourceAddress = weaponAddress;
+ currentLobbyID = "Not Online";
+ currentLobbyPlayerName = currentPlayerName;
}
-
- bool allConditionsPassed = true;
+ }
+
+ string currentEquippedWeaponString = MemoryHelper.ReadString(process, currentWeaponAddress, 0x4F);
+ OverlayViewModel.Instance.DebugWidget.Context.UpdateCurrentGame(currentPlayerName, currentEquippedWeaponString, currentSessionID, currentSessionPlayerName, currentLobbyID, currentLobbyPlayerName);
+ }
+
+ public static void UpdatePlayerWidget(Process process, ulong baseAddress, ulong equipmentAddress, ulong weaponAddress)
+ {
+ for (int index = 0; index < ConfigHelper.PlayerData.Values.StatusEffects.Length; ++index)
+ {
+ var statusEffectConfig = ConfigHelper.PlayerData.Values.StatusEffects[index];
+
+ var sourceAddress = statusEffectConfig.Source switch
+ {
+ MemorySource.Base => baseAddress,
+ MemorySource.Equipment => equipmentAddress,
+ MemorySource.Weapon => weaponAddress,
+ _ => baseAddress,
+ };
+
+ var allConditionsPassed = true;
if (statusEffectConfig.Conditions != null)
{
foreach (var condition in statusEffectConfig.Conditions)
{
- bool isOffsetChainValid = true;
- List offsets = new List();
+ var isOffsetChainValid = true;
+ var offsets = new List();
foreach (var offsetString in condition.Offsets)
{
if (TryParseHex(offsetString, out var offset))
@@ -160,7 +214,7 @@ public static void UpdatePlayerWidget(Process process, ulong baseAddress, ulong
var conditionAddress = MemoryHelper.ReadMultiLevelPointer(false, process, sourceAddress + (ulong)offsets.First(), offsets.Skip(1).ToArray());
- bool isPassed = false;
+ var isPassed = false;
if (condition.ByteValue.HasValue)
{
var conditionValue = MemoryHelper.Read(process, conditionAddress);
@@ -174,7 +228,7 @@ public static void UpdatePlayerWidget(Process process, ulong baseAddress, ulong
else if (condition.StringRegexValue != null)
{
var conditionValue = MemoryHelper.ReadString(process, conditionAddress, 64);
- isPassed = new Regex(condition.StringRegexValue, RegexOptions.CultureInvariant).IsMatch(conditionValue);
+ isPassed = new Regex(condition.StringRegexValue).IsMatch(conditionValue);
}
if (!isPassed)
@@ -185,6 +239,18 @@ public static void UpdatePlayerWidget(Process process, ulong baseAddress, ulong
}
}
+ if (statusEffectConfig.Source == MemorySource.Weapon)
+ {
+ if (!OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsValid)
+ {
+ continue;
+ }
+ if (OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.CurrentEquippedWeaponType() != statusEffectConfig.WeaponType)
+ {
+ allConditionsPassed = false;
+ }
+ }
+
float? timer = null;
if (allConditionsPassed && statusEffectConfig.TimerOffset != null)
{
@@ -206,63 +272,77 @@ public static void UpdatePlayerWidget(Process process, ulong baseAddress, ulong
public static void UpdateTeamWidget(Process process, ulong playerDamageCollectionAddress, ulong playerNameCollectionAddress)
{
- List updatedPlayers = new List();
- for (int playerIndex = 0; playerIndex < DataOffsets.PlayerDamageCollection.MaxPlayerCount; ++playerIndex)
+ var players = new List();
+
+ for (var playerIndex = 0; playerIndex < DataOffsets.PlayerDamageCollection.MaxPlayerCount; ++playerIndex)
{
var player = UpdateAndGetTeamPlayer(process, playerIndex, playerDamageCollectionAddress, playerNameCollectionAddress);
if (player != null)
{
- updatedPlayers.Add(player);
+ players.Add(player);
}
}
- if (updatedPlayers.Any())
+ if (players.Any())
{
OverlayViewModel.Instance.TeamWidget.Context.UpdateFractions();
}
else if (OverlayViewModel.Instance.TeamWidget.Context.Players.Any())
{
- OverlayViewModel.Instance.TeamWidget.Context.Players.Clear();
+ OverlayViewModel.Instance.TeamWidget.Context.ClearPlayers();
}
}
private static Player UpdateAndGetTeamPlayer(Process process, int playerIndex, ulong playerDamageCollectionAddress, ulong playerNameCollectionAddress)
{
- Player player = null;
-
var playerNameOffset = (ulong)DataOffsets.PlayerNameCollection.PlayerNameLength * (ulong)playerIndex;
- string name = MemoryHelper.ReadString(process, playerNameCollectionAddress + DataOffsets.PlayerNameCollection.FirstPlayerName + playerNameOffset, (uint)DataOffsets.PlayerNameCollection.PlayerNameLength);
- ulong firstPlayerPtr = playerDamageCollectionAddress + DataOffsets.PlayerDamageCollection.FirstPlayerPtr;
- ulong currentPlayerPtr = firstPlayerPtr + ((ulong)playerIndex * DataOffsets.PlayerDamageCollection.NextPlayerPtr);
- ulong currentPlayerAddress = MemoryHelper.Read(process, currentPlayerPtr);
- int damage = MemoryHelper.Read(process, currentPlayerAddress + DataOffsets.PlayerDamage.Damage);
+ var name = MemoryHelper.ReadString(process, playerNameCollectionAddress + DataOffsets.PlayerNameCollection.FirstPlayerName + playerNameOffset, (uint)DataOffsets.PlayerNameCollection.PlayerNameLength);
+ var firstPlayerPtr = playerDamageCollectionAddress + DataOffsets.PlayerDamageCollection.FirstPlayerPtr;
+ var currentPlayerPtr = firstPlayerPtr + ((ulong)playerIndex * DataOffsets.PlayerDamageCollection.NextPlayerPtr);
+ var currentPlayerAddress = MemoryHelper.Read(process, currentPlayerPtr);
+ var damage = MemoryHelper.Read(process, currentPlayerAddress + DataOffsets.PlayerDamage.Damage);
+
+ return !string.IsNullOrEmpty(name) && damage > 0
+ ? OverlayViewModel.Instance.TeamWidget.Context.UpdateAndGetPlayer(playerIndex, name, damage)
+ : null;
+ }
- if (!String.IsNullOrEmpty(name) || damage > 0)
+ public static void UpdateMonsterWidget(Process process, ulong monsterBaseList, ulong mapBaseAddress)
+ {
+ if (mapBaseAddress != 0x0)
{
- player = OverlayViewModel.Instance.TeamWidget.Context.UpdateAndGetPlayer(playerIndex, name, damage);
+ // update pointer address
+ bool isMonsterSelected = MemoryHelper.Read(process, mapBaseAddress + 0x128) != 0x0;
+ if (isMonsterSelected)
+ {
+ ulong selectedMonsterAddress = MemoryHelper.Read(process, mapBaseAddress + 0x148);
+ var selectedMonster = UpdateAndGetMonster(process, selectedMonsterAddress);
+ if (selectedMonster != null)
+ {
+ var toRemoveMonsters = OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Where(m => !m.Id.Equals(selectedMonster.Id));
+ foreach (var obsoleteMonster in toRemoveMonsters.Reverse())
+ {
+ OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Remove(obsoleteMonster);
+ }
+ return;
+ }
+ }
}
- return player;
- }
-
- public static void UpdateMonsterWidget(Process process, ulong lastMonsterAddress)
- {
- if (lastMonsterAddress < 0xffffff)
+ if (monsterBaseList < 0xffffff)
{
OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Clear();
return;
}
- List monsterAddresses = new List();
-
- ulong currentMonsterAddress = lastMonsterAddress;
- while (currentMonsterAddress != 0)
+ var monsterAddresses = new List()
{
- monsterAddresses.Insert(0, currentMonsterAddress);
- currentMonsterAddress = MemoryHelper.Read(process, currentMonsterAddress + DataOffsets.Monster.PreviousMonsterPtr);
- }
+ MemoryHelper.Read(process, MemoryHelper.Read(process, monsterBaseList - 0x30) + 0x10) + 0x40,
+ MemoryHelper.Read(process, monsterBaseList - 0x30) + 0x40,
+ monsterBaseList,
+ };
- List updatedMonsters = new List();
+ var updatedMonsters = new List();
foreach (var monsterAddress in monsterAddresses)
{
var monster = UpdateAndGetMonster(process, monsterAddress);
@@ -284,10 +364,13 @@ private static Monster UpdateAndGetMonster(Process process, ulong monsterAddress
{
Monster monster = null;
- ulong modelPtr = MemoryHelper.Read(process, monsterAddress + DataOffsets.Monster.ModelPtr);
- string id = MemoryHelper.ReadString(process, modelPtr + DataOffsets.MonsterModel.Id, (uint)DataOffsets.MonsterModel.IdLength);
+ var monster_health_address = monsterAddress + DataOffsets.Monster.MonsterHealthComponentOffset;
+ var health_component = MemoryHelper.Read(process, monster_health_address);
+ var nameptr = MemoryHelper.Read(process, monsterAddress + 0x2A0);
+ var id = MemoryHelper.ReadString(process, nameptr + 0x0C, DataOffsets.MonsterModel.IdLength);
+ var maxHealth = MemoryHelper.Read(process, health_component + DataOffsets.MonsterHealthComponent.MaxHealth);
- if (String.IsNullOrEmpty(id))
+ if (string.IsNullOrEmpty(id))
{
return monster;
}
@@ -298,21 +381,34 @@ private static Monster UpdateAndGetMonster(Process process, ulong monsterAddress
return monster;
}
- ulong healthComponentAddress = MemoryHelper.Read(process, monsterAddress + DataOffsets.Monster.PartCollection + DataOffsets.MonsterPartCollection.HealthComponentPtr);
- float maxHealth = MemoryHelper.Read(process, healthComponentAddress + DataOffsets.MonsterHealthComponent.MaxHealth);
if (maxHealth <= 0)
{
return monster;
}
- float currentHealth = MemoryHelper.Read(process, healthComponentAddress + DataOffsets.MonsterHealthComponent.CurrentHealth);
+ float currentHealth = MemoryHelper.Read(process, health_component + DataOffsets.MonsterHealthComponent.CurrentHealth);
float sizeScale = MemoryHelper.Read(process, monsterAddress + DataOffsets.Monster.SizeScale);
+ float scaleModifier = MemoryHelper.Read(process, monsterAddress + DataOffsets.Monster.ScaleModifier);
+ if (scaleModifier <= 0 || scaleModifier >= 2)
+ {
+ scaleModifier = 1;
+ }
- monster = OverlayViewModel.Instance.MonsterWidget.Context.UpdateAndGetMonster(monsterAddress, id, maxHealth, currentHealth, sizeScale);
+ monster = OverlayViewModel.Instance.MonsterWidget.Context.UpdateAndGetMonster(monsterAddress, id, maxHealth, currentHealth, sizeScale, scaleModifier);
+
+ if (ConfigHelper.MonsterData.Values.Monsters.ContainsKey(id) && ConfigHelper.MonsterData.Values.Monsters[id].Parts.Count() > 0)
+ {
+ if (!OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsValid || OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsCurrentPlayerLobbyHost() || !OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsPlayerOnline())
+ {
+ UpdateMonsterParts(process, monster);
+ if (ConfigHelper.MonsterData.Values.Monsters[id].Parts.Where(p => p.IsRemovable).Count() > 0) // In case you are testing add "|| true"
+ {
+ UpdateMonsterRemovableParts(process, monster);
+ }
+ }
- UpdateMonsterParts(process, monster);
- UpdateMonsterRemovableParts(process, monster);
- UpdateMonsterStatusEffects(process, monster);
+ UpdateMonsterStatusEffects(process, monster);
+ }
return monster;
}
@@ -336,17 +432,12 @@ private static void UpdateMonsterParts(Process process, Monster monster)
ulong currentPartOffset = DataOffsets.MonsterPart.NextPart * (ulong)index;
ulong currentPartAddress = firstPartAddress + currentPartOffset;
- float maxHealth = MemoryHelper.Read(process, currentPartAddress + DataOffsets.MonsterPart.MaxHealth);
+ float maxHealth = MemoryHelper.Read(process, currentPartAddress);
- // Read until we reach an element that has a max health of 0, which is presumably the end of the collection
if (maxHealth > 0)
{
UpdateMonsterPart(process, monster, currentPartAddress);
}
- else
- {
- break;
- }
}
}
}
@@ -372,7 +463,7 @@ private static void UpdateMonsterRemovableParts(Process process, Monster monster
}
else
{
- ulong removablePartAddress = monster.Address + DataOffsets.Monster.RemovablePartCollection + DataOffsets.MonsterRemovablePartCollection.FirstRemovablePart;
+ ulong removablePartAddress = monster.Address + DataOffsets.Monster.RemovablePartCollection;
for (int index = 0; index < DataOffsets.MonsterRemovablePartCollection.MaxItemCount; ++index)
{
// Every 16 elements there seems to be a new removable part collection. When we reach this point,
@@ -382,39 +473,22 @@ private static void UpdateMonsterRemovableParts(Process process, Monster monster
{
removablePartAddress += 8;
}
-
- // This is rough/hacky but it removes seemingly valid parts that aren't actually "removable".
- // TODO: Figure out why Paolumu, Barroth, Radobaan have these mysterious removable parts
- bool isValid1 = true;
- bool isValid2 = true;
- bool isValid3 = true;
-
- int validity1 = MemoryHelper.Read(process, removablePartAddress + DataOffsets.MonsterRemovablePart.Validity1);
- isValid1 = validity1 == 1;
- if (!ConfigHelper.Main.Values.Debug.ShowWeirdRemovableParts)
- {
- int validity2 = MemoryHelper.Read(process, removablePartAddress + DataOffsets.MonsterRemovablePart.Validity2);
- int validity3 = MemoryHelper.Read(process, removablePartAddress + DataOffsets.MonsterRemovablePart.Validity3);
-
- isValid2 = validity3 == 0 || validity3 == 1;
-
- isValid3 = true;
- if (validity3 == 0 && validity2 != 1)
- {
- isValid3 = false;
- }
- }
- if (isValid1 && isValid2 && isValid3)
+ uint maxRemovableParts = (uint)ConfigHelper.MonsterData.Values.Monsters[monster.Id].Parts.Where(p => p.IsRemovable).Count();
+ bool isLast = MemoryHelper.Read(process, removablePartAddress + 0x94) == 0x1;
+ //bool isValid = MemoryHelper.Read(process, removablePartAddress + 0x15) == 0;
+ bool isValid = MemoryHelper.Read(process, removablePartAddress + 0x6C) < maxRemovableParts;
+
+ if (isValid)
{
float maxHealth = MemoryHelper.Read(process, removablePartAddress + DataOffsets.MonsterRemovablePart.MaxHealth);
if (maxHealth > 0)
{
UpdateMonsterRemovablePart(process, monster, removablePartAddress);
- }
- else
- {
- break;
+ if (isLast || monster.Parts.Where(p => p.IsRemovable).Count() == maxRemovableParts)
+ {
+ break;
+ }
}
}
@@ -434,59 +508,140 @@ private static void UpdateMonsterRemovablePart(Process process, Monster monster,
private static void UpdateMonsterStatusEffects(Process process, Monster monster)
{
- ulong statusEffectCollectionAddress = monster.Address + DataOffsets.Monster.StatusEffectCollection;
-
- for (int index = 0; index < ConfigHelper.MonsterData.Values.StatusEffects.Length; ++index)
+ int maxIndex = ConfigHelper.MonsterData.Values.StatusEffects.Where(s => s.GroupId.Equals("StatusEffect")).Count() - 1;
+ var statuses = monster.StatusEffects;
+ if (statuses != null && statuses.Where(s => s.GroupId.Equals("StatusEffect")).Any())
{
- var statusEffectConfig = ConfigHelper.MonsterData.Values.StatusEffects[index];
-
- var rootAddress = statusEffectCollectionAddress;
-
- if (statusEffectConfig.PointerOffset != null)
+ for (int i = 0; i < statuses.Count(); i++)
{
- if (TryParseHex(statusEffectConfig.PointerOffset, out var pointerOffset))
+ MonsterStatusEffect status = statuses[i];
+ if (status == null)
{
- rootAddress = MemoryHelper.ReadMultiLevelPointer(false, process, (ulong)((long)rootAddress + pointerOffset), 0);
+ continue;
}
- }
-
- float maxBuildup = 0;
- float currentBuildup = 0;
- if (TryParseHex(statusEffectConfig.CurrentBuildupOffset, out var currentBuildupOffset)
- && TryParseHex(statusEffectConfig.MaxBuildupOffset, out var maxBuildupOffset)
- )
- {
- maxBuildup = MemoryHelper.Read(process, AddOffset(rootAddress, maxBuildupOffset));
+ float currentBuildup = 0;
+ float maxBuildup = MemoryHelper.Read(process, status.Address + DataOffsets.MonsterStatusEffect.MaxBuildup);
if (maxBuildup > 0)
{
- currentBuildup = MemoryHelper.Read(process, AddOffset(rootAddress, currentBuildupOffset));
+ currentBuildup = MemoryHelper.Read(process, status.Address + DataOffsets.MonsterStatusEffect.CurrentBuildup);
}
- }
-
- float maxDuration = 0;
- float currentDuration = 0;
- if (TryParseHex(statusEffectConfig.MaxDurationOffset, out var maxDurationOffset)
- && TryParseHex(statusEffectConfig.CurrentDurationOffset, out var currentDurationOffset)
- )
- {
- maxDuration = MemoryHelper.Read(process, AddOffset(rootAddress, maxDurationOffset));
+ float currentDuration = 0;
+ float maxDuration = MemoryHelper.Read(process, status.Address + DataOffsets.MonsterStatusEffect.MaxDuration);
if (maxDuration > 0)
{
- currentDuration = MemoryHelper.Read(process, AddOffset(rootAddress, currentDurationOffset));
+ currentDuration = MemoryHelper.Read(process, status.Address + DataOffsets.MonsterStatusEffect.CurrentDuration);
}
- }
+ int timesActivatedCount = MemoryHelper.Read(process, status.Address + DataOffsets.MonsterStatusEffect.TimesActivatedCount);
- int timesActivatedCount = 0;
- if (TryParseHex(statusEffectConfig.TimesActivatedOffset, out var timesActivatedOffset))
+ if (maxBuildup > 0 || maxDuration > 0)
+ {
+ uint index = MemoryHelper.Read(process, status.Address + 0x198);
+ if (index <= maxIndex)
+ {
+ var statusEffectConfig = ConfigHelper.MonsterData.Values.StatusEffects[index];
+ monster.UpdateAndGetStatusEffect(status.Address, (int)index, maxBuildup > 0 ? maxBuildup : 1, !statusEffectConfig.InvertBuildup ? currentBuildup : maxBuildup - currentBuildup, maxDuration, !statusEffectConfig.InvertDuration ? currentDuration : maxDuration - currentDuration, timesActivatedCount);
+ }
+ }
+ }
+ }
+ else
+ {
+ ulong baseStatus = MemoryHelper.Read(process, monster.Address + 0x78);
+ baseStatus = MemoryHelper.Read(process, baseStatus + 0x57A8);
+ ulong nani = baseStatus;
+ while (nani != 0)
{
- timesActivatedCount = MemoryHelper.Read(process, AddOffset(rootAddress, timesActivatedOffset));
+ nani = MemoryHelper.Read(process, nani + 0x10);
+ if (nani != 0)
+ {
+ baseStatus = nani;
+ }
}
-
- if (maxBuildup > 0 || maxDuration > 0)
+ ulong currentStatusPointer = baseStatus + 0x40;
+ while (currentStatusPointer != 0x0)
{
- monster.UpdateAndGetStatusEffect(index, maxBuildup > 0 ? maxBuildup : 1, !statusEffectConfig.InvertBuildup ? currentBuildup : maxBuildup - currentBuildup, maxDuration, !statusEffectConfig.InvertDuration ? currentDuration : maxDuration - currentDuration, timesActivatedCount);
+ var currentMonsterInStatus = MemoryHelper.Read(process, currentStatusPointer + 0x188);
+ if (currentMonsterInStatus == monster.Address && !monster.StatusEffects.Where(status => status.Address == currentStatusPointer).Any())
+ {
+ float currentBuildup = 0;
+ float maxBuildup = MemoryHelper.Read(process, currentStatusPointer + DataOffsets.MonsterStatusEffect.MaxBuildup);
+ if (maxBuildup > 0)
+ {
+ currentBuildup = MemoryHelper.Read(process, currentStatusPointer + DataOffsets.MonsterStatusEffect.CurrentBuildup);
+ }
+ float currentDuration = 0;
+ float maxDuration = MemoryHelper.Read(process, currentStatusPointer + DataOffsets.MonsterStatusEffect.MaxDuration);
+ if (maxDuration > 0)
+ {
+ currentDuration = MemoryHelper.Read(process, currentStatusPointer + DataOffsets.MonsterStatusEffect.CurrentDuration);
+ }
+ int timesActivatedCount = MemoryHelper.Read(process, currentStatusPointer + DataOffsets.MonsterStatusEffect.TimesActivatedCount);
+
+ if (maxBuildup > 0 || maxDuration > 0)
+ {
+ uint index = MemoryHelper.Read(process, currentStatusPointer + 0x198);
+ if (index <= maxIndex && !((index == 14 || index == 15) && monster.isElder)) // skip traps for elders
+ {
+ var statusEffectConfig = ConfigHelper.MonsterData.Values.StatusEffects[index];
+ monster.UpdateAndGetStatusEffect(currentStatusPointer, (int)index, maxBuildup > 0 ? maxBuildup : 1, !statusEffectConfig.InvertBuildup ? currentBuildup : maxBuildup - currentBuildup, maxDuration, !statusEffectConfig.InvertDuration ? currentDuration : maxDuration - currentDuration, timesActivatedCount);
+ }
+ }
+ }
+ currentStatusPointer = MemoryHelper.Read(process, currentStatusPointer + 0x18);
}
}
+
+ // Stamina
+
+ ulong staminaAddress = monster.Address + DataOffsets.Monster.MonsterStaminaOffset;
+ float maxStaminaBuildUp = MemoryHelper.Read(process, staminaAddress + 0x4);
+ float currentStaminaBuildUp = 0;
+ if (maxStaminaBuildUp > 0)
+ {
+ currentStaminaBuildUp = MemoryHelper.Read(process, staminaAddress);
+ }
+ float maxFatigueDuration = MemoryHelper.Read(process, staminaAddress + 0x0C);
+ float currentFatigueDuration = 0;
+ if (maxFatigueDuration > 0)
+ {
+ currentFatigueDuration = MemoryHelper.Read(process, staminaAddress + 0x10);
+ }
+ int fatigueActivatedCount = MemoryHelper.Read(process, staminaAddress + 0x14);
+ MonsterStatusEffectConfig statusEffect = null;
+ if (currentFatigueDuration > 0)
+ {
+ statusEffect = ConfigHelper.MonsterData.Values.StatusEffects.SingleOrDefault(s => s.GroupId.Equals("Fatigue"));
+ }
+ else
+ {
+ statusEffect = ConfigHelper.MonsterData.Values.StatusEffects.SingleOrDefault(s => s.GroupId.Equals("Stamina"));
+ }
+
+ if (maxStaminaBuildUp > 0 || currentFatigueDuration > 0)
+ {
+ monster.UpdateAndGetStatusEffect(staminaAddress, Array.IndexOf(ConfigHelper.MonsterData.Values.StatusEffects, statusEffect), maxStaminaBuildUp > 0 ? maxStaminaBuildUp : 1, !statusEffect.InvertBuildup ? currentStaminaBuildUp : maxStaminaBuildUp - currentStaminaBuildUp, maxFatigueDuration, !statusEffect.InvertDuration ? currentFatigueDuration : maxFatigueDuration - currentFatigueDuration, fatigueActivatedCount);
+ }
+
+ // Rage
+ ulong rageAddress = monster.Address + DataOffsets.Monster.MonsterRageOffset;
+ float maxRageBuildUp = MemoryHelper.Read(process, rageAddress + 0x18);
+ float currentRageBuildUp = 0;
+ if (maxRageBuildUp > 0)
+ {
+ currentRageBuildUp = MemoryHelper.Read(process, rageAddress - 0x0C);
+ }
+ float maxRageDuration = MemoryHelper.Read(process, rageAddress + 0x04);
+ float currentRageDuration = 0;
+ if (maxRageDuration > 0)
+ {
+ currentRageDuration = MemoryHelper.Read(process, rageAddress + 0x00);
+ }
+ int rageActivatedCount = MemoryHelper.Read(process, rageAddress + 0x10);
+ var rageStatusEffect = ConfigHelper.MonsterData.Values.StatusEffects.SingleOrDefault(s => s.GroupId.Equals("Rage"));//[33]; // 33 is rage
+ if (maxRageBuildUp > 0 || maxRageDuration > 0)
+ {
+ monster.UpdateAndGetStatusEffect(rageAddress, Array.IndexOf(ConfigHelper.MonsterData.Values.StatusEffects, rageStatusEffect), maxRageBuildUp > 0 ? maxRageBuildUp : 1, !rageStatusEffect.InvertBuildup ? currentRageBuildUp : maxRageBuildUp - currentRageBuildUp, maxRageDuration, !rageStatusEffect.InvertDuration ? currentRageDuration : maxRageDuration - currentRageDuration, rageActivatedCount);
+ }
}
}
}
diff --git a/SmartHunter/Game/InputControl.cs b/SmartHunter/Game/InputControl.cs
index a387ac47..83134617 100644
--- a/SmartHunter/Game/InputControl.cs
+++ b/SmartHunter/Game/InputControl.cs
@@ -1,8 +1,9 @@
-namespace SmartHunter.Game
+namespace SmartHunter.Game
{
public enum InputControl
{
ManipulateWidget,
- HideWidgets
+ HideWidgets,
+ ToggleWidgests,
}
}
diff --git a/SmartHunter/Game/MhwMemoryUpdater.cs b/SmartHunter/Game/MhwMemoryUpdater.cs
index 2665691f..22567831 100644
--- a/SmartHunter/Game/MhwMemoryUpdater.cs
+++ b/SmartHunter/Game/MhwMemoryUpdater.cs
@@ -1,128 +1,141 @@
-using SmartHunter.Core;
+using System.Linq;
+using SmartHunter.Core;
using SmartHunter.Core.Helpers;
using SmartHunter.Game.Data.ViewModels;
using SmartHunter.Game.Helpers;
-using System.Linq;
namespace SmartHunter.Game
{
public class MhwMemoryUpdater : MemoryUpdater
{
+ BytePattern m_CurrentPlayerNamePattern = new BytePattern(ConfigHelper.Memory.Values.CurrentPlayerNamePattern);
+ BytePattern m_CurrentWeaponPattern = new BytePattern(ConfigHelper.Memory.Values.CurrentWeaponPattern);
BytePattern m_PlayerDamagePattern = new BytePattern(ConfigHelper.Memory.Values.PlayerDamagePattern);
BytePattern m_PlayerNamePattern = new BytePattern(ConfigHelper.Memory.Values.PlayerNamePattern);
BytePattern m_MonsterPattern = new BytePattern(ConfigHelper.Memory.Values.MonsterPattern);
- BytePattern m_MonsterOffsetPattern = new BytePattern(ConfigHelper.Memory.Values.MonsterOffsetPattern);
BytePattern m_PlayerBuffPattern = new BytePattern(ConfigHelper.Memory.Values.PlayerBuffPattern);
+ BytePattern m_SelectedMonsterPattern = new BytePattern(ConfigHelper.Memory.Values.SelectedMonsterPattern);
+ BytePattern m_LobbyStatusPattern = new BytePattern(ConfigHelper.Memory.Values.LobbyStatusPattern);
- protected override string ProcessName
- {
- get
- {
- return ConfigHelper.Memory.Values.ProcessName;
- }
- }
+ protected override string ProcessName => ConfigHelper.Memory.Values.ProcessName;
- protected override int ThreadsPerScan
- {
- get
- {
- return ConfigHelper.Memory.Values.ThreadsPerScan;
- }
- }
+ protected override int ThreadsPerScan => ConfigHelper.Memory.Values.ThreadsPerScan;
- protected override BytePattern[] Patterns
- {
- get
+ protected override BytePattern[] Patterns => new BytePattern[]
{
- return new BytePattern[]
- {
- m_PlayerDamagePattern,
- m_PlayerNamePattern,
- m_MonsterPattern,
- m_MonsterOffsetPattern,
- m_PlayerBuffPattern
- };
- }
- }
+ m_CurrentPlayerNamePattern,
+ m_CurrentWeaponPattern,
+ m_PlayerDamagePattern,
+ m_PlayerNamePattern,
+ m_MonsterPattern,
+ m_PlayerBuffPattern,
+ m_SelectedMonsterPattern,
+ m_LobbyStatusPattern
+ };
- protected override int UpdatesPerSecond
- {
- get
- {
- return ConfigHelper.Main.Values.Overlay.UpdatesPerSecond;
- }
- }
+ protected override int UpdatesPerSecond => ConfigHelper.Main.Values.Overlay.UpdatesPerSecond;
- protected override bool ShutdownWhenProcessExits
- {
- get
- {
- return ConfigHelper.Main.Values.ShutdownWhenProcessExits;
- }
- }
+ protected override bool ShutdownWhenProcessExits => ConfigHelper.Main.Values.ShutdownWhenProcessExits;
- public MhwMemoryUpdater()
- {
- ConfigHelper.Main.Loaded += (s, e) => { TryUpdateTimerInterval(); };
- }
+ public MhwMemoryUpdater() => ConfigHelper.Main.Loaded += (s, e) => { TryUpdateTimerInterval(); };
protected override void UpdateMemory()
{
UpdateVisibility();
+ /*
+ var range = new AddressRange(0x140000000, 0x226a3000);
+ var range = new AddressRange(0x140000000, 0x169233000);
+ //var pattern = new BytePattern(new Config.BytePatternConfig("48 8B 05 ?? ?? ?? ?? 41 8B", "140000000", "163B0A000", null));
- bool traceUniquePointers = ConfigHelper.Main.Values.Debug.TraceUniquePointers;
+ var pattern = new BytePattern(new Config.BytePatternConfig("null", "48 8B 0D ?? ?? ?? ??", null));
+ var matches = MemoryHelper.FindPatternAddresses(Process, range, pattern, false);
- if (ConfigHelper.Main.Values.Overlay.MonsterWidget.IsVisible)
- {
- var monsterRootPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_MonsterPattern.MatchedAddresses.First());
- var monsterOffset = MemoryHelper.ReadStaticOffset(Process, m_MonsterOffsetPattern.MatchedAddresses.First());
- var lastMonsterAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, monsterRootPtr, monsterOffset, 0x8F9BC * 8, 0, 0);
+ Log.WriteLine($"Found {matches.Count()} matches...");
- MhwHelper.UpdateMonsterWidget(Process, lastMonsterAddress);
- }
- else if (OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Any())
+ ulong[] lookingFor = new ulong[1] { 0x144DF2890 };
+
+ var res = new System.Collections.Generic.List();
+
+ foreach (ulong address in matches)
{
- OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Clear();
+ ulong lear = MemoryHelper.LoadEffectiveAddressRelative(Process, address);
+ foreach (ulong looking in lookingFor)
+ {
+ if (looking == lear)
+ {
+ res.Add(address);
+ //Log.WriteLine($"Found match for 0x{looking} at 0x{address}");
+ }
+ }
}
+ */
+ var traceUniquePointers = ConfigHelper.Main.Values.Debug.TraceUniquePointers;
- if (ConfigHelper.Main.Values.Overlay.TeamWidget.IsVisible)
+ if (m_PlayerNamePattern.MatchedAddresses.Any() && m_CurrentPlayerNamePattern.MatchedAddresses.Any() && m_CurrentWeaponPattern.MatchedAddresses.Any() && m_LobbyStatusPattern.MatchedAddresses.Any())
{
- ulong playerNamesPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_PlayerNamePattern.MatchedAddresses.First());
- var playerDamageRootPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_PlayerDamagePattern.MatchedAddresses.First());
- var playerDamageCollectionAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, playerDamageRootPtr, 0x48 + 0x20 * 0x58);
+ var playerNamesPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_PlayerNamePattern.MatchedAddresses.First());
var playerNamesAddress = MemoryHelper.Read(Process, playerNamesPtr);
- MhwHelper.UpdateTeamWidget(Process, playerDamageCollectionAddress, playerNamesAddress);
- }
- else if (OverlayViewModel.Instance.TeamWidget.Context.Players.Any())
- {
- OverlayViewModel.Instance.TeamWidget.Context.Players.Clear();
+ ulong currentPlayerNamePtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_CurrentPlayerNamePattern.MatchedAddresses.First());
+ //ulong currentFelyneNameAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, currentPlayerNamePtr, 0xB40, 0x0, 0x890, 0x160, 0x8, 0x1E8, 0x7DC);
+
+ var currentPlayerNameAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, currentPlayerNamePtr, 0xB20, 0x0, 0x530, 0xC0, 0x8, 0x78, 0x78);
+
+ var currentWeaponPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_CurrentWeaponPattern.MatchedAddresses.First());
+ var currentWeaponAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, currentWeaponPtr, 0x80, 0x7500);
+
+ var lobbyStatusPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_LobbyStatusPattern.MatchedAddresses.First());
+ var lobbyStatusAddress = MemoryHelper.Read(Process, lobbyStatusPtr);
+
+ MhwHelper.UpdateCurrentGame(Process, playerNamesAddress, currentPlayerNameAddress, currentWeaponAddress, lobbyStatusAddress);
}
- if (ConfigHelper.Main.Values.Overlay.PlayerWidget.IsVisible)
+ if (!OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsValid || OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsPlayerInLobby())
{
- var playerBuffRootPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_PlayerBuffPattern.MatchedAddresses.First());
-
- // The local player is guaranteed to be the last item in the list,
- // So, keep reading each pointer in the collection until we reach null
- var buffPtr = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, playerBuffRootPtr, 0X9B0 + 0XC8, 0);
- ulong lastBuffAddress = 0;
- ulong currentBuffAddress = MemoryHelper.Read(Process, buffPtr);
- while (currentBuffAddress != 0)
+ if (ConfigHelper.Main.Values.Overlay.MonsterWidget.IsVisible && m_MonsterPattern.MatchedAddresses.Any())
{
- lastBuffAddress = currentBuffAddress;
- buffPtr += 8;
- currentBuffAddress = MemoryHelper.Read(Process, buffPtr);
+ var monsterRootPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_MonsterPattern.MatchedAddresses.First()); // - 0x36CE0(old) ... yeah i know this is basically a static pointer
+ var monsterBaseList = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, monsterRootPtr, 0x698, 0x0, 0x138, 0x0);
+ ulong mapBaseAddress = 0x0;
+ if (ConfigHelper.Main.Values.Overlay.MonsterWidget.ShowOnlySelectedMonster && m_SelectedMonsterPattern.MatchedAddresses.Any())
+ {
+ var mapPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_SelectedMonsterPattern.MatchedAddresses.First());
+ mapBaseAddress = MemoryHelper.Read(Process, mapPtr);
+ }
+
+ MhwHelper.UpdateMonsterWidget(Process, monsterBaseList, mapBaseAddress);
}
+ else if (OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Any())
+ {
+ OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Clear();
+ }
+
+ if (ConfigHelper.Main.Values.Overlay.TeamWidget.IsVisible && m_PlayerDamagePattern.MatchedAddresses.Any() && m_PlayerNamePattern.MatchedAddresses.Any() && (!OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsValid || OverlayViewModel.Instance.DebugWidget.Context.CurrentGame.IsPlayerOnline()))
+ {
+ var playerNamesPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_PlayerNamePattern.MatchedAddresses.First());
+ var playerDamageRootPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_PlayerDamagePattern.MatchedAddresses.First());
+ var playerDamageCollectionAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, playerDamageRootPtr, (long)MhwHelper.DataOffsets.PlayerDamageCollection.FirstPlayerPtr + (long)MhwHelper.DataOffsets.PlayerDamageCollection.MaxPlayerCount * sizeof(long) * (long)MhwHelper.DataOffsets.PlayerDamageCollection.NextPlayerPtr);
+ var playerNamesAddress = MemoryHelper.Read(Process, playerNamesPtr);
- var buffAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, lastBuffAddress + 0x79D0, 0);
- var equipmentAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, buffAddress + 0x8, 0x70, 0x78, 0x50, -0x10);
- var weaponAddress = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, buffAddress + 0x10, 0x8, 0x78, 0x48, 0x0);
+ MhwHelper.UpdateTeamWidget(Process, playerDamageCollectionAddress, playerNamesAddress);
+ }
+ else if (OverlayViewModel.Instance.TeamWidget.Context.Players.Any())
+ {
+ OverlayViewModel.Instance.TeamWidget.Context.ClearPlayers();
+ }
- var isBuffAddressValid = MemoryHelper.Read(Process, equipmentAddress + 0x20) != 0;
- var isEquipmentAddressValid = MemoryHelper.Read(Process, equipmentAddress + 0x8) == 0;
- if (isBuffAddressValid && isEquipmentAddressValid)
+ if (ConfigHelper.Main.Values.Overlay.PlayerWidget.IsVisible && m_PlayerBuffPattern.MatchedAddresses.Any())
{
+ var playerBuffRootPtr = MemoryHelper.LoadEffectiveAddressRelative(Process, m_PlayerBuffPattern.MatchedAddresses.First());
+
+ var buffPtr = MemoryHelper.ReadMultiLevelPointer(traceUniquePointers, Process, playerBuffRootPtr, 0x8C8, 0x1C0, 0x0);
+
+ var lastBuffAddress = MemoryHelper.Read(Process, buffPtr - 0x38) + 0x80;
+
+ var equipmentAddress = MemoryHelper.Read(Process, lastBuffAddress + 0x14F8);
+ var weaponAddress = MemoryHelper.Read(Process, lastBuffAddress + 0x76B0);
+ var buffAddress = MemoryHelper.Read(Process, lastBuffAddress + 0x7D20);
+
MhwHelper.UpdatePlayerWidget(Process, buffAddress, equipmentAddress, weaponAddress);
}
else if (OverlayViewModel.Instance.PlayerWidget.Context.StatusEffects.Any())
@@ -130,13 +143,15 @@ protected override void UpdateMemory()
OverlayViewModel.Instance.PlayerWidget.Context.StatusEffects.Clear();
}
}
- else if (OverlayViewModel.Instance.PlayerWidget.Context.StatusEffects.Any())
+ else
{
+ OverlayViewModel.Instance.MonsterWidget.Context.Monsters.Clear();
+ OverlayViewModel.Instance.TeamWidget.Context.ClearPlayers();
OverlayViewModel.Instance.PlayerWidget.Context.StatusEffects.Clear();
}
}
- void UpdateVisibility()
+ private void UpdateVisibility()
{
// Show or hide the overlay depending on whether the game process is active
var foregroundWindowHandle = WindowsApi.GetForegroundWindow();
@@ -144,7 +159,7 @@ void UpdateVisibility()
{
OverlayViewModel.Instance.IsGameActive = false;
}
- else if (!OverlayViewModel.Instance.IsVisible &&
+ else if (!OverlayViewModel.Instance.IsVisible &&
(!ConfigHelper.Main.Values.Overlay.HideWhenGameWindowIsInactive || foregroundWindowHandle == Process.MainWindowHandle))
{
OverlayViewModel.Instance.IsGameActive = true;
diff --git a/SmartHunter/Game/MhwOverlay.cs b/SmartHunter/Game/MhwOverlay.cs
index e37a164a..22684738 100644
--- a/SmartHunter/Game/MhwOverlay.cs
+++ b/SmartHunter/Game/MhwOverlay.cs
@@ -1,25 +1,20 @@
-using SmartHunter.Core;
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Windows;
+using System.Windows.Input;
+using SmartHunter.Core;
using SmartHunter.Core.Helpers;
using SmartHunter.Core.Windows;
using SmartHunter.Game.Data.ViewModels;
using SmartHunter.Game.Helpers;
-using System.Linq;
-using System.Windows;
-using System.Windows.Input;
namespace SmartHunter.Game
{
public class MhwOverlay : Overlay
{
- MhwMemoryUpdater m_MemoryUpdater;
-
- protected override bool ShowWindows
- {
- get
- {
- return ConfigHelper.Main.Values.Overlay.ShowWindows;
- }
- }
+ private readonly MhwMemoryUpdater _memoryUpdater;
+ private readonly Stopwatch _stopwatch;
public MhwOverlay(Window mainWindow, params WidgetWindow[] widgetWindows) : base(mainWindow, widgetWindows)
{
@@ -27,11 +22,9 @@ public MhwOverlay(Window mainWindow, params WidgetWindow[] widgetWindows) : base
ConfigHelper.Localization.Loaded += (s, e) => { RefreshWidgetsLayout(); };
ConfigHelper.MonsterData.Loaded += (s, e) => { RefreshWidgetsLayout(); };
ConfigHelper.PlayerData.Loaded += (s, e) => { RefreshWidgetsLayout(); };
-
- if (!ConfigHelper.Main.Values.Debug.UseSampleData)
- {
- m_MemoryUpdater = new MhwMemoryUpdater();
- }
+ _memoryUpdater = !ConfigHelper.Main.Values.Debug.UseSampleData ? _memoryUpdater = new MhwMemoryUpdater() : null;
+ _stopwatch = new Stopwatch();
+ _stopwatch.Start();
}
protected override void InputReceived(Key key, bool isDown)
@@ -48,13 +41,10 @@ private void HandleControl(InputControl control, bool isDown)
{
OverlayViewModel.Instance.CanManipulateWindows = true;
- if (!ShowWindows)
- {
- // Make all the windows selectable
- foreach (var widgetWindow in WidgetWindows)
- {
- WindowHelper.SetTopMostSelectable(widgetWindow as Window);
- }
+ // Make all the windows selectable
+ foreach (var widgetWindow in WidgetWindows)
+ {
+ WindowHelper.SetTopMostSelectable(widgetWindow as Window);
}
}
else if (control == InputControl.ManipulateWidget && !isDown && OverlayViewModel.Instance.CanManipulateWindows)
@@ -66,10 +56,7 @@ private void HandleControl(InputControl control, bool isDown)
// Return all windows to their click through state
foreach (var widgetWindow in WidgetWindows)
{
- if (!ShowWindows)
- {
- WindowHelper.SetTopMostTransparent(widgetWindow as Window);
- }
+ WindowHelper.SetTopMostTransparent(widgetWindow as Window);
if (widgetWindow.Widget.CanSaveConfig)
{
@@ -87,6 +74,14 @@ private void HandleControl(InputControl control, bool isDown)
{
OverlayViewModel.Instance.HideWidgetsRequested = isDown;
}
+ else if (control == InputControl.ToggleWidgests)
+ {
+ if (_stopwatch.Elapsed < TimeSpan.FromSeconds(2))
+ return;
+
+ OverlayViewModel.Instance.HideWidgetsRequested = !OverlayViewModel.Instance.HideWidgetsRequested;
+ _stopwatch.Restart();
+ }
}
}
}
diff --git a/SmartHunter/Properties/AssemblyInfo.cs b/SmartHunter/Properties/AssemblyInfo.cs
index 748c9238..78c67f7f 100644
--- a/SmartHunter/Properties/AssemblyInfo.cs
+++ b/SmartHunter/Properties/AssemblyInfo.cs
@@ -1,10 +1,7 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
+using System.Runtime.InteropServices;
using System.Windows;
using System.Windows.Media;
-[assembly: AssemblyTitle("SmartHunter")]
-[assembly: AssemblyVersion("1.1.*")]
[assembly: DisableDpiAwareness]
[assembly: ComVisible(false)]
diff --git a/SmartHunter/Properties/Resources.Designer.cs b/SmartHunter/Properties/Resources.Designer.cs
index 4b0f1a3a..89d77a8f 100644
--- a/SmartHunter/Properties/Resources.Designer.cs
+++ b/SmartHunter/Properties/Resources.Designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Il codice è stato generato da uno strumento.
+// Versione runtime:4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
+// il codice viene rigenerato.
//
//------------------------------------------------------------------------------
@@ -13,13 +13,13 @@ namespace SmartHunter.Properties {
///
- /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
+ // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
+ // tramite uno strumento quale ResGen o Visual Studio.
+ // Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
+ // con l'opzione /str oppure ricompilare il progetto VS.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -33,7 +33,7 @@ internal Resources() {
}
///
- /// Returns the cached ResourceManager instance used by this class.
+ /// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
@@ -47,8 +47,8 @@ internal Resources() {
}
///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
+ /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
+ /// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
diff --git a/SmartHunter/Properties/Settings.Designer.cs b/SmartHunter/Properties/Settings.Designer.cs
index 0e5a35cb..d23a5051 100644
--- a/SmartHunter/Properties/Settings.Designer.cs
+++ b/SmartHunter/Properties/Settings.Designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
+// Il codice è stato generato da uno strumento.
+// Versione runtime:4.0.30319.42000
//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
+// il codice viene rigenerato.
//
//------------------------------------------------------------------------------
@@ -12,7 +12,7 @@ namespace SmartHunter.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.4.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/SmartHunter/SmartHunter.csproj b/SmartHunter/SmartHunter.csproj
index e16d4eda..9c29fbae 100644
--- a/SmartHunter/SmartHunter.csproj
+++ b/SmartHunter/SmartHunter.csproj
@@ -1,226 +1,45 @@
-
-
-
-
- Debug
- AnyCPU
- {F5F99CEF-1C16-48E6-A88B-1A66D3B53998}
- WinExe
- SmartHunter
- SmartHunter
- v4.7.1
- 512
- {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- true
- false
-
-
-
-
-
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- true
- bin\x64\Debug\
- DEBUG;TRACE
- full
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
- latest
-
-
- bin\x64\Release\
- TRACE
- true
- pdbonly
- x64
- prompt
- MinimumRecommendedRules.ruleset
- true
-
-
-
-
-
-
-
-
-
-
-
- 4.0
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MonsterWidgetWindow.xaml
-
-
-
- PlayerWidgetWindow.xaml
-
-
- TeamWidgetWindow.xaml
-
-
-
-
-
-
-
- Designer
- XamlIntelliSenseFileGenerator
-
-
- MSBuild:Compile
- Designer
-
-
- App.xaml
- Code
-
-
- ConsoleWindow.xaml
- Code
-
-
- Designer
- MSBuild:Compile
-
-
- MSBuild:Compile
- Designer
-
-
- Designer
- MSBuild:Compile
-
-
-
-
- Code
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
-
-
-
-
-
-
-
-
-
- xcopy /E /Y "$(ProjectDir)Ui\Resources" "$(TargetDir)"
-
+
+
+ {F5F99CEF-1C16-48E6-A88B-1A66D3B53998}
+ WinExe
+ net461
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ true
+ false
+ latest
+ SmartHunter
+ false
+ 1.6.1.0
+ 1.6.1.0
+ bin\$(Configuration)
+ true
+ false
+
+
+ full
+
+
+ pdbonly
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmartHunter/Ui/Converters/AngleToIsLargeArcConverter.cs b/SmartHunter/Ui/Converters/AngleToIsLargeArcConverter.cs
index 4beb11c8..c0913b7a 100644
--- a/SmartHunter/Ui/Converters/AngleToIsLargeArcConverter.cs
+++ b/SmartHunter/Ui/Converters/AngleToIsLargeArcConverter.cs
@@ -1,16 +1,17 @@
using System;
+using System.Globalization;
using System.Windows.Data;
namespace SmartHunter.Ui.Converters
{
class AngleToIsLargeArcConverter : IValueConverter
{
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return (float)value > 180;
}
- public object ConvertBack(object value, Type targetTypes, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetTypes, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
diff --git a/SmartHunter/Ui/Converters/AngleToPointConverter.cs b/SmartHunter/Ui/Converters/AngleToPointConverter.cs
index 575426df..e0b143fc 100644
--- a/SmartHunter/Ui/Converters/AngleToPointConverter.cs
+++ b/SmartHunter/Ui/Converters/AngleToPointConverter.cs
@@ -1,4 +1,5 @@
using System;
+using System.Globalization;
using System.Windows;
using System.Windows.Data;
@@ -6,7 +7,7 @@ namespace SmartHunter.Ui.Converters
{
public class AngleToPointConverter : IValueConverter
{
- public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (float.TryParse(parameter as string, out var radius))
{
@@ -23,7 +24,7 @@ public object Convert(object value, Type targetType, object parameter, System.Gl
return Binding.DoNothing;
}
- public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
diff --git a/SmartHunter/Ui/Converters/BoolToVisibilityConverter.cs b/SmartHunter/Ui/Converters/BoolToVisibilityConverter.cs
index 86e93767..036b573b 100644
--- a/SmartHunter/Ui/Converters/BoolToVisibilityConverter.cs
+++ b/SmartHunter/Ui/Converters/BoolToVisibilityConverter.cs
@@ -1,4 +1,6 @@
-using System.Windows;
+using System;
+using System.Globalization;
+using System.Windows;
using System.Windows.Data;
namespace SmartHunter.Ui.Converters
@@ -8,7 +10,7 @@ public class BoolToVisibilityConverter : IValueConverter
public Visibility TrueValue { get; set; } = Visibility.Visible;
public Visibility FalseValue { get; set; } = Visibility.Collapsed;
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
bool invert = parameter != null;
@@ -27,9 +29,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return Binding.DoNothing;
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Ui/Converters/ColorTransformConverter.cs b/SmartHunter/Ui/Converters/ColorTransformConverter.cs
index 62e21a95..cdbc5fcd 100644
--- a/SmartHunter/Ui/Converters/ColorTransformConverter.cs
+++ b/SmartHunter/Ui/Converters/ColorTransformConverter.cs
@@ -1,4 +1,6 @@
-using System.Windows.Data;
+using System;
+using System.Globalization;
+using System.Windows.Data;
using System.Windows.Media;
namespace SmartHunter.Ui.Converters
@@ -9,7 +11,7 @@ public class ColorTransformConverter : IValueConverter
public double BrightnessAdjustment { get; set; } = 0f;
public double? OpacityOverride { get; set; } = null;
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
Color? color = null;
@@ -65,9 +67,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return Binding.DoNothing;
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
static Color HsvToColor(double hue, double saturation, double value)
diff --git a/SmartHunter/Ui/Converters/EnumComparisonConverter.cs b/SmartHunter/Ui/Converters/EnumComparisonConverter.cs
index 7e7ad022..910b6f17 100644
--- a/SmartHunter/Ui/Converters/EnumComparisonConverter.cs
+++ b/SmartHunter/Ui/Converters/EnumComparisonConverter.cs
@@ -1,4 +1,6 @@
-using System.Windows.Data;
+using System;
+using System.Globalization;
+using System.Windows.Data;
namespace SmartHunter.Ui.Converters
{
@@ -6,7 +8,7 @@ public class EnumComparisonConverter : IValueConverter
{
public bool Invert { get; set; } = false;
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
bool result = false;
@@ -39,9 +41,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return result;
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
}
}
\ No newline at end of file
diff --git a/SmartHunter/Ui/Converters/FractionToPercentageConverter.cs b/SmartHunter/Ui/Converters/FractionToPercentageConverter.cs
index 6b808a7a..e7303b06 100644
--- a/SmartHunter/Ui/Converters/FractionToPercentageConverter.cs
+++ b/SmartHunter/Ui/Converters/FractionToPercentageConverter.cs
@@ -1,10 +1,12 @@
-using System.Windows.Data;
+using System;
+using System.Globalization;
+using System.Windows.Data;
namespace SmartHunter.Ui.Converters
{
public class FractionToPercentageConverter : IValueConverter
{
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is float)
{
@@ -15,9 +17,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return Binding.DoNothing;
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
}
}
diff --git a/SmartHunter/Ui/Converters/LocalizerConverter.cs b/SmartHunter/Ui/Converters/LocalizerConverter.cs
index 2affca36..480926ff 100644
--- a/SmartHunter/Ui/Converters/LocalizerConverter.cs
+++ b/SmartHunter/Ui/Converters/LocalizerConverter.cs
@@ -1,12 +1,14 @@
-using SmartHunter.Core;
-using SmartHunter.Game.Helpers;
+using System;
+using System.Globalization;
using System.Windows.Data;
+using SmartHunter.Core;
+using SmartHunter.Game.Helpers;
namespace SmartHunter.Ui.Converters
{
public class LocalizerConverter : IValueConverter
{
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
string stringId = null;
if (value != null && value is string)
@@ -26,9 +28,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return LocalizationHelper.GetString(stringId);
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
}
}
\ No newline at end of file
diff --git a/SmartHunter/Ui/Converters/NumberComparisonConverter.cs b/SmartHunter/Ui/Converters/NumberComparisonConverter.cs
index d068b694..57daa685 100644
--- a/SmartHunter/Ui/Converters/NumberComparisonConverter.cs
+++ b/SmartHunter/Ui/Converters/NumberComparisonConverter.cs
@@ -1,4 +1,6 @@
-using System.Windows.Data;
+using System;
+using System.Globalization;
+using System.Windows.Data;
namespace SmartHunter.Ui.Converters
{
@@ -17,7 +19,7 @@ public enum NumberComparison
public bool Invert { get; set; } = false;
public NumberComparison Comparison { get; set; } = NumberComparison.Equal;
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
bool result = false;
@@ -113,9 +115,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return result;
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
}
}
\ No newline at end of file
diff --git a/SmartHunter/Ui/Converters/NumberToCenteredMarginConverter.cs b/SmartHunter/Ui/Converters/NumberToCenteredMarginConverter.cs
new file mode 100644
index 00000000..7a763d13
--- /dev/null
+++ b/SmartHunter/Ui/Converters/NumberToCenteredMarginConverter.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace SmartHunter.Ui.Converters
+{
+ public class NumberToCenteredMarginConverter : IValueConverter
+ {
+ public static int Width { get { return 300; } }
+ public static int Spacing { get { return 46; } }
+ public static int MaxMonstersCount { get { return 3; } }
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is int)
+ {
+ if ((int)value <= MaxMonstersCount)
+ {
+ return new Thickness(((Width + Spacing) * (MaxMonstersCount - (int)value)) / ((int)value + 1), 0, Spacing, 0);
+ }
+ }
+ return new Thickness(0, 0, Spacing, 0);
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SmartHunter/Ui/Converters/PlayerToPlayerIndexConverter.cs b/SmartHunter/Ui/Converters/PlayerToPlayerIndexConverter.cs
index 00662cb9..2218259a 100644
--- a/SmartHunter/Ui/Converters/PlayerToPlayerIndexConverter.cs
+++ b/SmartHunter/Ui/Converters/PlayerToPlayerIndexConverter.cs
@@ -1,12 +1,14 @@
-using SmartHunter.Game.Data;
-using SmartHunter.Game.Data.ViewModels;
+using System;
+using System.Globalization;
using System.Windows.Data;
+using SmartHunter.Game.Data;
+using SmartHunter.Game.Data.ViewModels;
namespace SmartHunter.Ui.Converters
{
public class PlayerToPlayerIndexConverter : IValueConverter
{
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var player = value as Player;
@@ -18,9 +20,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return Binding.DoNothing;
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
}
}
diff --git a/SmartHunter/Ui/Converters/StringArrayContainsConverter.cs b/SmartHunter/Ui/Converters/StringArrayContainsConverter.cs
index 7a5b2ee6..61adec7d 100644
--- a/SmartHunter/Ui/Converters/StringArrayContainsConverter.cs
+++ b/SmartHunter/Ui/Converters/StringArrayContainsConverter.cs
@@ -1,11 +1,13 @@
-using System.Linq;
+using System;
+using System.Globalization;
+using System.Linq;
using System.Windows.Data;
namespace SmartHunter.Ui.Converters
{
public class StringArrayContainsConverter : IValueConverter
{
- public object Convert(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is string[])
{
@@ -16,9 +18,9 @@ public object Convert(object value, System.Type targetType, object parameter, Sy
return Binding.DoNothing;
}
- public object ConvertBack(object value, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
- throw new System.NotImplementedException();
+ throw new NotImplementedException();
}
}
}
diff --git a/SmartHunter/Ui/Converters/StringFormatConverter.cs b/SmartHunter/Ui/Converters/StringFormatConverter.cs
index 196f471e..d7185f2c 100644
--- a/SmartHunter/Ui/Converters/StringFormatConverter.cs
+++ b/SmartHunter/Ui/Converters/StringFormatConverter.cs
@@ -6,7 +6,7 @@ namespace SmartHunter.Ui.Converters
{
public class StringFormatConverter : IMultiValueConverter
{
- public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
+ public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
{
if (parameter != null)
{
diff --git a/SmartHunter/Ui/Converters/WeaponTypeToNameConverter.cs b/SmartHunter/Ui/Converters/WeaponTypeToNameConverter.cs
new file mode 100644
index 00000000..63f0674d
--- /dev/null
+++ b/SmartHunter/Ui/Converters/WeaponTypeToNameConverter.cs
@@ -0,0 +1,90 @@
+using System;
+using System.Globalization;
+using System.Windows.Data;
+using SmartHunter.Game.Data;
+
+namespace SmartHunter.Ui.Converters
+{
+ public class WeaponTypeToNameConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (value is WeaponType)
+ {
+ if ((WeaponType)value == WeaponType.NO_WEAPON)
+ {
+ return "";
+ }
+ if ((WeaponType)value == WeaponType.BOW)
+ {
+ return "Bow";
+ }if ((WeaponType)value == WeaponType.CHARGE_BLADE)
+ {
+ return "Charge Blade";
+ }
+ if ((WeaponType)value == WeaponType.DUAL_BLADES)
+ {
+ return "Dual Blades";
+ }
+ if ((WeaponType)value == WeaponType.GREAT_SWORD)
+ {
+ return "Great Sword";
+ }
+ if ((WeaponType)value == WeaponType.GUNLANCE)
+ {
+ return "Gunlance";
+ }
+ if ((WeaponType)value == WeaponType.HAMMER)
+ {
+ return "Hammer";
+ }
+ if ((WeaponType)value == WeaponType.HEAVY_BOWGUN)
+ {
+ return "Heavy Bowgun";
+ }
+ if ((WeaponType)value == WeaponType.HUNTING_HORN)
+ {
+ return "Hunting Horn";
+ }
+ if ((WeaponType)value == WeaponType.INSECT_GLAIVE)
+ {
+ return "Insect Glaive";
+ }
+ if ((WeaponType)value == WeaponType.KINSECT)
+ {
+ return "Kinsect";
+ }
+ if ((WeaponType)value == WeaponType.LANCE)
+ {
+ return "Lance";
+ }
+ if ((WeaponType)value == WeaponType.LIGHT_BOWGUN)
+ {
+ return "Light Bowgun";
+ }
+ if ((WeaponType)value == WeaponType.LONG_SWORD)
+ {
+ return "Long Sword";
+ }
+ if ((WeaponType)value == WeaponType.SLINGER)
+ {
+ return "Slinger";
+ }
+ if ((WeaponType)value == WeaponType.SWITCH_AXE)
+ {
+ return "Switch Axe";
+ }
+ if ((WeaponType)value == WeaponType.SWORD_AND_SHIELD)
+ {
+ return "Sword and Shield";
+ }
+ }
+ return "Unkown Weapon";
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/SmartHunter/Ui/Resources/Default.xaml b/SmartHunter/Ui/Resources/Default.xaml
index 8f6193e5..5403c819 100644
--- a/SmartHunter/Ui/Resources/Default.xaml
+++ b/SmartHunter/Ui/Resources/Default.xaml
@@ -1,8 +1,7 @@
-
@@ -27,11 +29,12 @@
-
-
+
+
+
#00000000
1
-
+
#BB3333
#3366CC
#CCBB11
@@ -41,12 +44,12 @@
#CC0000
#00CCCC
- #DAFDBC
- #EC7A7A
- #FFE1A9
- #B0D0FF
- #FFFFFFFF
- #FFFFFFFF
+ #FFE1A9
+ #B0D0FF
+ #EC7A7A
+ #DAFDBC
+ #FFFFFFFF
+ #FFFFFFFF
#eed000
#00dd00
@@ -61,10 +64,12 @@
-
+
+
+
pack://application:,,,/Ui/Fonts/#Roboto
-
-
+
+
-
-
+
+
@@ -105,19 +117,19 @@
-
+
-
+
@@ -132,15 +144,15 @@
-
-
+
+
-
-
+
+
-
-
+
+
@@ -181,7 +193,7 @@
-
+
@@ -191,7 +203,7 @@
-
+
@@ -248,7 +260,7 @@
-
+
@@ -279,53 +291,42 @@
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
-
-
-
-
-
-
-
+
@@ -334,7 +335,7 @@
-
+
@@ -344,7 +345,7 @@
-
+
@@ -353,7 +354,7 @@
-
+
@@ -365,7 +366,7 @@
-
+
@@ -378,21 +379,21 @@
-
+
-
+
-
+
@@ -400,17 +401,13 @@
-
-
-
-
+
-
-
-
+
+
+
+
@@ -420,17 +417,37 @@
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
@@ -473,8 +490,8 @@
-
-
+
+
@@ -517,8 +534,8 @@
-
-
+
+
@@ -561,8 +578,8 @@
-
-
+
+
@@ -573,26 +590,24 @@
-
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
-
+
@@ -602,7 +617,7 @@
-
+
@@ -614,7 +629,7 @@
-
+
@@ -627,21 +642,21 @@
-
+
-
+
-
+
@@ -649,16 +664,11 @@
-
-
-
-
-
+
+
@@ -683,8 +693,8 @@
-
-
+
+
@@ -709,8 +719,8 @@
-
-
+
+
@@ -735,8 +745,8 @@
-
-
+
+
@@ -745,11 +755,11 @@
-
+
- IsRemovable
+ Damage
@@ -757,13 +767,17 @@
+
+
+
+
-
-
+
+
-
+
@@ -773,22 +787,28 @@
-
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -797,7 +817,7 @@
-
+
@@ -810,7 +830,7 @@
-
+
@@ -820,33 +840,36 @@
-
+
-
+
-
+
-
+
-
+
+
+
+
-
-
+
+
@@ -871,8 +894,8 @@
-
-
+
+
@@ -897,8 +920,8 @@
-
-
+
+
@@ -923,17 +946,17 @@
-
-
+
+
-
+
-
+
@@ -945,7 +968,7 @@
-
+
@@ -966,12 +989,8 @@
-
-
-
-
-
-
+
+
@@ -979,8 +998,8 @@
-
-
+
+
@@ -988,7 +1007,7 @@
-
+
@@ -1004,8 +1023,8 @@
-
-
+
+
@@ -1028,8 +1047,8 @@
-
-
+
+
@@ -1052,8 +1071,8 @@
-
-
+
+
@@ -1076,20 +1095,20 @@
-
-
+
+
-
+
-
+
@@ -1162,7 +1181,7 @@
-
+
@@ -1170,10 +1189,10 @@
-
+
-
+
@@ -1181,8 +1200,8 @@
-
-
+
+
@@ -1207,14 +1226,14 @@
-
+
-
+
@@ -1236,90 +1255,90 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
@@ -1353,7 +1380,7 @@
-
-
+
+
@@ -1388,7 +1416,14 @@
-
+
+
+
+
+
+
+
+
@@ -1398,7 +1433,7 @@
-
-
+
+
-
+
Damage
@@ -1432,13 +1468,59 @@
-
+
+
+
+
+
+
+
+
-
+
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmartHunter/Ui/Windows/ConsoleWindow.xaml b/SmartHunter/Ui/Windows/ConsoleWindow.xaml
index 6d5de63b..93594e42 100644
--- a/SmartHunter/Ui/Windows/ConsoleWindow.xaml
+++ b/SmartHunter/Ui/Windows/ConsoleWindow.xaml
@@ -1,12 +1,15 @@
-
@@ -18,7 +21,30 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmartHunter/Ui/Windows/ConsoleWindow.xaml.cs b/SmartHunter/Ui/Windows/ConsoleWindow.xaml.cs
index ac275720..2848d59f 100644
--- a/SmartHunter/Ui/Windows/ConsoleWindow.xaml.cs
+++ b/SmartHunter/Ui/Windows/ConsoleWindow.xaml.cs
@@ -1,5 +1,5 @@
-using SmartHunter.Game.Data.ViewModels;
using System.Windows;
+using SmartHunter.Game.Data.ViewModels;
namespace SmartHunter.Ui.Windows
{
@@ -9,7 +9,8 @@ public ConsoleWindow()
{
InitializeComponent();
- DataContext = ConsoleViewModel.Instance;
+ LogsTab.DataContext = ConsoleViewModel.Instance;
+ SettingsTab.DataContext = SettingsViewModel.Instance;
}
}
}
diff --git a/SmartHunter/Ui/Windows/DebugWidgetWindow.xaml b/SmartHunter/Ui/Windows/DebugWidgetWindow.xaml
new file mode 100644
index 00000000..4623a693
--- /dev/null
+++ b/SmartHunter/Ui/Windows/DebugWidgetWindow.xaml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SmartHunter/Ui/Windows/DebugWidgetWindow.xaml.cs b/SmartHunter/Ui/Windows/DebugWidgetWindow.xaml.cs
new file mode 100644
index 00000000..b3004244
--- /dev/null
+++ b/SmartHunter/Ui/Windows/DebugWidgetWindow.xaml.cs
@@ -0,0 +1,35 @@
+using SmartHunter.Core.Windows;
+using SmartHunter.Game.Data.ViewModels;
+using SmartHunter.Game.Helpers;
+
+namespace SmartHunter.Ui.Windows
+{
+ public partial class DebugWidgetWindow : WidgetWindow
+ {
+ protected override float ScaleMax { get { return ConfigHelper.Main.Values.Overlay.ScaleMax; } }
+ protected override float ScaleMin { get { return ConfigHelper.Main.Values.Overlay.ScaleMin; } }
+ protected override float ScaleStep { get { return ConfigHelper.Main.Values.Overlay.ScaleStep; } }
+
+ public DebugWidgetWindow() : base(OverlayViewModel.Instance.DebugWidget)
+ {
+ InitializeComponent();
+
+ DataContext = OverlayViewModel.Instance;
+
+
+ }
+ /*
+ protected override void OnLoad(EventArgs e)
+ {
+ base.OnLoad(e);
+
+ //Variable to hold the handle for the form
+ var helper = new WindowInteropHelper(this).Handle;
+ //Performing some magic to hide the form from Alt+Tab
+ SetWindowLong(helper, GWL_EX_STYLE, (GetWindowLong(helper, GWL_EX_STYLE) | WS_EX_TOOLWINDOW) & ~WS_EX_APPWINDOW);
+ }
+ */
+
+
+ }
+}
diff --git a/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml b/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml
index 48df8b29..b8f2f2b2 100644
--- a/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml
+++ b/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml
@@ -1,8 +1,8 @@
-
-
-
-
-
+
diff --git a/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml.cs b/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml.cs
index 3ba2c6a0..d169cadc 100644
--- a/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml.cs
+++ b/SmartHunter/Ui/Windows/MonsterWidgetWindow.xaml.cs
@@ -1,4 +1,4 @@
-using SmartHunter.Core.Windows;
+using SmartHunter.Core.Windows;
using SmartHunter.Game.Data.ViewModels;
using SmartHunter.Game.Helpers;
@@ -17,4 +17,4 @@ public MonsterWidgetWindow() : base(OverlayViewModel.Instance.MonsterWidget)
DataContext = OverlayViewModel.Instance;
}
}
-}
\ No newline at end of file
+}
diff --git a/SmartHunter/Ui/Windows/PlayerWidgetWindow.xaml b/SmartHunter/Ui/Windows/PlayerWidgetWindow.xaml
index c8414079..1a846e5a 100644
--- a/SmartHunter/Ui/Windows/PlayerWidgetWindow.xaml
+++ b/SmartHunter/Ui/Windows/PlayerWidgetWindow.xaml
@@ -1,4 +1,4 @@
-
-
-
-
-
+
diff --git a/SmartHunter/Ui/Windows/TeamWidgetWindow.xaml b/SmartHunter/Ui/Windows/TeamWidgetWindow.xaml
index 6f52a15e..7a576216 100644
--- a/SmartHunter/Ui/Windows/TeamWidgetWindow.xaml
+++ b/SmartHunter/Ui/Windows/TeamWidgetWindow.xaml
@@ -1,4 +1,4 @@
-
-
-
-
-
+
diff --git a/build/PackageRelease.ps1 b/build/PackageRelease.ps1
new file mode 100644
index 00000000..fd5e6ea4
--- /dev/null
+++ b/build/PackageRelease.ps1
@@ -0,0 +1,24 @@
+param([string]$Configuration="release")
+
+#Requires -Version 5.1
+$scriptPath = Split-Path $MyInvocation.MyCommand.Path
+$release = Join-Path $scriptPath "..\SmartHunter\bin\$Configuration\"
+$zip = Join-Path $release "SmartHunter.zip"
+
+$fileList =
+ "SmartHunter.exe",
+ "Newtonsoft.Json.dll",
+ "Default.xaml"
+
+$Error.Clear()
+
+Push-Location $release
+Compress-Archive -LiteralPath $fileList -DestinationPath $zip -Force
+Pop-Location
+
+if($Error)
+{
+ exit 1
+}
+
+exit 0
diff --git a/build/build.cmd b/build/build.cmd
new file mode 100644
index 00000000..def0894a
--- /dev/null
+++ b/build/build.cmd
@@ -0,0 +1,6 @@
+@echo off
+
+dotnet build ..\ -c release
+
+REM publish command for self contained .exe
+REM dotnet publish ..\ -r win-x64 -c release
diff --git a/doc/Config.json.md b/doc/Config.json.md
new file mode 100644
index 00000000..a01c174b
--- /dev/null
+++ b/doc/Config.json.md
@@ -0,0 +1,119 @@
+# `Config.json` documentation
+
+SmartHunter can be customized from the `Config.json` file (generated after first launch).
+Blelow are common settings that people might want to change.
+
+## Global configurations
+`"LocalizationFileName": "en-US.json",`
+Changes the localization file used, defaults to `en-US.json`.
+
+`"AutomaticallyCheckAndDownloadUpdates": true,`
+defaults to `true`, set to `false` to disable.
+
+`"UpdatesPerSecond": 20,`
+The number time to check memory every second defaults to `20`, supports `1 to 60`.
+Increase to improve performance.
+
+### Overlay configurations
+## TeamWidget
+`"ShowNumbers": true,`
+defaults to `true`, set to `false` to disable.
+
+`"ShowPercents": true,`
+defaults to `true`, set to `false` to disable.
+
+`"IsVisible": true,`
+defaults to `true`, set to `false` to disable.
+
+## MonsterWidget
+`"IncludePartGroupIdRegex": ".*",`
+Available options: Part, Removable
+
+`"IncludeStatusEffectGroupIdRegex": ".*",`
+Available options: StatusEffect, Rage, Stamina, and Fatigue.
+
+`"IsVisible": true,`
+defaults to `true`, set to `false` to disable.
+
+## PlayerWidget
+`"IncludeStatusEffectGroupIdRegex": ".*",`
+Availalbe options: Horn, Coral, Debuff, Buff, Equipment, and Weapon
+
+`"IsVisible": true,`
+defaults to `true`, set to `false` to disable.
+
+# Example Config.json file
+```json
+{
+ "LocalizationFileName": "en-US.json",
+ "SkinFileName": "Default.xaml",
+ "MonsterDataFileName": "MonsterData.json",
+ "PlayerDataFileName": "PlayerData.json",
+ "MemoryFileName": "Memory.json",
+ "ShutdownWhenProcessExits": false,
+ "UseCustomData": false,
+ "AutomaticallyCheckAndDownloadUpdates": true,
+ "Overlay": {
+ "ScaleMin": 0.5,
+ "ScaleMax": 2,
+ "ScaleStep": 0.1,
+ "HideWhenGameWindowIsInactive": false,
+ "UpdatesPerSecond": 20,
+ "TeamWidget": {
+ "DontShowIfAlone": false,
+ "ShowBars": true,
+ "ShowNumbers": true,
+ "ShowPercents": true,
+ "IsVisible": true,
+ "X": 2276,
+ "Y": 1064,
+ "Scale": 1
+ },
+ "MonsterWidget": {
+ "IncludeMonsterIdRegex": "em[0-9]",
+ "IncludePartGroupIdRegex": ".*",
+ "IncludeStatusEffectGroupIdRegex": ".*",
+ "ShowUnchangedMonsters": true,
+ "HideMonstersAfterSeconds": 999,
+ "ShowUnchangedParts": false,
+ "HidePartsAfterSeconds": 12,
+ "ShowUnchangedStatusEffects": false,
+ "HideStatusEffectsAfterSeconds": 12,
+ "ShowSize": false,
+ "ShowCrown": true,
+ "ShowBars": true,
+ "ShowNumbers": true,
+ "ShowPercents": true,
+ "UseAnimations": false,
+ "ShowOnlySelectedMonster": false,
+ "IsVisible": true,
+ "X": 945,
+ "Y": 1,
+ "Scale": 1
+ },
+ "PlayerWidget": {
+ "IncludeStatusEffectGroupIdRegex": ".*",
+ "IsVisible": true,
+ "X": -14,
+ "Y": 446,
+ "Scale": 1
+ },
+ "DebugWidget": {
+ "IsVisible": false,
+ "X": 120,
+ "Y": 320,
+ "Scale": 1
+ }
+ },
+ "Keybinds": {
+ "ManipulateWidget": "LeftAlt",
+ "HideWidgets": "F1"
+ },
+ "Debug": {
+ "UseInternalSkin": false,
+ "UseSampleData": false,
+ "TraceUniquePointers": false,
+ "ShowWeirdRemovableParts": false
+ }
+}
+```