diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..a90241775 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,270 @@ +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +# C# files +[*.cs] + +#### Core EditorConfig Options #### + +# Indentation and spacing +indent_size = 4 +indent_style = space +tab_width = 4 + +# New line preferences +end_of_line = crlf +insert_final_newline = true + +#### .NET Coding Conventions #### + +# Organize usings +dotnet_separate_import_directive_groups = false +dotnet_sort_system_directives_first = true +file_header_template = unset + +# this. and Me. preferences +dotnet_style_qualification_for_event = false +dotnet_style_qualification_for_field = false +dotnet_style_qualification_for_method = false +dotnet_style_qualification_for_property = false + +# Language keywords vs BCL types preferences +dotnet_style_predefined_type_for_locals_parameters_members = true +dotnet_style_predefined_type_for_member_access = true + +# Parentheses preferences +dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity +dotnet_style_parentheses_in_other_binary_operators = always_for_clarity +dotnet_style_parentheses_in_other_operators = never_if_unnecessary +dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity + +# Modifier preferences +dotnet_style_require_accessibility_modifiers = for_non_interface_members + +# Expression-level preferences +dotnet_style_coalesce_expression = true +dotnet_style_collection_initializer = true +dotnet_style_explicit_tuple_names = true +dotnet_style_namespace_match_folder = true +dotnet_style_null_propagation = true +dotnet_style_object_initializer = true +dotnet_style_operator_placement_when_wrapping = beginning_of_line +dotnet_style_prefer_auto_properties = true +dotnet_style_prefer_collection_expression = true +dotnet_style_prefer_compound_assignment = true +dotnet_style_prefer_conditional_expression_over_assignment = true +dotnet_style_prefer_conditional_expression_over_return = true +dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed +dotnet_style_prefer_inferred_anonymous_type_member_names = true +dotnet_style_prefer_inferred_tuple_names = true +dotnet_style_prefer_is_null_check_over_reference_equality_method = true +dotnet_style_prefer_simplified_boolean_expressions = true +dotnet_style_prefer_simplified_interpolation = true + +# Field preferences +dotnet_style_readonly_field = true + +# Parameter preferences +dotnet_code_quality_unused_parameters = all + +# Suppression preferences +dotnet_remove_unnecessary_suppression_exclusions = none + +# New line preferences +dotnet_style_allow_multiple_blank_lines_experimental = true +dotnet_style_allow_statement_immediately_after_block_experimental = true + +#### C# Coding Conventions #### + +# var preferences +csharp_style_var_elsewhere = false:silent +csharp_style_var_for_built_in_types = true:silent +csharp_style_var_when_type_is_apparent = true:silent + +# Expression-bodied members +csharp_style_expression_bodied_accessors = true:silent +csharp_style_expression_bodied_constructors = false:silent +csharp_style_expression_bodied_indexers = true:silent +csharp_style_expression_bodied_lambdas = true:silent +csharp_style_expression_bodied_local_functions = false:silent +csharp_style_expression_bodied_methods = false:silent +csharp_style_expression_bodied_operators = false:silent +csharp_style_expression_bodied_properties = true:silent + +# Pattern matching preferences +csharp_style_pattern_matching_over_as_with_null_check = true:suggestion +csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion +csharp_style_prefer_extended_property_pattern = true:suggestion +csharp_style_prefer_not_pattern = true:suggestion +csharp_style_prefer_pattern_matching = true:silent +csharp_style_prefer_switch_expression = true:suggestion + +# Null-checking preferences +csharp_style_conditional_delegate_call = true:suggestion + +# Modifier preferences +csharp_prefer_static_local_function = true:suggestion +csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async +csharp_style_prefer_readonly_struct = true:suggestion +csharp_style_prefer_readonly_struct_member = true:suggestion + +# Code-block preferences +csharp_prefer_braces = true:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_style_namespace_declarations = block_scoped:warning +csharp_style_prefer_method_group_conversion = true:silent +csharp_style_prefer_primary_constructors = false:suggestion +csharp_style_prefer_top_level_statements = true:silent + +# Expression-level preferences +csharp_prefer_simple_default_expression = true:suggestion +csharp_style_deconstructed_variable_declaration = true:suggestion +csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion +csharp_style_inlined_variable_declaration = true:suggestion +csharp_style_prefer_index_operator = true:suggestion +csharp_style_prefer_local_over_anonymous_function = true:suggestion +csharp_style_prefer_null_check_over_type_check = true:suggestion +csharp_style_prefer_range_operator = true:suggestion +csharp_style_prefer_tuple_swap = true:suggestion +csharp_style_prefer_utf8_string_literals = true:suggestion +csharp_style_throw_expression = true:suggestion +csharp_style_unused_value_assignment_preference = discard_variable:suggestion +csharp_style_unused_value_expression_statement_preference = discard_variable:silent + +# 'using' directive preferences +csharp_using_directive_placement = outside_namespace:silent + +# New line preferences +csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent +csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent +csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent +csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent + +#### C# Formatting Rules #### + +# New line preferences +csharp_new_line_before_catch = true +csharp_new_line_before_else = true +csharp_new_line_before_finally = true +csharp_new_line_before_members_in_anonymous_types = true +csharp_new_line_before_members_in_object_initializers = true +csharp_new_line_before_open_brace = all +csharp_new_line_between_query_expression_clauses = true + +# Indentation preferences +csharp_indent_block_contents = true +csharp_indent_braces = false +csharp_indent_case_contents = true +csharp_indent_case_contents_when_block = true +csharp_indent_labels = one_less_than_current +csharp_indent_switch_labels = true + +# Space preferences +csharp_space_after_cast = false +csharp_space_after_colon_in_inheritance_clause = true +csharp_space_after_comma = true +csharp_space_after_dot = false +csharp_space_after_keywords_in_control_flow_statements = true +csharp_space_after_semicolon_in_for_statement = true +csharp_space_around_binary_operators = before_and_after +csharp_space_around_declaration_statements = false +csharp_space_before_colon_in_inheritance_clause = true +csharp_space_before_comma = false +csharp_space_before_dot = false +csharp_space_before_open_square_brackets = false +csharp_space_before_semicolon_in_for_statement = false +csharp_space_between_empty_square_brackets = false +csharp_space_between_method_call_empty_parameter_list_parentheses = false +csharp_space_between_method_call_name_and_opening_parenthesis = false +csharp_space_between_method_call_parameter_list_parentheses = false +csharp_space_between_method_declaration_empty_parameter_list_parentheses = false +csharp_space_between_method_declaration_name_and_open_parenthesis = false +csharp_space_between_method_declaration_parameter_list_parentheses = false +csharp_space_between_parentheses = false +csharp_space_between_square_brackets = false + +# Wrapping preferences +csharp_preserve_single_line_blocks = true +csharp_preserve_single_line_statements = true + +#### Naming styles #### + +# Naming rules + +dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion +dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface +dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i + +dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.types_should_be_pascal_case.symbols = types +dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case + +dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion +dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members +dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case + +# Symbol specifications + +dotnet_naming_symbols.interface.applicable_kinds = interface +dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.interface.required_modifiers = + +dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum +dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.types.required_modifiers = + +dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method +dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected +dotnet_naming_symbols.non_field_members.required_modifiers = + +# Naming styles + +dotnet_naming_style.pascal_case.required_prefix = +dotnet_naming_style.pascal_case.required_suffix = +dotnet_naming_style.pascal_case.word_separator = +dotnet_naming_style.pascal_case.capitalization = pascal_case + +dotnet_naming_style.begins_with_i.required_prefix = I +dotnet_naming_style.begins_with_i.required_suffix = +dotnet_naming_style.begins_with_i.word_separator = +dotnet_naming_style.begins_with_i.capitalization = pascal_case + +[*.{cs,vb}] +dotnet_style_operator_placement_when_wrapping = beginning_of_line +tab_width = 4 +indent_size = 4 +end_of_line = crlf +dotnet_style_coalesce_expression = true:suggestion +dotnet_style_null_propagation = true:suggestion +dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion +dotnet_style_prefer_auto_properties = true:silent +dotnet_style_object_initializer = true:suggestion +dotnet_style_prefer_collection_expression = true:suggestion +dotnet_style_collection_initializer = true:suggestion +dotnet_style_prefer_simplified_boolean_expressions = true:suggestion +dotnet_style_prefer_conditional_expression_over_assignment = true:silent +dotnet_style_prefer_conditional_expression_over_return = true:silent +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_compound_assignment = true:suggestion +dotnet_style_prefer_simplified_interpolation = true:suggestion +dotnet_style_namespace_match_folder = true:suggestion +indent_style = space +dotnet_style_readonly_field = true:suggestion +dotnet_style_predefined_type_for_locals_parameters_members = true:silent +dotnet_style_predefined_type_for_member_access = true:silent +dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent +dotnet_style_allow_multiple_blank_lines_experimental = true:silent +dotnet_style_allow_statement_immediately_after_block_experimental = true:silent +dotnet_code_quality_unused_parameters = all:suggestion +dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:silent +dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent +dotnet_style_qualification_for_field = false:silent +dotnet_style_qualification_for_property = false:silent +dotnet_style_qualification_for_method = false:silent +dotnet_style_qualification_for_event = false:silent +insert_final_newline = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index 412eeda78..439b87186 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,8 @@ # Auto detect text files and perform LF normalization -* text=auto +* text=auto eol=crlf # Custom for Visual Studio -*.cs diff=csharp +*.cs diff=csharp eol=crlf *.sln merge=union *.csproj merge=union *.vbproj merge=union @@ -19,4 +19,4 @@ *.pdf diff=astextplain *.PDF diff=astextplain *.rtf diff=astextplain -*.RTF diff=astextplain +*.RTF diff=astextplain \ No newline at end of file diff --git a/BatchMap/Program.cs b/BatchMap/Program.cs index 785b6ca18..42606e4cc 100644 --- a/BatchMap/Program.cs +++ b/BatchMap/Program.cs @@ -34,7 +34,7 @@ private static void Main(string[] args) Console.WriteLine("Invalid: single map cannot be processed into output directory. Specify destination emf file."); return; } - + if (dstFilePath.ToLower().EndsWith(".emf") && !srcFilePath.ToLower().EndsWith(".emf")) { Console.WriteLine("Invalid: map directory cannot be processed into single output map. Specify destination output directory."); @@ -149,7 +149,7 @@ private static void ProcessFiles(string src, string dst, bool singleFile) var mapFileLoadActions = _typeRegistry.Resolve(); var mapFileSaveService = _typeRegistry.Resolve(); - var inFiles = singleFile ? new[] {src} : Directory.GetFiles(src, "*.emf"); + var inFiles = singleFile ? new[] { src } : Directory.GetFiles(src, "*.emf"); for (int mapIndex = 0; mapIndex < inFiles.Length; ++mapIndex) { @@ -157,7 +157,7 @@ private static void ProcessFiles(string src, string dst, bool singleFile) mapFileLoadActions.LoadMapFileByName(inFiles[mapIndex]); var mapFile = _mapFileProvider.MapFiles[mapID]; - + var changesMade = false; //todo: find way to store actual input data, since invalid tiles/warps will be auto-removed @@ -192,7 +192,7 @@ private static void ProcessFiles(string src, string dst, bool singleFile) // } //} - for(int ndx = mapFile.NPCSpawns.Count - 1; ndx >= 0; --ndx) + for (int ndx = mapFile.NPCSpawns.Count - 1; ndx >= 0; --ndx) { var npcSpawn = mapFile.NPCSpawns[ndx]; var npcRec = _pubProvider.ENFFile[npcSpawn.ID]; @@ -239,7 +239,7 @@ private static void ProcessFiles(string src, string dst, bool singleFile) } } - for(int ndx = mapFile.Chests.Count - 1; ndx >= 0; --ndx) + for (int ndx = mapFile.Chests.Count - 1; ndx >= 0; --ndx) { var chestSpawn = mapFile.Chests[ndx]; var rec = _pubProvider.EIFFile[chestSpawn.ItemID]; @@ -313,4 +313,4 @@ private static bool TileIsValidNPCSpawnPoint(IMapFile EMF, int x, int y) return true; } } -} +} \ No newline at end of file diff --git a/BatchMap/Properties/AssemblyInfo.cs b/BatchMap/Properties/AssemblyInfo.cs index 70dd0e423..931aa9d9a 100644 --- a/BatchMap/Properties/AssemblyInfo.cs +++ b/BatchMap/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/BatchPub/Program.cs b/BatchPub/Program.cs index ffbcb081d..78957a790 100644 --- a/BatchPub/Program.cs +++ b/BatchPub/Program.cs @@ -17,4 +17,4 @@ static void Main() Application.Run(new frmMain()); } } -} +} \ No newline at end of file diff --git a/BatchPub/Properties/AssemblyInfo.cs b/BatchPub/Properties/AssemblyInfo.cs index ac1dfe098..36201db71 100644 --- a/BatchPub/Properties/AssemblyInfo.cs +++ b/BatchPub/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/BatchPub/frmMain.cs b/BatchPub/frmMain.cs index 5bf0ea461..c4f958f7c 100644 --- a/BatchPub/frmMain.cs +++ b/BatchPub/frmMain.cs @@ -49,8 +49,8 @@ private void InitializeMore() cmbStepTwoField.Items.Clear(); cmbStepThreeField.Items.Clear(); - var eifType = typeof (EIFRecord); - foreach(System.Reflection.PropertyInfo prop in eifType.GetProperties()) + var eifType = typeof(EIFRecord); + foreach (System.Reflection.PropertyInfo prop in eifType.GetProperties()) { cmbStepTwoField.Items.Add(new PropInfo(prop)); cmbStepThreeField.Items.Add(new PropInfo(prop)); @@ -85,11 +85,11 @@ private void btnProcess_Click(object sender, EventArgs e) break; } - if(!chkFilterOn.Checked) + if (!chkFilterOn.Checked) { //process the change for EVERY item record. save changes immediately. if (MessageBox.Show( - "This change will be processed for every item immediately. The change is irreversible. Are you sure you want to continue? You may specify a filter by checking the filter option.", "No filter selected", - MessageBoxButtons.YesNo, + "This change will be processed for every item immediately. The change is irreversible. Are you sure you want to continue? You may specify a filter by checking the filter option.", "No filter selected", + MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.No ) { @@ -112,7 +112,7 @@ private void btnProcess_Click(object sender, EventArgs e) try { op = (CompareOperator)cmbCompareType.SelectedIndex; - if(op == CompareOperator.REGEX && cmbCompareValue.Enabled) + if (op == CompareOperator.REGEX && cmbCompareValue.Enabled) { MessageBox.Show("You can't use a regex to parse enumerated types"); return; @@ -223,7 +223,7 @@ private void btnProcess_Click(object sender, EventArgs e) setter = Convert.ChangeType(Enum.ToObject(pi.PropertyType, newValue), pi.PropertyType); else setter = Convert.ChangeType(newValue, pi.PropertyType); - + pi.SetValue(rec, setter); //eif.ReplaceRecordAt(index, rec); //todo: way to modify pub files @@ -238,7 +238,7 @@ private void btnExit_Click(object sender, EventArgs e) private void btnBrowse_Click(object sender, EventArgs e) { - using(OpenFileDialog ofd = new OpenFileDialog()) + using (OpenFileDialog ofd = new OpenFileDialog()) { ofd.CheckFileExists = true; ofd.CheckPathExists = true; @@ -266,7 +266,7 @@ private void btnLoad_Click(object sender, EventArgs e) grpStepTwo.Enabled = true; btnReset.Enabled = true; } - catch(Exception ex) + catch (Exception ex) { eif = null; MessageBox.Show("Error loading " + _fname + ":\n" + ex.Message, "Error!"); @@ -305,7 +305,7 @@ private void cmbStepTwoField_SelectedIndexChanged(object sender, EventArgs e) private void LeaveStepTwo(object sender, EventArgs e) { - if(cmbStepTwoField.SelectedIndex >= 0 && + if (cmbStepTwoField.SelectedIndex >= 0 && ((txtStepTwoValue.Enabled && txtStepTwoValue.TextLength > 0) || (cmbStepTwoValue.Enabled && cmbStepTwoValue.SelectedIndex >= 0)) ) { @@ -321,7 +321,7 @@ private void LeaveStepTwo(object sender, EventArgs e) private void chkFilterOn_CheckedChanged(object sender, EventArgs e) { - if(chkFilterOn.Checked) + if (chkFilterOn.Checked) { cmbStepThreeField.Enabled = true; txtCompareValue.Enabled = true; @@ -402,7 +402,7 @@ private void btnClear_Click(object sender, EventArgs e) private void btnSave_Click(object sender, EventArgs e) { - if(changes) + if (changes) { DialogResult dr = MessageBox.Show("WARNING: This will update the pub file you currently have open with any batch changes that have been made. Confirm that this behavior is desired.", "Confirm changes?", MessageBoxButtons.YesNo); if (dr == DialogResult.No) @@ -420,7 +420,7 @@ private void btnSave_Click(object sender, EventArgs e) var serializer = new PubFileSerializer(new NumberEncoderService(), new PubRecordSerializer(new NumberEncoderService())); var bytes = serializer.SerializeToByteArray(eif); } - catch(Exception ex) + catch (Exception ex) { MessageBox.Show("Error saving changes to the file:\n" + ex.Message); return; @@ -452,4 +452,4 @@ public override string ToString() return DisplayName; } } -} +} \ No newline at end of file diff --git a/EOBot/ArgumentsParser.cs b/EOBot/ArgumentsParser.cs index 33d48aa32..0face5c1c 100644 --- a/EOBot/ArgumentsParser.cs +++ b/EOBot/ArgumentsParser.cs @@ -1,7 +1,7 @@ -using EOBot.Interpreter.Variables; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; +using EOBot.Interpreter.Variables; namespace EOBot { @@ -213,4 +213,4 @@ private bool ParseInitDelay(string initDelay) return true; } } -} +} \ No newline at end of file diff --git a/EOBot/BotBase.cs b/EOBot/BotBase.cs index 0ec336dd2..aae6ea06c 100644 --- a/EOBot/BotBase.cs +++ b/EOBot/BotBase.cs @@ -89,4 +89,4 @@ public async Task RunAsync(CancellationToken ct) /// A cancellation token that will be signalled when Terminate() is called protected abstract Task DoWorkAsync(CancellationToken ct); } -} +} \ No newline at end of file diff --git a/EOBot/BotException.cs b/EOBot/BotException.cs index 8e1f75484..558420ab9 100644 --- a/EOBot/BotException.cs +++ b/EOBot/BotException.cs @@ -6,4 +6,4 @@ public class BotException : Exception { public BotException(string message) : base(message) { } } -} +} \ No newline at end of file diff --git a/EOBot/BotFramework.cs b/EOBot/BotFramework.cs index 49a22e7b8..1a61d4e4c 100644 --- a/EOBot/BotFramework.cs +++ b/EOBot/BotFramework.cs @@ -1,9 +1,9 @@ -using EOLib.Net.Handlers; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using EOLib.Net.Handlers; namespace EOBot { @@ -66,7 +66,7 @@ public async Task InitializeAsync(IBotFactory botFactory, int delayBetweenInitsM await bot.InitializeAsync(_host, _port); _botsList.Add(bot); } - catch(Exception ex) + catch (Exception ex) { ConsoleHelper.WriteMessage(ConsoleHelper.Type.Error, ex.Message, ConsoleColor.DarkRed); numFailed++; @@ -92,7 +92,7 @@ public async Task InitializeAsync(IBotFactory botFactory, int delayBetweenInitsM public async Task RunAsync() { - if(!_initialized) + if (!_initialized) throw new InvalidOperationException("Must call Initialize() before running!"); var botTasks = new List(); @@ -149,4 +149,4 @@ private void Dispose(bool disposing) } } } -} +} \ No newline at end of file diff --git a/EOBot/BotHelper.cs b/EOBot/BotHelper.cs index 991567de6..e4d1a3a71 100644 --- a/EOBot/BotHelper.cs +++ b/EOBot/BotHelper.cs @@ -1,4 +1,8 @@ -using EOLib.Domain.Account; +using System; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using EOLib.Domain.Account; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -7,10 +11,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System; -using System.IO; -using System.Linq; -using System.Threading.Tasks; namespace EOBot { @@ -123,4 +123,4 @@ public async Task DeleteCharacterAsync(string name, bool force) return await characterActions.DeleteCharacter(deleteId); } } -} +} \ No newline at end of file diff --git a/EOBot/ConsoleHelper.cs b/EOBot/ConsoleHelper.cs index a347a4d61..16053186f 100644 --- a/EOBot/ConsoleHelper.cs +++ b/EOBot/ConsoleHelper.cs @@ -77,4 +77,4 @@ public static void WriteMessage(Type messageType, string message, ConsoleColor c Console.ForegroundColor = oldColor; } } -} +} \ No newline at end of file diff --git a/EOBot/DependencyMaster.cs b/EOBot/DependencyMaster.cs index 6a122084e..72ffebcb6 100644 --- a/EOBot/DependencyMaster.cs +++ b/EOBot/DependencyMaster.cs @@ -6,4 +6,4 @@ public static class DependencyMaster { public static ITypeRegistry[] TypeRegistry { get; set; } } -} +} \ No newline at end of file diff --git a/EOBot/IBot.cs b/EOBot/IBot.cs index e6d99de5c..48eca1739 100644 --- a/EOBot/IBot.cs +++ b/EOBot/IBot.cs @@ -22,4 +22,4 @@ public interface IBot /// True to wait until a call to Terminate() is made, false otherwise Task RunAsync(CancellationToken cancellationToken); } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/BotInterpreter.cs b/EOBot/Interpreter/BotInterpreter.cs index a916c5d32..0f1c62830 100644 --- a/EOBot/Interpreter/BotInterpreter.cs +++ b/EOBot/Interpreter/BotInterpreter.cs @@ -1,8 +1,8 @@ -using EOBot.Interpreter.States; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; +using EOBot.Interpreter.States; namespace EOBot.Interpreter { @@ -88,4 +88,4 @@ public async Task Run(ProgramState programState) } } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/BotScriptErrorException.cs b/EOBot/Interpreter/BotScriptErrorException.cs index b2c54ff09..121d3cb0d 100644 --- a/EOBot/Interpreter/BotScriptErrorException.cs +++ b/EOBot/Interpreter/BotScriptErrorException.cs @@ -10,4 +10,4 @@ public BotScriptErrorException(string message) public BotScriptErrorException(string message, BotToken token) : base($"Error at line {token.LineNumber} column {token.Column}: {message}") { } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/BotToken.cs b/EOBot/Interpreter/BotToken.cs index 3344c7d56..460ddba07 100644 --- a/EOBot/Interpreter/BotToken.cs +++ b/EOBot/Interpreter/BotToken.cs @@ -20,4 +20,4 @@ public BotToken(BotTokenType tokenType, string tokenValue, int line, int col) public override string ToString() => $"{TokenType}: {TokenValue}"; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/BotTokenParser.cs b/EOBot/Interpreter/BotTokenParser.cs index 78a4fd1eb..69a89ff16 100644 --- a/EOBot/Interpreter/BotTokenParser.cs +++ b/EOBot/Interpreter/BotTokenParser.cs @@ -113,7 +113,7 @@ public BotToken GetNextToken() } else { - switch(inputChar) + switch (inputChar) { case '(': return Token(BotTokenType.LParen, inputChar.ToString()); case ')': return Token(BotTokenType.RParen, inputChar.ToString()); @@ -137,7 +137,7 @@ public BotToken GetNextToken() } case '=': { - switch(Peek()) + switch (Peek()) { case '=': var nextChar = Read(); @@ -148,7 +148,7 @@ public BotToken GetNextToken() } case '!': { - switch(Peek()) + switch (Peek()) { case '=': var nextChar = Read(); @@ -231,4 +231,4 @@ private char Read() return (char)_inputStream.Read(); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/BotTokenType.cs b/EOBot/Interpreter/BotTokenType.cs index 4b3f0a850..e93ed43cd 100644 --- a/EOBot/Interpreter/BotTokenType.cs +++ b/EOBot/Interpreter/BotTokenType.cs @@ -31,4 +31,4 @@ public enum BotTokenType NewLine, Error, } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs b/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs index ae946eaf9..139c58898 100644 --- a/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs +++ b/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs @@ -1,4 +1,9 @@ -using EOBot.Interpreter.States; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using EOBot.Interpreter.States; using EOBot.Interpreter.Variables; using EOLib; using EOLib.Config; @@ -15,11 +20,6 @@ using Moffat.EndlessOnline.SDK.Packet; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; namespace EOBot.Interpreter { @@ -268,7 +268,8 @@ private void Chat(string chatText) statsObj.SymbolTable["tp"] = Readonly(new IntVariable(cp.MainCharacter.Stats[CharacterStat.TP])); statsObj.SymbolTable["maxtp"] = Readonly(new IntVariable(cp.MainCharacter.Stats[CharacterStat.MaxTP])); return statsObj; - }); + } + ); return Readonly(charObj); } @@ -323,4 +324,4 @@ private IVariable GetMapStateItem(MapItem item) return itemObj; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Extensions/ProgramStateExtensions.cs b/EOBot/Interpreter/Extensions/ProgramStateExtensions.cs index 8aae531a2..4a7ec0625 100644 --- a/EOBot/Interpreter/Extensions/ProgramStateExtensions.cs +++ b/EOBot/Interpreter/Extensions/ProgramStateExtensions.cs @@ -25,4 +25,4 @@ public static BotToken Current(this ProgramState input) return input.Program[input.ExecutionIndex]; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Extensions/SymbolTableExtensions.cs b/EOBot/Interpreter/Extensions/SymbolTableExtensions.cs index 0bf58ca83..04b9010eb 100644 --- a/EOBot/Interpreter/Extensions/SymbolTableExtensions.cs +++ b/EOBot/Interpreter/Extensions/SymbolTableExtensions.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.States; +using System.Collections.Generic; +using EOBot.Interpreter.States; using EOBot.Interpreter.Variables; -using System.Collections.Generic; namespace EOBot.Interpreter.Extensions { @@ -53,4 +53,4 @@ public static (EvalResult Result, string Reason, T Variable) GetVariable(this return (EvalResult.Ok, string.Empty, variable); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/IdentifierBotToken.cs b/EOBot/Interpreter/IdentifierBotToken.cs index fed0e6c9a..5b59a915e 100644 --- a/EOBot/Interpreter/IdentifierBotToken.cs +++ b/EOBot/Interpreter/IdentifierBotToken.cs @@ -13,4 +13,4 @@ public IdentifierBotToken(BotToken identifier, int? arrayIndex = null, Identifie Member = member; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/AssignmentEvaluator.cs b/EOBot/Interpreter/States/AssignmentEvaluator.cs index fcad88c8b..72e60a991 100644 --- a/EOBot/Interpreter/States/AssignmentEvaluator.cs +++ b/EOBot/Interpreter/States/AssignmentEvaluator.cs @@ -1,8 +1,8 @@ -using EOBot.Interpreter.Extensions; -using EOBot.Interpreter.Variables; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; +using EOBot.Interpreter.Variables; namespace EOBot.Interpreter.States { @@ -96,4 +96,4 @@ public AssignmentEvaluator(IEnumerable evaluators) return Success(); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/BaseEvaluator.cs b/EOBot/Interpreter/States/BaseEvaluator.cs index 428789e1d..39449f0f4 100644 --- a/EOBot/Interpreter/States/BaseEvaluator.cs +++ b/EOBot/Interpreter/States/BaseEvaluator.cs @@ -81,4 +81,4 @@ protected IScriptEvaluator Evaluator() where T : IScriptEvaluator return (EvalResult.Failed, $"Failed to goto label {token.TokenValue}", token); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/BlockEvaluator.cs b/EOBot/Interpreter/States/BlockEvaluator.cs index 5c861c701..ad9880e07 100644 --- a/EOBot/Interpreter/States/BlockEvaluator.cs +++ b/EOBot/Interpreter/States/BlockEvaluator.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.Extensions; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { @@ -105,4 +105,4 @@ protected static void RestoreLastNewline(ProgramState input) input.Goto(input.ExecutionIndex - 1); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/EvalResult.cs b/EOBot/Interpreter/States/EvalResult.cs index e8eb6bf20..714f138db 100644 --- a/EOBot/Interpreter/States/EvalResult.cs +++ b/EOBot/Interpreter/States/EvalResult.cs @@ -15,4 +15,4 @@ public enum EvalResult /// NotMatch } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/ExpressionEvaluator.cs b/EOBot/Interpreter/States/ExpressionEvaluator.cs index af3a8dbc7..8b70a3916 100644 --- a/EOBot/Interpreter/States/ExpressionEvaluator.cs +++ b/EOBot/Interpreter/States/ExpressionEvaluator.cs @@ -1,8 +1,8 @@ -using EOBot.Interpreter.Extensions; -using EOBot.Interpreter.Variables; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; +using EOBot.Interpreter.Variables; namespace EOBot.Interpreter.States { @@ -226,4 +226,4 @@ public ExpressionEvaluator(IEnumerable evaluators) private (IVariable, string) Divide(IntVariable a, IntVariable b) => (new IntVariable(a.Value / b.Value), string.Empty); private (IVariable, string) Divide(object a, object b) => (null, $"Objects {a} and {b} could not be divided (currently the operands must be int)"); } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/ExpressionTailEvaluator.cs b/EOBot/Interpreter/States/ExpressionTailEvaluator.cs index 2ef02d9e6..87b30b8e0 100644 --- a/EOBot/Interpreter/States/ExpressionTailEvaluator.cs +++ b/EOBot/Interpreter/States/ExpressionTailEvaluator.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.Extensions; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { @@ -24,4 +24,4 @@ public ExpressionTailEvaluator(IEnumerable evaluators) return await Evaluator().EvaluateAsync(input); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/FunctionEvaluator.cs b/EOBot/Interpreter/States/FunctionEvaluator.cs index 8888e0837..a1c0d5586 100644 --- a/EOBot/Interpreter/States/FunctionEvaluator.cs +++ b/EOBot/Interpreter/States/FunctionEvaluator.cs @@ -1,9 +1,9 @@ -using EOBot.Interpreter.Extensions; -using EOBot.Interpreter.Variables; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; +using EOBot.Interpreter.Variables; namespace EOBot.Interpreter.States { diff --git a/EOBot/Interpreter/States/GotoEvaluator.cs b/EOBot/Interpreter/States/GotoEvaluator.cs index 4bb50acd2..1b8bd400a 100644 --- a/EOBot/Interpreter/States/GotoEvaluator.cs +++ b/EOBot/Interpreter/States/GotoEvaluator.cs @@ -1,5 +1,5 @@ -using EOBot.Interpreter.Extensions; -using System.Threading.Tasks; +using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { @@ -20,9 +20,9 @@ public class GotoEvaluator : BaseEvaluator var label = input.OperationStack.Pop(); if (!input.Labels.ContainsKey(label.TokenValue)) return Task.FromResult(IdentifierNotFoundError(new IdentifierBotToken(label))); - + var result = input.Goto(input.Labels[label.TokenValue]); return Task.FromResult(result ? Success() : GotoError(label)); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/IScriptEvaluator.cs b/EOBot/Interpreter/States/IScriptEvaluator.cs index 15460e992..db12d2a4a 100644 --- a/EOBot/Interpreter/States/IScriptEvaluator.cs +++ b/EOBot/Interpreter/States/IScriptEvaluator.cs @@ -6,4 +6,4 @@ public interface IScriptEvaluator { Task<(EvalResult Result, string Reason, BotToken Token)> EvaluateAsync(ProgramState input); } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/IfEvaluator.cs b/EOBot/Interpreter/States/IfEvaluator.cs index 74de570f3..9e4b72f46 100644 --- a/EOBot/Interpreter/States/IfEvaluator.cs +++ b/EOBot/Interpreter/States/IfEvaluator.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.Extensions; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { @@ -77,4 +77,4 @@ private void SkipElseBlocks(ProgramState input) RestoreLastNewline(input); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/KeywordEvaluator.cs b/EOBot/Interpreter/States/KeywordEvaluator.cs index c41c9d9a8..e55c4278c 100644 --- a/EOBot/Interpreter/States/KeywordEvaluator.cs +++ b/EOBot/Interpreter/States/KeywordEvaluator.cs @@ -24,4 +24,4 @@ public KeywordEvaluator(IEnumerable evaluators) return res; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/LabelEvaluator.cs b/EOBot/Interpreter/States/LabelEvaluator.cs index 50d8eb578..77bd9fc13 100644 --- a/EOBot/Interpreter/States/LabelEvaluator.cs +++ b/EOBot/Interpreter/States/LabelEvaluator.cs @@ -1,5 +1,5 @@ -using EOBot.Interpreter.Extensions; -using System.Threading.Tasks; +using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { @@ -13,4 +13,4 @@ public class LabelEvaluator : BaseEvaluator return Task.FromResult((result, string.Empty, input.Current())); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/OperandEvaluator.cs b/EOBot/Interpreter/States/OperandEvaluator.cs index 60e70fcc7..7d81db58e 100644 --- a/EOBot/Interpreter/States/OperandEvaluator.cs +++ b/EOBot/Interpreter/States/OperandEvaluator.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.Extensions; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { @@ -24,4 +24,4 @@ public OperandEvaluator(IEnumerable evaluators) return matchRes ? Success() : (EvalResult.NotMatch, string.Empty, input.Current()); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/ProgramState.cs b/EOBot/Interpreter/States/ProgramState.cs index e72cfc107..819273129 100644 --- a/EOBot/Interpreter/States/ProgramState.cs +++ b/EOBot/Interpreter/States/ProgramState.cs @@ -1,7 +1,7 @@ -using EOBot.Interpreter.Variables; -using System; +using System; using System.Collections.Generic; using System.Linq; +using EOBot.Interpreter.Variables; namespace EOBot.Interpreter.States { @@ -56,7 +56,7 @@ public bool Expect(BotTokenType tokenType) ExecutionIndex++; return true; } - + return false; } @@ -114,4 +114,4 @@ public bool MatchPair(BotTokenType first, BotTokenType second) return false; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/ScriptEvaluator.cs b/EOBot/Interpreter/States/ScriptEvaluator.cs index 4a5f08cf4..40426a6c3 100644 --- a/EOBot/Interpreter/States/ScriptEvaluator.cs +++ b/EOBot/Interpreter/States/ScriptEvaluator.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.Extensions; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { @@ -21,4 +21,4 @@ public ScriptEvaluator(IEnumerable evaluators) return Success(); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/StatementEvaluator.cs b/EOBot/Interpreter/States/StatementEvaluator.cs index cda9f1fb4..8aa2e90c8 100644 --- a/EOBot/Interpreter/States/StatementEvaluator.cs +++ b/EOBot/Interpreter/States/StatementEvaluator.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.Extensions; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { diff --git a/EOBot/Interpreter/States/VariableEvaluator.cs b/EOBot/Interpreter/States/VariableEvaluator.cs index 1d406be55..babb260a2 100644 --- a/EOBot/Interpreter/States/VariableEvaluator.cs +++ b/EOBot/Interpreter/States/VariableEvaluator.cs @@ -1,7 +1,7 @@ -using EOBot.Interpreter.Extensions; -using EOBot.Interpreter.Variables; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; +using EOBot.Interpreter.Variables; namespace EOBot.Interpreter.States { @@ -64,4 +64,4 @@ public VariableEvaluator(IEnumerable evaluators) return Success(); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/States/WhileEvaluator.cs b/EOBot/Interpreter/States/WhileEvaluator.cs index b8b576296..4c29ec5a3 100644 --- a/EOBot/Interpreter/States/WhileEvaluator.cs +++ b/EOBot/Interpreter/States/WhileEvaluator.cs @@ -1,6 +1,6 @@ -using EOBot.Interpreter.Extensions; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading.Tasks; +using EOBot.Interpreter.Extensions; namespace EOBot.Interpreter.States { diff --git a/EOBot/Interpreter/VariableBotToken.cs b/EOBot/Interpreter/VariableBotToken.cs index e95a5bec1..953de3f5b 100644 --- a/EOBot/Interpreter/VariableBotToken.cs +++ b/EOBot/Interpreter/VariableBotToken.cs @@ -12,4 +12,4 @@ public VariableBotToken(BotTokenType tokenType, string tokenValue, IVariable var VariableValue = variableValue; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/ArrayVariable.cs b/EOBot/Interpreter/Variables/ArrayVariable.cs index d2d00d86c..25e01a1a4 100644 --- a/EOBot/Interpreter/Variables/ArrayVariable.cs +++ b/EOBot/Interpreter/Variables/ArrayVariable.cs @@ -25,4 +25,4 @@ public IVariable> WithNewValue(List value) public override string ToString() => StringValue; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/AsyncFunction.cs b/EOBot/Interpreter/Variables/AsyncFunction.cs index 532136b2a..85a2136c4 100644 --- a/EOBot/Interpreter/Variables/AsyncFunction.cs +++ b/EOBot/Interpreter/Variables/AsyncFunction.cs @@ -129,4 +129,4 @@ public Task CallAsync(params IIdentifiable[] parameters) return _referenceFunc((TParam1)(dynamic)parameters[0], (TParam2)(dynamic)parameters[1], (TParam3)(dynamic)parameters[2], (TParam4)(dynamic)parameters[3], (TParam5)(dynamic)parameters[4]); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/AsyncVoidFunction.cs b/EOBot/Interpreter/Variables/AsyncVoidFunction.cs index 525782a6f..f4beb6c09 100644 --- a/EOBot/Interpreter/Variables/AsyncVoidFunction.cs +++ b/EOBot/Interpreter/Variables/AsyncVoidFunction.cs @@ -129,4 +129,4 @@ public Task CallAsync(params IIdentifiable[] parameters) return _referenceFunc((TParam1)(dynamic)parameters[0], (TParam2)(dynamic)parameters[1], (TParam3)(dynamic)parameters[2], (TParam4)(dynamic)parameters[3], (TParam5)(dynamic)parameters[4]); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/BoolVariable.cs b/EOBot/Interpreter/Variables/BoolVariable.cs index 32a98a34c..369537c19 100644 --- a/EOBot/Interpreter/Variables/BoolVariable.cs +++ b/EOBot/Interpreter/Variables/BoolVariable.cs @@ -18,4 +18,4 @@ public class BoolVariable : IVariable public override string ToString() => StringValue; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/Function.cs b/EOBot/Interpreter/Variables/Function.cs index 9d80a640b..4615850b7 100644 --- a/EOBot/Interpreter/Variables/Function.cs +++ b/EOBot/Interpreter/Variables/Function.cs @@ -128,4 +128,4 @@ public T Call(params IIdentifiable[] parameters) return _referenceFunc((TParam1)(dynamic)parameters[0], (TParam2)(dynamic)parameters[1], (TParam3)(dynamic)parameters[2], (TParam4)(dynamic)parameters[3], (TParam5)(dynamic)parameters[4]); } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/ICallable.cs b/EOBot/Interpreter/Variables/ICallable.cs index 25020ba1e..b82f237fd 100644 --- a/EOBot/Interpreter/Variables/ICallable.cs +++ b/EOBot/Interpreter/Variables/ICallable.cs @@ -24,4 +24,4 @@ public interface IAsyncCallable : IAsyncFunction { Task CallAsync(params IIdentifiable[] parameters); } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/IIdentifiable.cs b/EOBot/Interpreter/Variables/IIdentifiable.cs index 3d21ccd4f..f1c87c708 100644 --- a/EOBot/Interpreter/Variables/IIdentifiable.cs +++ b/EOBot/Interpreter/Variables/IIdentifiable.cs @@ -4,4 +4,4 @@ public interface IIdentifiable { string StringValue { get; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/IVariable.cs b/EOBot/Interpreter/Variables/IVariable.cs index f3767e5e0..42badf86c 100644 --- a/EOBot/Interpreter/Variables/IVariable.cs +++ b/EOBot/Interpreter/Variables/IVariable.cs @@ -11,4 +11,4 @@ public interface IVariable : IVariable { T Value { get; } } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/IntVariable.cs b/EOBot/Interpreter/Variables/IntVariable.cs index 04fc25b46..397d519aa 100644 --- a/EOBot/Interpreter/Variables/IntVariable.cs +++ b/EOBot/Interpreter/Variables/IntVariable.cs @@ -18,4 +18,4 @@ public class IntVariable : IVariable public override string ToString() => StringValue; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/ObjectVariable.cs b/EOBot/Interpreter/Variables/ObjectVariable.cs index 99f02669e..099c9a8ca 100644 --- a/EOBot/Interpreter/Variables/ObjectVariable.cs +++ b/EOBot/Interpreter/Variables/ObjectVariable.cs @@ -43,4 +43,4 @@ public class RuntimeEvaluatedMemberObjectVariable : IVariable public override string ToString() => StringValue; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/PredefinedIdentifiers.cs b/EOBot/Interpreter/Variables/PredefinedIdentifiers.cs index 7e4dd89d9..977d4dcd1 100644 --- a/EOBot/Interpreter/Variables/PredefinedIdentifiers.cs +++ b/EOBot/Interpreter/Variables/PredefinedIdentifiers.cs @@ -48,4 +48,4 @@ public static class PredefinedIdentifiers public const string JOIN_PARTY = "JoinParty"; public const string CHAT = "Chat"; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/StringVariable.cs b/EOBot/Interpreter/Variables/StringVariable.cs index 48d7d7b88..7884fd76b 100644 --- a/EOBot/Interpreter/Variables/StringVariable.cs +++ b/EOBot/Interpreter/Variables/StringVariable.cs @@ -18,4 +18,4 @@ public class StringVariable : IVariable public override string ToString() => StringValue; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/UndefinedVariable.cs b/EOBot/Interpreter/Variables/UndefinedVariable.cs index 16d445a54..95582b946 100644 --- a/EOBot/Interpreter/Variables/UndefinedVariable.cs +++ b/EOBot/Interpreter/Variables/UndefinedVariable.cs @@ -12,4 +12,4 @@ private UndefinedVariable() { } public override string ToString() => StringValue; } -} +} \ No newline at end of file diff --git a/EOBot/Interpreter/Variables/VoidFunction.cs b/EOBot/Interpreter/Variables/VoidFunction.cs index 97c21c506..1429b34ef 100644 --- a/EOBot/Interpreter/Variables/VoidFunction.cs +++ b/EOBot/Interpreter/Variables/VoidFunction.cs @@ -128,4 +128,4 @@ public void Call(params IIdentifiable[] parameters) _referenceFunc((TParam1)(dynamic)parameters[0], (TParam2)(dynamic)parameters[1], (TParam3)(dynamic)parameters[2], (TParam4)(dynamic)parameters[3], (TParam5)(dynamic)parameters[4]); } } -} +} \ No newline at end of file diff --git a/EOBot/NamesList.cs b/EOBot/NamesList.cs index 9c163a694..0c1a91aea 100644 --- a/EOBot/NamesList.cs +++ b/EOBot/NamesList.cs @@ -52,4 +52,4 @@ public static string Rand() return ret; } } -} +} \ No newline at end of file diff --git a/EOBot/Program.cs b/EOBot/Program.cs index e9fde73ad..2cbc6e2fa 100644 --- a/EOBot/Program.cs +++ b/EOBot/Program.cs @@ -1,4 +1,8 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EOBot.Interpreter; using EOLib; using EOLib.Domain.Character; @@ -9,10 +13,6 @@ using EOLib.Domain.Spells; using EOLib.IO.Repositories; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace EOBot { @@ -411,4 +411,4 @@ TIME THE SCRIPT FINISHES EXECUTING "); } } -} +} \ No newline at end of file diff --git a/EOBot/Properties/AssemblyInfo.cs b/EOBot/Properties/AssemblyInfo.cs index 8c3480e5f..636611a64 100644 --- a/EOBot/Properties/AssemblyInfo.cs +++ b/EOBot/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/EOBot/ScriptedBot.cs b/EOBot/ScriptedBot.cs index 4d206825e..e9f3dd08f 100644 --- a/EOBot/ScriptedBot.cs +++ b/EOBot/ScriptedBot.cs @@ -1,9 +1,9 @@ -using EOBot.Interpreter; -using EOBot.Interpreter.States; -using EOBot.Interpreter.Variables; -using System; +using System; using System.Threading; using System.Threading.Tasks; +using EOBot.Interpreter; +using EOBot.Interpreter.States; +using EOBot.Interpreter.Variables; namespace EOBot { @@ -54,4 +54,4 @@ protected override async Task DoWorkAsync(CancellationToken ct) await _interpreter.Run(_programState); } } -} +} \ No newline at end of file diff --git a/EOBot/ScriptedBotFactory.cs b/EOBot/ScriptedBotFactory.cs index cb770ee7d..fa27d634e 100644 --- a/EOBot/ScriptedBotFactory.cs +++ b/EOBot/ScriptedBotFactory.cs @@ -14,4 +14,4 @@ public IBot CreateBot(int index) return new ScriptedBot(index, _parser); } } -} +} \ No newline at end of file diff --git a/EOBot/TrainerBot.cs b/EOBot/TrainerBot.cs index b33a01262..938550cff 100644 --- a/EOBot/TrainerBot.cs +++ b/EOBot/TrainerBot.cs @@ -1,4 +1,9 @@ -using EOLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using EOLib; using EOLib.Domain.Account; using EOLib.Domain.Character; using EOLib.Domain.Chat; @@ -12,11 +17,6 @@ using EOLib.Net; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; namespace EOBot { @@ -409,4 +409,4 @@ private Task Delay(uint milliseconds) return Task.Delay((int)milliseconds); } } -} +} \ No newline at end of file diff --git a/EOBot/TrainerBotFactory.cs b/EOBot/TrainerBotFactory.cs index 9eaa5efce..68df168fa 100644 --- a/EOBot/TrainerBotFactory.cs +++ b/EOBot/TrainerBotFactory.cs @@ -14,4 +14,4 @@ public IBot CreateBot(int index) return new TrainerBot(index, _parser.Account, _parser.Password, _parser.Character); } } -} +} \ No newline at end of file diff --git a/EOLib.Config.Test/AssemblyInitializer.cs b/EOLib.Config.Test/AssemblyInitializer.cs index e29e89d0a..181f39823 100644 --- a/EOLib.Config.Test/AssemblyInitializer.cs +++ b/EOLib.Config.Test/AssemblyInitializer.cs @@ -1,5 +1,5 @@ -using NUnit.Framework; -using System.IO; +using System.IO; +using NUnit.Framework; [SetUpFixture] public class AssemblyInitializer @@ -9,4 +9,4 @@ public void OneTimeSetUp() { Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory); } -} +} \ No newline at end of file diff --git a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs index a02aa381e..7c3d5f461 100644 --- a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs +++ b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs @@ -58,7 +58,7 @@ public void InvalidConfigFileThatExists_UsesConfigurationValueDefaults() Assert.IsFalse(_configurationRepository.MusicEnabled); Assert.IsFalse(_configurationRepository.SoundEnabled); - + Assert.IsTrue(_configurationRepository.HearWhispers); Assert.IsTrue(_configurationRepository.Interaction); Assert.IsFalse(_configurationRepository.LogChatToFile); diff --git a/EOLib.Config.Test/IniReaderTest.cs b/EOLib.Config.Test/IniReaderTest.cs index 80ef54d17..324a61ed2 100644 --- a/EOLib.Config.Test/IniReaderTest.cs +++ b/EOLib.Config.Test/IniReaderTest.cs @@ -307,4 +307,4 @@ private static void CreateTestFileWithData(string contents) File.WriteAllText(FullPath, contents); } } -} +} \ No newline at end of file diff --git a/EOLib.Config.Test/Properties/AssemblyInfo.cs b/EOLib.Config.Test/Properties/AssemblyInfo.cs index 7b512b6d5..89dc4cda2 100644 --- a/EOLib.Config.Test/Properties/AssemblyInfo.cs +++ b/EOLib.Config.Test/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/EOLib.Config/ConfigDefaults.cs b/EOLib.Config/ConfigDefaults.cs index e2ebf8795..aa15f9506 100644 --- a/EOLib.Config/ConfigDefaults.cs +++ b/EOLib.Config/ConfigDefaults.cs @@ -14,4 +14,4 @@ public static class ConfigDefaults public const int AccountCreateTimeout = 2000; } -} +} \ No newline at end of file diff --git a/EOLib.Config/ConfigFileLoadActions.cs b/EOLib.Config/ConfigFileLoadActions.cs index 6f42d1cae..05b7f03ae 100644 --- a/EOLib.Config/ConfigFileLoadActions.cs +++ b/EOLib.Config/ConfigFileLoadActions.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System; +using System; +using AutomaticTypeMapper; namespace EOLib.Config { @@ -74,4 +74,4 @@ public void LoadConfigFile() _configRepository.InGameHeight = configFile.GetValue(ConfigStrings.Settings, ConfigStrings.InGameHeight, out tempInt) ? tempInt : 0; } } -} +} \ No newline at end of file diff --git a/EOLib.Config/IConfigFileLoadActions.cs b/EOLib.Config/IConfigFileLoadActions.cs index 6bbc78a69..b02144c1f 100644 --- a/EOLib.Config/IConfigFileLoadActions.cs +++ b/EOLib.Config/IConfigFileLoadActions.cs @@ -4,4 +4,4 @@ public interface IConfigFileLoadActions { void LoadConfigFile(); } -} +} \ No newline at end of file diff --git a/EOLib.Config/IConfigurationRepository.cs b/EOLib.Config/IConfigurationRepository.cs index da9f9b8b4..6c756757b 100644 --- a/EOLib.Config/IConfigurationRepository.cs +++ b/EOLib.Config/IConfigurationRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System; +using System; +using AutomaticTypeMapper; namespace EOLib.Config { @@ -114,4 +114,4 @@ public class ConfigurationRepository : IConfigurationRepository, IConfigurationP public bool DebugCrashes { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib.Config/IniReader.cs b/EOLib.Config/IniReader.cs index 33d87eb76..b4022e62c 100644 --- a/EOLib.Config/IniReader.cs +++ b/EOLib.Config/IniReader.cs @@ -192,4 +192,4 @@ private string AddNewHeader(string nextLine) #endregion } -} +} \ No newline at end of file diff --git a/EOLib.Config/MalformedConfigException.cs b/EOLib.Config/MalformedConfigException.cs index 0be9173db..82d2a04f8 100644 --- a/EOLib.Config/MalformedConfigException.cs +++ b/EOLib.Config/MalformedConfigException.cs @@ -12,4 +12,4 @@ public MalformedConfigException(string message, Exception innerException) : base { } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics.Test/GraphicsDeviceTestHelper.cs b/EOLib.Graphics.Test/GraphicsDeviceTestHelper.cs index 6d5b30ec5..e2befc452 100644 --- a/EOLib.Graphics.Test/GraphicsDeviceTestHelper.cs +++ b/EOLib.Graphics.Test/GraphicsDeviceTestHelper.cs @@ -40,4 +40,4 @@ private void Dispose(bool disposing) } } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics.Test/NativeGraphicsLoaderTest.cs b/EOLib.Graphics.Test/NativeGraphicsLoaderTest.cs index 2d6d20331..a8705a5af 100644 --- a/EOLib.Graphics.Test/NativeGraphicsLoaderTest.cs +++ b/EOLib.Graphics.Test/NativeGraphicsLoaderTest.cs @@ -1,10 +1,10 @@ -using Moq; -using NUnit.Framework; -using PELoaderLib; -using System; +using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; +using Moq; +using NUnit.Framework; +using PELoaderLib; namespace EOLib.Graphics.Test { @@ -75,4 +75,4 @@ private Mock SetupPEFileForGFXType(GFXTypes type, byte[] array) return peFile; } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics.Test/NativeGraphicsManagerTest.cs b/EOLib.Graphics.Test/NativeGraphicsManagerTest.cs index 69d24a3e7..b5e3eea43 100644 --- a/EOLib.Graphics.Test/NativeGraphicsManagerTest.cs +++ b/EOLib.Graphics.Test/NativeGraphicsManagerTest.cs @@ -1,10 +1,10 @@ using System; using System.Diagnostics.CodeAnalysis; using System.Linq; -using NUnit.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Moq; -using Microsoft.Xna.Framework; +using NUnit.Framework; namespace EOLib.Graphics.Test { @@ -142,7 +142,7 @@ public void WhenLoadTexture_Transparent_SetsBlackToTransparent() FillBitmapWithColor(bmp, Color.Black); resultTexture = _nativeGraphicsManager.TextureFromResource(GFXTypes.PreLoginUI, requestedResource, true); - var data = new Microsoft.Xna.Framework.Color[resultTexture.Width*resultTexture.Height]; + var data = new Microsoft.Xna.Framework.Color[resultTexture.Width * resultTexture.Height]; resultTexture.GetData(data); Assert.IsTrue(data.All(x => x.A == 0)); @@ -219,7 +219,7 @@ private Memory LoadGFXReturnsBitmap(GFXTypes whichFile, int requestedResou private static void FillBitmapWithColor(Memory image, Color color) { - for (int i = 54; i < image.Length; i+=4) + for (int i = 54; i < image.Length; i += 4) { image.Span[i] = color.B; image.Span[i + 1] = color.G; @@ -237,4 +237,4 @@ private void GetTextureAgain(GFXTypes whichFile, int requestedResource) _nativeGraphicsManager.TextureFromResource(whichFile, requestedResource); } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics.Test/PEFileCollectionTest.cs b/EOLib.Graphics.Test/PEFileCollectionTest.cs index 2dd542e1d..7c8458f41 100644 --- a/EOLib.Graphics.Test/PEFileCollectionTest.cs +++ b/EOLib.Graphics.Test/PEFileCollectionTest.cs @@ -2,8 +2,8 @@ using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; -using NUnit.Framework; using Moq; +using NUnit.Framework; using PELoaderLib; namespace EOLib.Graphics.Test @@ -63,7 +63,7 @@ public void Dispose_DisposesAllFiles() _collection.Dispose(); - foreach(var file in _collection.Values) + foreach (var file in _collection.Values) Mock.Get(file).Verify(x => x.Dispose(), Times.Once); } @@ -74,4 +74,4 @@ private void CreateExpectedDirectoryWithFiles(int numFiles = 0, string fileNameF File.WriteAllText(string.Format(Path.Combine(ExpectedDirectory, fileNameFormat), i), "test contents"); } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics.Test/Properties/AssemblyInfo.cs b/EOLib.Graphics.Test/Properties/AssemblyInfo.cs index df2478ed1..16e12e6a2 100644 --- a/EOLib.Graphics.Test/Properties/AssemblyInfo.cs +++ b/EOLib.Graphics.Test/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/EOLib.Graphics.Test/RectangleExtensionTest.cs b/EOLib.Graphics.Test/RectangleExtensionTest.cs index a97a9ae9e..4c12f982d 100644 --- a/EOLib.Graphics.Test/RectangleExtensionTest.cs +++ b/EOLib.Graphics.Test/RectangleExtensionTest.cs @@ -1,6 +1,6 @@ using System.Diagnostics.CodeAnalysis; -using NUnit.Framework; using Microsoft.Xna.Framework; +using NUnit.Framework; namespace EOLib.Graphics.Test { @@ -39,4 +39,4 @@ public void WithPosition_DoesNotModify_OriginalRectangle() Assert.AreNotEqual(newRectangle, rectangle); } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/GFXTypes.cs b/EOLib.Graphics/GFXTypes.cs index a6dfe46b1..7e63789c0 100644 --- a/EOLib.Graphics/GFXTypes.cs +++ b/EOLib.Graphics/GFXTypes.cs @@ -103,4 +103,4 @@ public enum GFXTypes /// SpellIcons } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/IGraphicsDeviceRepository.cs b/EOLib.Graphics/IGraphicsDeviceRepository.cs index 91b67d8ad..994b89848 100644 --- a/EOLib.Graphics/IGraphicsDeviceRepository.cs +++ b/EOLib.Graphics/IGraphicsDeviceRepository.cs @@ -26,4 +26,4 @@ public class GraphicsDeviceRepository : IGraphicsDeviceRepository, IGraphicsDevi public GraphicsDeviceManager GraphicsDeviceManager { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/INativeGraphicsLoader.cs b/EOLib.Graphics/INativeGraphicsLoader.cs index d24b705c7..e1f6b4613 100644 --- a/EOLib.Graphics/INativeGraphicsLoader.cs +++ b/EOLib.Graphics/INativeGraphicsLoader.cs @@ -6,4 +6,4 @@ public interface INativeGraphicsLoader { ReadOnlyMemory LoadGFX(GFXTypes file, int resourceValue); } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/INativeGraphicsManager.cs b/EOLib.Graphics/INativeGraphicsManager.cs index c5f55313f..db5f6c351 100644 --- a/EOLib.Graphics/INativeGraphicsManager.cs +++ b/EOLib.Graphics/INativeGraphicsManager.cs @@ -17,4 +17,4 @@ public interface INativeGraphicsManager : IDisposable /// Texture2D containing the image from the *.egf file Texture2D TextureFromResource(GFXTypes file, int resourceVal, bool transparent = false, bool reloadFromFile = false, bool fullTransparent = false); } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/LibraryLoadException.cs b/EOLib.Graphics/LibraryLoadException.cs index 503f33192..313fe9bf5 100644 --- a/EOLib.Graphics/LibraryLoadException.cs +++ b/EOLib.Graphics/LibraryLoadException.cs @@ -16,4 +16,4 @@ public LibraryLoadException(string libraryNumber, GFXTypes which) WhichGFX = which; } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/NativeGraphicsLoader.cs b/EOLib.Graphics/NativeGraphicsLoader.cs index b201051f0..6066e2080 100644 --- a/EOLib.Graphics/NativeGraphicsLoader.cs +++ b/EOLib.Graphics/NativeGraphicsLoader.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System; +using System; +using AutomaticTypeMapper; namespace EOLib.Graphics { @@ -39,4 +39,4 @@ public ReadOnlyMemory LoadGFX(GFXTypes file, int resourceValue) return fileBytes; } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/NativeGraphicsManager.cs b/EOLib.Graphics/NativeGraphicsManager.cs index 4cbcef2d2..d387d5474 100644 --- a/EOLib.Graphics/NativeGraphicsManager.cs +++ b/EOLib.Graphics/NativeGraphicsManager.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; -using CommunityToolkit.HighPerformance; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; +using AutomaticTypeMapper; +using CommunityToolkit.HighPerformance; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; namespace EOLib.Graphics { @@ -136,6 +136,6 @@ public void Dispose() public class GFXLoadException : Exception { public GFXLoadException(int resource, GFXTypes gfx) - : base($"Unable to load graphic {resource + 100} from file gfx{(int) gfx:000}.egf") { } + : base($"Unable to load graphic {resource + 100} from file gfx{(int)gfx:000}.egf") { } } -} +} \ No newline at end of file diff --git a/EOLib.Graphics/PEFileCollection.cs b/EOLib.Graphics/PEFileCollection.cs index f9121d3c1..6902aeec2 100644 --- a/EOLib.Graphics/PEFileCollection.cs +++ b/EOLib.Graphics/PEFileCollection.cs @@ -35,4 +35,4 @@ public interface IPEFileCollection : IDictionary, IDisposable { void PopulateCollectionWithStandardGFX(); } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/EIFRecordExtensionsTest.cs b/EOLib.IO.Test/EIFRecordExtensionsTest.cs index bb14d36a8..1a7aef846 100644 --- a/EOLib.IO.Test/EIFRecordExtensionsTest.cs +++ b/EOLib.IO.Test/EIFRecordExtensionsTest.cs @@ -45,4 +45,4 @@ public void GetEquipLocation_Unsupported_ReturnsPaperdollMax(ItemType type) private static EIFRecord WithItemType(ItemType type) => (EIFRecord)new EIFRecord().WithProperty(PubRecordProperty.ItemType, (int)type); } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Map/MapFilePropertiesTest.cs b/EOLib.IO.Test/Map/MapFilePropertiesTest.cs index 49cfbe460..0850ca6ea 100644 --- a/EOLib.IO.Test/Map/MapFilePropertiesTest.cs +++ b/EOLib.IO.Test/Map/MapFilePropertiesTest.cs @@ -80,20 +80,20 @@ public void MapFileProperties_CustomProperties_NotChangedWhenDeserialized() [Test] public void MapFileProperties_DeserializeFromByteArray_ThrowsExceptionWhenIncorrectSize() { - var bytes = new byte[] {1, 2}; + var bytes = new byte[] { 1, 2 }; Assert.Throws(() => _mapPropertiesSerializer.DeserializeFromByteArray(bytes)); } [Test] public void MapFileProperties_DeserializeFromByteArray_ThrowsExceptionWhenNotEMF() { - var bytes = Enumerable.Repeat((byte) 254, MapFileProperties.DATA_SIZE).ToArray(); + var bytes = Enumerable.Repeat((byte)254, MapFileProperties.DATA_SIZE).ToArray(); Assert.Throws(() => _mapPropertiesSerializer.DeserializeFromByteArray(bytes)); } private static IMapFileProperties CreateMapPropertiesWithSomeTestData(IMapFileProperties props) { - return props.WithChecksum(new List {1, 2}) + return props.WithChecksum(new List { 1, 2 }) .WithName("Some test name") .WithWidth(200) .WithHeight(100) @@ -118,7 +118,7 @@ private static byte[] CreateExpectedBytes(IMapFileProperties props) ret.AddRange(Encoding.ASCII.GetBytes(props.FileType)); ret.AddRange(props.Checksum.SelectMany(x => numberEncoderService.EncodeNumber(x, 2))); - + var fullName = Enumerable.Repeat((byte)0xFF, 24).ToArray(); var encodedName = mapStringEncoderService.EncodeMapString(props.Name, props.Name.Length); Array.Copy(encodedName, 0, fullName, fullName.Length - encodedName.Length, encodedName.Length); @@ -141,4 +141,4 @@ private static byte[] CreateExpectedBytes(IMapFileProperties props) return ret.ToArray(); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Map/MapFileTest.cs b/EOLib.IO.Test/Map/MapFileTest.cs index 4d7265fba..89d86977d 100644 --- a/EOLib.IO.Test/Map/MapFileTest.cs +++ b/EOLib.IO.Test/Map/MapFileTest.cs @@ -156,7 +156,7 @@ private byte[] CreateDataForMap(IMapFileProperties mapFileProperties, TileSpec s ret.AddRange(nes.EncodeNumber(0, 1)); //count //gfx - foreach (var layer in (MapLayer[]) Enum.GetValues(typeof(MapLayer))) + foreach (var layer in (MapLayer[])Enum.GetValues(typeof(MapLayer))) { ret.AddRange(nes.EncodeNumber(1, 1)); //count ret.AddRange(nes.EncodeNumber(1, 1)); //y @@ -170,4 +170,4 @@ private byte[] CreateDataForMap(IMapFileProperties mapFileProperties, TileSpec s return ret.ToArray(); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Map/MapStringEncoderServiceTest.cs b/EOLib.IO.Test/Map/MapStringEncoderServiceTest.cs index abcaf6d8c..e87cb9c57 100644 --- a/EOLib.IO.Test/Map/MapStringEncoderServiceTest.cs +++ b/EOLib.IO.Test/Map/MapStringEncoderServiceTest.cs @@ -48,8 +48,8 @@ public void DecodeString_ReturnsExpectedString_FromKnownBytes() { const string expected = "Aeven"; - var bytes = new byte[] {49, 104, 41, 104, 94}; - var fullBytes = Enumerable.Repeat((byte) 255, 24).ToArray(); + var bytes = new byte[] { 49, 104, 41, 104, 94 }; + var fullBytes = Enumerable.Repeat((byte)255, 24).ToArray(); Array.Copy(bytes, 0, fullBytes, fullBytes.Length - bytes.Length, bytes.Length); var actual = _service.DecodeMapString(fullBytes); @@ -91,4 +91,4 @@ public void EncodeString_ExtraLength_DecodesToExpectedValue() Assert.That(original, Is.EqualTo(TestString)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Properties/AssemblyInfo.cs b/EOLib.IO.Test/Properties/AssemblyInfo.cs index 26231ee6d..390ee92dd 100644 --- a/EOLib.IO.Test/Properties/AssemblyInfo.cs +++ b/EOLib.IO.Test/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/BasePubFileTest.cs b/EOLib.IO.Test/Pub/BasePubFileTest.cs index c1effa031..94b1dfea9 100644 --- a/EOLib.IO.Test/Pub/BasePubFileTest.cs +++ b/EOLib.IO.Test/Pub/BasePubFileTest.cs @@ -1,7 +1,7 @@ -using EOLib.IO.Pub; -using NUnit.Framework; -using System.Collections.Generic; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; +using EOLib.IO.Pub; +using NUnit.Framework; namespace EOLib.IO.Test.Pub { @@ -172,4 +172,4 @@ public void WithRemovedRecord_IDOutOfrange_ThrowsArgumentException() Assert.That(() => file.WithRemovedRecord((U)record.WithID(2)), Throws.ArgumentException); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/ECFFileTest.cs b/EOLib.IO.Test/Pub/ECFFileTest.cs index 88d0622bc..8c9e1a990 100644 --- a/EOLib.IO.Test/Pub/ECFFileTest.cs +++ b/EOLib.IO.Test/Pub/ECFFileTest.cs @@ -1,6 +1,6 @@ -using EOLib.IO.Pub; +using System.Diagnostics.CodeAnalysis; +using EOLib.IO.Pub; using NUnit.Framework; -using System.Diagnostics.CodeAnalysis; namespace EOLib.IO.Test.Pub { @@ -13,4 +13,4 @@ public void HasCorrectFileType() Assert.That(new ECFFile().FileType, Is.EqualTo("ECF")); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/ECFRecordTest.cs b/EOLib.IO.Test/Pub/ECFRecordTest.cs index beb111628..0f7d7002a 100644 --- a/EOLib.IO.Test/Pub/ECFRecordTest.cs +++ b/EOLib.IO.Test/Pub/ECFRecordTest.cs @@ -1,8 +1,8 @@ -using EOLib.IO.Pub; -using NUnit.Framework; -using System; +using System; using System.Diagnostics.CodeAnalysis; using System.Linq; +using EOLib.IO.Pub; +using NUnit.Framework; namespace EOLib.IO.Test.Pub { @@ -31,4 +31,4 @@ public void ECFRecord_HasExpectedDataSize() Assert.That(new ECFRecord().DataSize, Is.EqualTo(ExpectedDataSize)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/EIFFileTest.cs b/EOLib.IO.Test/Pub/EIFFileTest.cs index 00c1209da..d5ebad4a9 100644 --- a/EOLib.IO.Test/Pub/EIFFileTest.cs +++ b/EOLib.IO.Test/Pub/EIFFileTest.cs @@ -1,6 +1,6 @@ -using EOLib.IO.Pub; +using System.Diagnostics.CodeAnalysis; +using EOLib.IO.Pub; using NUnit.Framework; -using System.Diagnostics.CodeAnalysis; namespace EOLib.IO.Test.Pub { @@ -13,4 +13,4 @@ public void HasCorrectFileType() Assert.That(new EIFFile().FileType, Is.EqualTo("EIF")); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/EIFRecordTest.cs b/EOLib.IO.Test/Pub/EIFRecordTest.cs index 45710d4cd..77f9b0e18 100644 --- a/EOLib.IO.Test/Pub/EIFRecordTest.cs +++ b/EOLib.IO.Test/Pub/EIFRecordTest.cs @@ -1,8 +1,8 @@ -using EOLib.IO.Pub; -using NUnit.Framework; -using System; +using System; using System.Diagnostics.CodeAnalysis; using System.Linq; +using EOLib.IO.Pub; +using NUnit.Framework; namespace EOLib.IO.Test.Pub { @@ -31,4 +31,4 @@ public void EIFRecord_HasExpectedDataSize() Assert.That(new EIFRecord().DataSize, Is.EqualTo(ExpectedDataSize)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/ENFFileTest.cs b/EOLib.IO.Test/Pub/ENFFileTest.cs index a9ba82954..506ed4bca 100644 --- a/EOLib.IO.Test/Pub/ENFFileTest.cs +++ b/EOLib.IO.Test/Pub/ENFFileTest.cs @@ -1,6 +1,6 @@ -using EOLib.IO.Pub; +using System.Diagnostics.CodeAnalysis; +using EOLib.IO.Pub; using NUnit.Framework; -using System.Diagnostics.CodeAnalysis; namespace EOLib.IO.Test.Pub { @@ -13,4 +13,4 @@ public void HasCorrectFileType() Assert.That(new ENFFile().FileType, Is.EqualTo("ENF")); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/ENFRecordTest.cs b/EOLib.IO.Test/Pub/ENFRecordTest.cs index c15ba99c1..9458f3451 100644 --- a/EOLib.IO.Test/Pub/ENFRecordTest.cs +++ b/EOLib.IO.Test/Pub/ENFRecordTest.cs @@ -1,8 +1,8 @@ -using EOLib.IO.Pub; -using NUnit.Framework; -using System; +using System; using System.Diagnostics.CodeAnalysis; using System.Linq; +using EOLib.IO.Pub; +using NUnit.Framework; namespace EOLib.IO.Test.Pub { @@ -31,4 +31,4 @@ public void ENFRecord_HasExpectedDataSize() Assert.That(new ENFRecord().DataSize, Is.EqualTo(ExpectedDataSize)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/ESFFileTest.cs b/EOLib.IO.Test/Pub/ESFFileTest.cs index 85715868f..73f4fd41f 100644 --- a/EOLib.IO.Test/Pub/ESFFileTest.cs +++ b/EOLib.IO.Test/Pub/ESFFileTest.cs @@ -1,6 +1,6 @@ -using EOLib.IO.Pub; +using System.Diagnostics.CodeAnalysis; +using EOLib.IO.Pub; using NUnit.Framework; -using System.Diagnostics.CodeAnalysis; namespace EOLib.IO.Test.Pub { @@ -13,4 +13,4 @@ public void HasCorrectFileType() Assert.That(new ESFFile().FileType, Is.EqualTo("ESF")); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Pub/ESFRecordTest.cs b/EOLib.IO.Test/Pub/ESFRecordTest.cs index aa2d1dc50..ee267fd0f 100644 --- a/EOLib.IO.Test/Pub/ESFRecordTest.cs +++ b/EOLib.IO.Test/Pub/ESFRecordTest.cs @@ -1,8 +1,8 @@ -using EOLib.IO.Pub; -using NUnit.Framework; -using System; +using System; using System.Diagnostics.CodeAnalysis; using System.Linq; +using EOLib.IO.Pub; +using NUnit.Framework; namespace EOLib.IO.Test.Pub { @@ -31,4 +31,4 @@ public void ESFRecord_HasExpectedDataSize() Assert.That(new ESFRecord().DataSize, Is.EqualTo(ExpectedDataSize)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Services/Serializers/PubFileSerializerTest.cs b/EOLib.IO.Test/Services/Serializers/PubFileSerializerTest.cs index 9119c8a7f..d03902e10 100644 --- a/EOLib.IO.Test/Services/Serializers/PubFileSerializerTest.cs +++ b/EOLib.IO.Test/Services/Serializers/PubFileSerializerTest.cs @@ -1,12 +1,12 @@ -using EOLib.IO.Pub; -using EOLib.IO.Services; -using EOLib.IO.Services.Serializers; -using NUnit.Framework; -using System.Collections.Generic; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Text; +using EOLib.IO.Pub; +using EOLib.IO.Services; +using EOLib.IO.Services.Serializers; +using NUnit.Framework; namespace EOLib.IO.Test.Services.Serializers { @@ -140,4 +140,4 @@ private static IPubFileSerializer CreateSerializer() return new PubFileSerializer(new NumberEncoderService(), new PubRecordSerializer(new NumberEncoderService())); } } -} +} \ No newline at end of file diff --git a/EOLib.IO.Test/Services/Serializers/PubRecordSerializerTest.cs b/EOLib.IO.Test/Services/Serializers/PubRecordSerializerTest.cs index 9e61634ec..336fc79cf 100644 --- a/EOLib.IO.Test/Services/Serializers/PubRecordSerializerTest.cs +++ b/EOLib.IO.Test/Services/Serializers/PubRecordSerializerTest.cs @@ -1,8 +1,8 @@ -using EOLib.IO.Pub; +using System.Collections.Generic; +using EOLib.IO.Pub; using EOLib.IO.Services; using EOLib.IO.Services.Serializers; using NUnit.Framework; -using System.Collections.Generic; namespace EOLib.IO.Test.Services.Serializers { @@ -59,4 +59,4 @@ private static IPubRecordSerializer Create() return new PubRecordSerializer(new NumberEncoderService()); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Actions/IMapFileLoadActions.cs b/EOLib.IO/Actions/IMapFileLoadActions.cs index 3cae30785..3810934cd 100644 --- a/EOLib.IO/Actions/IMapFileLoadActions.cs +++ b/EOLib.IO/Actions/IMapFileLoadActions.cs @@ -6,4 +6,4 @@ public interface IMapFileLoadActions void LoadMapFileByName(string fileName); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Actions/IPubFileLoadActions.cs b/EOLib.IO/Actions/IPubFileLoadActions.cs index d633276fc..9a39f3532 100644 --- a/EOLib.IO/Actions/IPubFileLoadActions.cs +++ b/EOLib.IO/Actions/IPubFileLoadActions.cs @@ -20,4 +20,4 @@ public interface IPubFileLoadActions void LoadClassFileByName(string fileName); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Actions/MapFileLoadActions.cs b/EOLib.IO/Actions/MapFileLoadActions.cs index 718b81bea..4bf2165cd 100644 --- a/EOLib.IO/Actions/MapFileLoadActions.cs +++ b/EOLib.IO/Actions/MapFileLoadActions.cs @@ -38,4 +38,4 @@ private void AddMapToCache(IMapFile mapFile) _mapFileRepository.MapFiles.Add(mapFile.Properties.MapID, mapFile); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Actions/PubFileLoadActions.cs b/EOLib.IO/Actions/PubFileLoadActions.cs index ccecea1e2..6f666ca4b 100644 --- a/EOLib.IO/Actions/PubFileLoadActions.cs +++ b/EOLib.IO/Actions/PubFileLoadActions.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.IO; +using System.Linq; +using AutomaticTypeMapper; using EOLib.IO.Extensions; using EOLib.IO.Pub; using EOLib.IO.Repositories; using EOLib.IO.Services; -using System.IO; -using System.Linq; namespace EOLib.IO.Actions { diff --git a/EOLib.IO/Caster.cs b/EOLib.IO/Caster.cs index a05496011..6305bac0a 100644 --- a/EOLib.IO/Caster.cs +++ b/EOLib.IO/Caster.cs @@ -34,4 +34,4 @@ private static Func Get() } } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Crc.cs b/EOLib.IO/Crc.cs index 065038db3..bf463607b 100644 --- a/EOLib.IO/Crc.cs +++ b/EOLib.IO/Crc.cs @@ -6,7 +6,7 @@ public static class CRC32 /// This value is used to 'seed' the CRC. It is a polynomial in integer format. It is set to a default when CRC32 is instantiated. /// public static uint Magic { get; set; } - + //lookup table for the CRC private static uint[] lookup = new uint[256]; @@ -75,4 +75,4 @@ public static uint Check(byte[] data, uint offset, uint length) return crc ^ 0xFFFFFFFF; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Extensions/EIFRecordExtensions.cs b/EOLib.IO/Extensions/EIFRecordExtensions.cs index effa61de9..5e596a8b3 100644 --- a/EOLib.IO/Extensions/EIFRecordExtensions.cs +++ b/EOLib.IO/Extensions/EIFRecordExtensions.cs @@ -37,4 +37,4 @@ public static EquipLocation GetEquipLocation(this EIFRecord record) } } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Extensions/ItemSizeExtensions.cs b/EOLib.IO/Extensions/ItemSizeExtensions.cs index 56a14d1aa..807c4f304 100644 --- a/EOLib.IO/Extensions/ItemSizeExtensions.cs +++ b/EOLib.IO/Extensions/ItemSizeExtensions.cs @@ -18,4 +18,4 @@ public static (int Width, int Height) GetDimensions(this ItemSize itemSize) return (width, height); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Extensions/PubFileExtensions.cs b/EOLib.IO/Extensions/PubFileExtensions.cs index 374726d4e..577339825 100644 --- a/EOLib.IO/Extensions/PubFileExtensions.cs +++ b/EOLib.IO/Extensions/PubFileExtensions.cs @@ -1,7 +1,7 @@ -using EOLib.IO.Pub; -using System; +using System; using System.Collections.Generic; using System.Linq; +using EOLib.IO.Pub; namespace EOLib.IO.Extensions { @@ -17,7 +17,7 @@ public static class PubFileExtensions /// The merged pub file. /// Thrown when does not have at least one element. public static IPubFile Merge(IEnumerable> pubFiles) - where TRecord: class, IPubRecord, new() + where TRecord : class, IPubRecord, new() { if (pubFiles.Count() < 1) throw new ArgumentException("pubFiles must have at least 1 element", nameof(pubFiles)); @@ -34,4 +34,4 @@ public static IPubFile Merge(IEnumerable> pu return (IPubFile)mergedFile.WithTotalLength(pubFiles.Select(x => x.Length).Sum()); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Extensions/TileSpecExtensions.cs b/EOLib.IO/Extensions/TileSpecExtensions.cs index b81c00924..60a8c85ed 100644 --- a/EOLib.IO/Extensions/TileSpecExtensions.cs +++ b/EOLib.IO/Extensions/TileSpecExtensions.cs @@ -14,4 +14,4 @@ public static bool IsChair(this TileSpec tileSpec) return tileSpec >= (TileSpec)1 && tileSpec <= (TileSpec)7; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/ChestSpawnMapEntity.cs b/EOLib.IO/Map/ChestSpawnMapEntity.cs index 4ed2984bb..498ea33ca 100644 --- a/EOLib.IO/Map/ChestSpawnMapEntity.cs +++ b/EOLib.IO/Map/ChestSpawnMapEntity.cs @@ -94,4 +94,4 @@ private static ChestSpawnMapEntity MakeCopy(ChestSpawnMapEntity src) src.X, src.Y, src.Key, src.Slot, src.ItemID, src.RespawnTime, src.Amount); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/IMapEntity.cs b/EOLib.IO/Map/IMapEntity.cs index e6a3b91ee..ec75ce875 100644 --- a/EOLib.IO/Map/IMapEntity.cs +++ b/EOLib.IO/Map/IMapEntity.cs @@ -6,4 +6,4 @@ public interface IMapEntity int Y { get; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/IMapFile.cs b/EOLib.IO/Map/IMapFile.cs index c5292854d..045008daa 100644 --- a/EOLib.IO/Map/IMapFile.cs +++ b/EOLib.IO/Map/IMapFile.cs @@ -45,4 +45,4 @@ public interface IMapFile IMapFile RemoveWarpAt(int x, int y); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/MapFile.cs b/EOLib.IO/Map/MapFile.cs index 9aae4c7ea..7ce13f7c7 100644 --- a/EOLib.IO/Map/MapFile.cs +++ b/EOLib.IO/Map/MapFile.cs @@ -47,7 +47,7 @@ public MapFile() new List(), new List()) { - foreach (var layer in (MapLayer[]) Enum.GetValues(typeof(MapLayer))) + foreach (var layer in (MapLayer[])Enum.GetValues(typeof(MapLayer))) _mutableGFX.Add(layer, Matrix.Empty); SetReadOnlyGFX(); } @@ -211,4 +211,4 @@ private void SetReadOnlyGFX() _readOnlyEmptyGFXRows = _mutableEmptyGFXRows.ToDictionary(k => k.Key, v => (IReadOnlyList)v.Value); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/MapFileProperties.cs b/EOLib.IO/Map/MapFileProperties.cs index 94d9a4fdf..01dd91b4a 100644 --- a/EOLib.IO/Map/MapFileProperties.cs +++ b/EOLib.IO/Map/MapFileProperties.cs @@ -194,5 +194,4 @@ private MapFileProperties Clone() }; } } -} - +} \ No newline at end of file diff --git a/EOLib.IO/Map/MapPathToIDConverter.cs b/EOLib.IO/Map/MapPathToIDConverter.cs index a0e711785..c8c81cc34 100644 --- a/EOLib.IO/Map/MapPathToIDConverter.cs +++ b/EOLib.IO/Map/MapPathToIDConverter.cs @@ -14,4 +14,4 @@ public int ConvertFromPathToID(string pathToMapFile) return int.Parse(strID); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/Matrix.cs b/EOLib.IO/Map/Matrix.cs index b58856456..e70d2cc49 100644 --- a/EOLib.IO/Map/Matrix.cs +++ b/EOLib.IO/Map/Matrix.cs @@ -6,7 +6,7 @@ namespace EOLib.IO.Map { public class Matrix : IReadOnlyMatrix { - private static readonly Matrix _empty = new Matrix(new T[0,0]); + private static readonly Matrix _empty = new Matrix(new T[0, 0]); public static Matrix Empty => _empty; private readonly T[,] _arr; @@ -28,7 +28,7 @@ public Matrix(int rows, int cols, T defaultValue) { _default = defaultValue; Fill(defaultValue); - } + } public Matrix(IReadOnlyMatrix other) : this(new T[other.Rows, other.Cols]) @@ -124,4 +124,4 @@ public void Reset() object IEnumerator.Current => Current; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/MusicControl.cs b/EOLib.IO/Map/MusicControl.cs index e09769803..2bed57c80 100644 --- a/EOLib.IO/Map/MusicControl.cs +++ b/EOLib.IO/Map/MusicControl.cs @@ -31,4 +31,4 @@ public enum MusicControl : byte // * Interrupt all music and does not play music for this map. TurnOff = 6, } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/NPCSpawnMapEntity.cs b/EOLib.IO/Map/NPCSpawnMapEntity.cs index dcc250087..fa3bc2ef9 100644 --- a/EOLib.IO/Map/NPCSpawnMapEntity.cs +++ b/EOLib.IO/Map/NPCSpawnMapEntity.cs @@ -83,4 +83,4 @@ private static NPCSpawnMapEntity MakeCopy(NPCSpawnMapEntity src) src.X, src.Y, src.ID, src.SpawnType, src.RespawnTime, src.Amount); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/SignMapEntity.cs b/EOLib.IO/Map/SignMapEntity.cs index 6e83a82df..821ecdddc 100644 --- a/EOLib.IO/Map/SignMapEntity.cs +++ b/EOLib.IO/Map/SignMapEntity.cs @@ -69,4 +69,4 @@ private static SignMapEntity MakeCopy(SignMapEntity src) return new SignMapEntity(src.X, src.Y, src.Title, src.Message, src.RawLength); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/UnknownMapEntity.cs b/EOLib.IO/Map/UnknownMapEntity.cs index 2097a4415..7b1b61de5 100644 --- a/EOLib.IO/Map/UnknownMapEntity.cs +++ b/EOLib.IO/Map/UnknownMapEntity.cs @@ -51,4 +51,4 @@ private static UnknownMapEntity MakeCopy(UnknownMapEntity src) return new UnknownMapEntity(src.X, src.Y, copy); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Map/WarpMapEntity.cs b/EOLib.IO/Map/WarpMapEntity.cs index 809f026c4..7ad39b1b8 100644 --- a/EOLib.IO/Map/WarpMapEntity.cs +++ b/EOLib.IO/Map/WarpMapEntity.cs @@ -100,4 +100,4 @@ private static WarpMapEntity MakeCopy(WarpMapEntity src) src.DoorType); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/NPCType.cs b/EOLib.IO/NPCType.cs index b84d73073..e2a975e88 100644 --- a/EOLib.IO/NPCType.cs +++ b/EOLib.IO/NPCType.cs @@ -20,4 +20,4 @@ public enum NPCType Quest, NONE } -} +} \ No newline at end of file diff --git a/EOLib.IO/NumericConstants.cs b/EOLib.IO/NumericConstants.cs index c82c4f856..1e17c1dcf 100644 --- a/EOLib.IO/NumericConstants.cs +++ b/EOLib.IO/NumericConstants.cs @@ -10,6 +10,6 @@ public static class NumericConstants public const uint THREE_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX; public const uint FOUR_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX; - public static readonly uint[] NUMERIC_MAXIMUM = {ONE_BYTE_MAX, TWO_BYTE_MAX, THREE_BYTE_MAX, FOUR_BYTE_MAX }; + public static readonly uint[] NUMERIC_MAXIMUM = { ONE_BYTE_MAX, TWO_BYTE_MAX, THREE_BYTE_MAX, FOUR_BYTE_MAX }; } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/BasePubFile.cs b/EOLib.IO/Pub/BasePubFile.cs index 18c9d5f9d..fd7e09517 100644 --- a/EOLib.IO/Pub/BasePubFile.cs +++ b/EOLib.IO/Pub/BasePubFile.cs @@ -143,4 +143,4 @@ private static void AdjustIDs(List data) data[i] = (TRecord)data[i].WithID(i + 1); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/ECFFile.cs b/EOLib.IO/Pub/ECFFile.cs index b5fabf506..50ce25396 100644 --- a/EOLib.IO/Pub/ECFFile.cs +++ b/EOLib.IO/Pub/ECFFile.cs @@ -21,4 +21,4 @@ protected override BasePubFile MakeCopy() return new ECFFile(ID, CheckSum, TotalLength, new List(this)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/ECFRecord.cs b/EOLib.IO/Pub/ECFRecord.cs index 84019807b..b122685d5 100644 --- a/EOLib.IO/Pub/ECFRecord.cs +++ b/EOLib.IO/Pub/ECFRecord.cs @@ -40,4 +40,4 @@ protected override PubRecord MakeCopy(List names, Dictionary(names), new Dictionary(propertyBag)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/EIFFile.cs b/EOLib.IO/Pub/EIFFile.cs index 499a3c644..653af4111 100644 --- a/EOLib.IO/Pub/EIFFile.cs +++ b/EOLib.IO/Pub/EIFFile.cs @@ -12,7 +12,7 @@ public EIFFile() } public EIFFile(int id, IReadOnlyList checksum, int totalLength, List data) - : base (id, checksum, totalLength, data) + : base(id, checksum, totalLength, data) { } @@ -21,4 +21,4 @@ protected override BasePubFile MakeCopy() return new EIFFile(ID, CheckSum, TotalLength, new List(this)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/EIFRecord.cs b/EOLib.IO/Pub/EIFRecord.cs index 61e3e1af5..d18253f34 100644 --- a/EOLib.IO/Pub/EIFRecord.cs +++ b/EOLib.IO/Pub/EIFRecord.cs @@ -72,7 +72,7 @@ public EIFRecord() } public EIFRecord(int id, string name) - : base (id, name, PubRecordProperty.Item) + : base(id, name, PubRecordProperty.Item) { } diff --git a/EOLib.IO/Pub/ENFFile.cs b/EOLib.IO/Pub/ENFFile.cs index a6f9dcc23..fe0cb8a38 100644 --- a/EOLib.IO/Pub/ENFFile.cs +++ b/EOLib.IO/Pub/ENFFile.cs @@ -21,4 +21,4 @@ protected override BasePubFile MakeCopy() return new ENFFile(ID, CheckSum, TotalLength, new List(this)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/ESFFile.cs b/EOLib.IO/Pub/ESFFile.cs index e49601565..765271c4a 100644 --- a/EOLib.IO/Pub/ESFFile.cs +++ b/EOLib.IO/Pub/ESFFile.cs @@ -21,4 +21,4 @@ protected override BasePubFile MakeCopy() return new ESFFile(ID, CheckSum, TotalLength, new List(this)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/IPubFile.cs b/EOLib.IO/Pub/IPubFile.cs index 15cd71368..e43d09da4 100644 --- a/EOLib.IO/Pub/IPubFile.cs +++ b/EOLib.IO/Pub/IPubFile.cs @@ -47,7 +47,7 @@ public interface IPubFile /// /// The file ID. Typically this will be set to 1, but will increase incrementally for chunked pub files. /// - int ID { get; } + int ID { get; } /// /// The type of the file, usually a 3-character string e.g. EIF/ENF/ESF/ECF @@ -91,4 +91,4 @@ public interface IPubFile /// The updated pub file. IPubFile WithTotalLength(int totalLength); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/PubRecord.cs b/EOLib.IO/Pub/PubRecord.cs index a23f88d53..e9d92c026 100644 --- a/EOLib.IO/Pub/PubRecord.cs +++ b/EOLib.IO/Pub/PubRecord.cs @@ -47,7 +47,7 @@ public PubRecord(int id, List names, Dictionary(() => _propertyBag.Values .GroupBy(x => x.Offset) .Select(x => x.First().Length) @@ -116,7 +116,7 @@ public override bool Equals(object obj) var namesMatch = true; for (int i = 0; i < NumberOfNames; i++) namesMatch &= Names[i] == pr.Names[i]; - + return namesMatch && Bag.Intersect(pr.Bag).Count() == Bag.Count; } @@ -157,4 +157,4 @@ private static Dictionary GetPropertiesWithFlag(P .ToDictionary(k => k.Key, v => new RecordData(v.Value.Offset, v.Value.Length, 0)); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/PubRecordProperty.cs b/EOLib.IO/Pub/PubRecordProperty.cs index 00f74bfbe..63c135460 100644 --- a/EOLib.IO/Pub/PubRecordProperty.cs +++ b/EOLib.IO/Pub/PubRecordProperty.cs @@ -265,4 +265,4 @@ public enum PubRecordProperty : uint [RecordData(12, 2)] ClassCha } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/RecordData.cs b/EOLib.IO/Pub/RecordData.cs index e07b4f5c4..5869f2852 100644 --- a/EOLib.IO/Pub/RecordData.cs +++ b/EOLib.IO/Pub/RecordData.cs @@ -43,4 +43,4 @@ public override string ToString() return $"{Offset} {Length} {Value}"; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Pub/RecordDataAttribute.cs b/EOLib.IO/Pub/RecordDataAttribute.cs index 664604e95..3c2bc2e01 100644 --- a/EOLib.IO/Pub/RecordDataAttribute.cs +++ b/EOLib.IO/Pub/RecordDataAttribute.cs @@ -15,4 +15,4 @@ public RecordDataAttribute(int offset, int length) Length = length; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/PubFileNameConstants.cs b/EOLib.IO/PubFileNameConstants.cs index 28708da13..1a0da2d6b 100644 --- a/EOLib.IO/PubFileNameConstants.cs +++ b/EOLib.IO/PubFileNameConstants.cs @@ -16,4 +16,4 @@ public static class PubFileNameConstants public const string ECFFormat = "pub/dat{0,3:D3}.ecf"; public const string ECFFilter = "dat*.ecf"; } -} +} \ No newline at end of file diff --git a/EOLib.IO/Repositories/IPubFileProvider.cs b/EOLib.IO/Repositories/IPubFileProvider.cs index b3a215a05..7dc2c834f 100644 --- a/EOLib.IO/Repositories/IPubFileProvider.cs +++ b/EOLib.IO/Repositories/IPubFileProvider.cs @@ -25,4 +25,4 @@ public interface IECFFileProvider { IPubFile ECFFile { get; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Repositories/IPubFileRepository.cs b/EOLib.IO/Repositories/IPubFileRepository.cs index c8489df5e..3462a3fa7 100644 --- a/EOLib.IO/Repositories/IPubFileRepository.cs +++ b/EOLib.IO/Repositories/IPubFileRepository.cs @@ -1,5 +1,5 @@ -using EOLib.IO.Pub; -using System.Collections.Generic; +using System.Collections.Generic; +using EOLib.IO.Pub; namespace EOLib.IO.Repositories { @@ -30,4 +30,4 @@ public interface IECFFileRepository IPubFile ECFFile { get; set; } List> ECFFiles { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Repositories/PubFileRepository.cs b/EOLib.IO/Repositories/PubFileRepository.cs index 2b705e8d2..157ab4c68 100644 --- a/EOLib.IO/Repositories/PubFileRepository.cs +++ b/EOLib.IO/Repositories/PubFileRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.IO.Pub; -using System.Collections.Generic; namespace EOLib.IO.Repositories { diff --git a/EOLib.IO/Services/BasePubLoadService.cs b/EOLib.IO/Services/BasePubLoadService.cs index 80cd6f0d8..b7a706fe7 100644 --- a/EOLib.IO/Services/BasePubLoadService.cs +++ b/EOLib.IO/Services/BasePubLoadService.cs @@ -1,8 +1,8 @@ -using EOLib.IO.Pub; -using EOLib.IO.Services.Serializers; +using System; using System.Collections.Generic; using System.IO; -using System; +using EOLib.IO.Pub; +using EOLib.IO.Services.Serializers; namespace EOLib.IO.Services { @@ -41,4 +41,4 @@ public IEnumerable> LoadPubFromExplicitFile(string directory, protected abstract IPubFile Factory(); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/ClassFileLoadService.cs b/EOLib.IO/Services/ClassFileLoadService.cs index 3b1478861..6373797de 100644 --- a/EOLib.IO/Services/ClassFileLoadService.cs +++ b/EOLib.IO/Services/ClassFileLoadService.cs @@ -16,4 +16,4 @@ public ClassFileLoadService(IPubFileDeserializer pubFileDeserializer) protected override IPubFile Factory() => new ECFFile(); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/IMapFileLoadService.cs b/EOLib.IO/Services/IMapFileLoadService.cs index 8cfa46a0d..52dc47f01 100644 --- a/EOLib.IO/Services/IMapFileLoadService.cs +++ b/EOLib.IO/Services/IMapFileLoadService.cs @@ -8,4 +8,4 @@ public interface IMapFileLoadService IMapFile LoadMapByPath(string pathToMapFile); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/IMapFileSaveService.cs b/EOLib.IO/Services/IMapFileSaveService.cs index 13831ce1d..fb1cc8f7e 100644 --- a/EOLib.IO/Services/IMapFileSaveService.cs +++ b/EOLib.IO/Services/IMapFileSaveService.cs @@ -8,4 +8,4 @@ public interface IMapFileSaveService void SaveFile(string path, IMapFile pubFile, bool rewriteChecksum = true); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/IMapStringEncoderService.cs b/EOLib.IO/Services/IMapStringEncoderService.cs index 15749a993..d98591075 100644 --- a/EOLib.IO/Services/IMapStringEncoderService.cs +++ b/EOLib.IO/Services/IMapStringEncoderService.cs @@ -6,4 +6,4 @@ public interface IMapStringEncoderService byte[] EncodeMapString(string s, int length); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/INumberEncoderService.cs b/EOLib.IO/Services/INumberEncoderService.cs index d9379bfff..179811eb8 100644 --- a/EOLib.IO/Services/INumberEncoderService.cs +++ b/EOLib.IO/Services/INumberEncoderService.cs @@ -6,4 +6,4 @@ public interface INumberEncoderService int DecodeNumber(params byte[] b); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/IPubFileSaveService.cs b/EOLib.IO/Services/IPubFileSaveService.cs index f0add58e8..7f335dd5f 100644 --- a/EOLib.IO/Services/IPubFileSaveService.cs +++ b/EOLib.IO/Services/IPubFileSaveService.cs @@ -7,4 +7,4 @@ public interface IPubFileSaveService void SaveFile(string path, IPubFile pubFile, bool rewriteChecksum = true) where TRecord : class, IPubRecord, new(); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/IPubLoadService.cs b/EOLib.IO/Services/IPubLoadService.cs index 11aa7ff3e..e9febbd6f 100644 --- a/EOLib.IO/Services/IPubLoadService.cs +++ b/EOLib.IO/Services/IPubLoadService.cs @@ -1,5 +1,5 @@ -using EOLib.IO.Pub; -using System.Collections.Generic; +using System.Collections.Generic; +using EOLib.IO.Pub; namespace EOLib.IO.Services { @@ -10,4 +10,4 @@ public interface IPubLoadService IEnumerable> LoadPubFromExplicitFile(string directory, string fileName); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/ItemFileLoadService.cs b/EOLib.IO/Services/ItemFileLoadService.cs index 432bc3e9e..5f889c4cf 100644 --- a/EOLib.IO/Services/ItemFileLoadService.cs +++ b/EOLib.IO/Services/ItemFileLoadService.cs @@ -16,4 +16,4 @@ public ItemFileLoadService(IPubFileDeserializer pubFileDeserializer) protected override IPubFile Factory() => new EIFFile(); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/MapFileLoadService.cs b/EOLib.IO/Services/MapFileLoadService.cs index ac859dcf9..3bd23bda9 100644 --- a/EOLib.IO/Services/MapFileLoadService.cs +++ b/EOLib.IO/Services/MapFileLoadService.cs @@ -38,4 +38,4 @@ public IMapFile LoadMapByPath(string pathToMapFile) return mapFile; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/MapStringEncoderService.cs b/EOLib.IO/Services/MapStringEncoderService.cs index 2f2c19c0a..c3152dced 100644 --- a/EOLib.IO/Services/MapStringEncoderService.cs +++ b/EOLib.IO/Services/MapStringEncoderService.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; -using System; +using System; using System.Linq; using System.Text; +using AutomaticTypeMapper; namespace EOLib.IO.Services { @@ -83,4 +83,4 @@ public byte[] EncodeMapString(string s, int length) return chars; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/NPCFileLoadService.cs b/EOLib.IO/Services/NPCFileLoadService.cs index 6ca58027c..7f4c5b81c 100644 --- a/EOLib.IO/Services/NPCFileLoadService.cs +++ b/EOLib.IO/Services/NPCFileLoadService.cs @@ -16,4 +16,4 @@ public NPCFileLoadService(IPubFileDeserializer pubFileDeserializer) protected override IPubFile Factory() => new ENFFile(); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/NumberEncoderService.cs b/EOLib.IO/Services/NumberEncoderService.cs index 83d915bf7..898f5d21b 100644 --- a/EOLib.IO/Services/NumberEncoderService.cs +++ b/EOLib.IO/Services/NumberEncoderService.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using Moffat.EndlessOnline.SDK.Data; -using System; namespace EOLib.IO.Services { @@ -11,4 +11,4 @@ public class NumberEncoderService : INumberEncoderService public int DecodeNumber(params byte[] b) => NumberEncoder.DecodeNumber(b); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/ChestSpawnMapEntitySerializer.cs b/EOLib.IO/Services/Serializers/ChestSpawnMapEntitySerializer.cs index 126169fd7..e9706c8e2 100644 --- a/EOLib.IO/Services/Serializers/ChestSpawnMapEntitySerializer.cs +++ b/EOLib.IO/Services/Serializers/ChestSpawnMapEntitySerializer.cs @@ -39,11 +39,11 @@ public ChestSpawnMapEntity DeserializeFromByteArray(byte[] data) return new ChestSpawnMapEntity() .WithX(_numberEncoderService.DecodeNumber(data[0])) .WithY(_numberEncoderService.DecodeNumber(data[1])) - .WithKey((ChestKey) _numberEncoderService.DecodeNumber(data[2], data[3])) + .WithKey((ChestKey)_numberEncoderService.DecodeNumber(data[2], data[3])) .WithSlot(_numberEncoderService.DecodeNumber(data[4])) .WithItemID(_numberEncoderService.DecodeNumber(data[5], data[6])) .WithRespawnTime(_numberEncoderService.DecodeNumber(data[7], data[8])) .WithAmount(_numberEncoderService.DecodeNumber(data[9], data[10], data[11])); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/IMapDeserializer.cs b/EOLib.IO/Services/Serializers/IMapDeserializer.cs index 01f9ed058..ca0608a18 100644 --- a/EOLib.IO/Services/Serializers/IMapDeserializer.cs +++ b/EOLib.IO/Services/Serializers/IMapDeserializer.cs @@ -16,4 +16,4 @@ public interface IMapEntitySerializer : IMapDeserializer { byte[] SerializeToByteArray(T mapEntity); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/IPubFileDeserializer.cs b/EOLib.IO/Services/Serializers/IPubFileDeserializer.cs index 9f9c685be..2c8b61349 100644 --- a/EOLib.IO/Services/Serializers/IPubFileDeserializer.cs +++ b/EOLib.IO/Services/Serializers/IPubFileDeserializer.cs @@ -1,5 +1,5 @@ -using EOLib.IO.Pub; -using System; +using System; +using EOLib.IO.Pub; namespace EOLib.IO.Services.Serializers { @@ -14,4 +14,4 @@ public interface IPubFileSerializer : IPubFileDeserializer byte[] SerializeToByteArray(IPubFile file, bool rewriteChecksum = true) where TRecord : class, IPubRecord, new(); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/IPubRecordSerializer.cs b/EOLib.IO/Services/Serializers/IPubRecordSerializer.cs index 5643e64c9..ffb46aed7 100644 --- a/EOLib.IO/Services/Serializers/IPubRecordSerializer.cs +++ b/EOLib.IO/Services/Serializers/IPubRecordSerializer.cs @@ -1,5 +1,5 @@ -using EOLib.IO.Pub; -using System; +using System; +using EOLib.IO.Pub; namespace EOLib.IO.Services.Serializers { @@ -9,4 +9,4 @@ public interface IPubRecordSerializer byte[] SerializeToByteArray(IPubRecord record); } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/MapFileSerializer.cs b/EOLib.IO/Services/Serializers/MapFileSerializer.cs index ac333f553..2e5c36814 100644 --- a/EOLib.IO/Services/Serializers/MapFileSerializer.cs +++ b/EOLib.IO/Services/Serializers/MapFileSerializer.cs @@ -428,4 +428,4 @@ private List WriteMapSigns(IMapFile mapFile) #endregion } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/MapPropertiesSerializer.cs b/EOLib.IO/Services/Serializers/MapPropertiesSerializer.cs index 51c92c8f0..276a582e5 100644 --- a/EOLib.IO/Services/Serializers/MapPropertiesSerializer.cs +++ b/EOLib.IO/Services/Serializers/MapPropertiesSerializer.cs @@ -72,7 +72,7 @@ public IMapFileProperties DeserializeFromByteArray(byte[] data) .WithName(mapName) .WithPKAvailable(_numberEncoderService.DecodeNumber(data[31]) == 3 || (mapNameArray[0] == 0xFF && mapNameArray[1] == 0x01)) - .WithEffect((MapEffect) _numberEncoderService.DecodeNumber(data[32])) + .WithEffect((MapEffect)_numberEncoderService.DecodeNumber(data[32])) .WithMusic(_numberEncoderService.DecodeNumber(data[33])) .WithControl((MusicControl)_numberEncoderService.DecodeNumber(data[34])) .WithAmbientNoise(_numberEncoderService.DecodeNumber(data[35], data[36])) @@ -101,4 +101,4 @@ private byte[] EncodeMapName(IMapFileProperties mapEntity) return formattedName; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/NPCSpawnMapEntitySerializer.cs b/EOLib.IO/Services/Serializers/NPCSpawnMapEntitySerializer.cs index 0c59c1ac4..c1efc5286 100644 --- a/EOLib.IO/Services/Serializers/NPCSpawnMapEntitySerializer.cs +++ b/EOLib.IO/Services/Serializers/NPCSpawnMapEntitySerializer.cs @@ -44,4 +44,4 @@ public NPCSpawnMapEntity DeserializeFromByteArray(byte[] data) .WithAmount(_numberEncoderService.DecodeNumber(data[7])); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/PubFileSerializer.cs b/EOLib.IO/Services/Serializers/PubFileSerializer.cs index 2817711f1..b3a8b9248 100644 --- a/EOLib.IO/Services/Serializers/PubFileSerializer.cs +++ b/EOLib.IO/Services/Serializers/PubFileSerializer.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; -using EOLib.IO.Pub; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text; +using AutomaticTypeMapper; +using EOLib.IO.Pub; namespace EOLib.IO.Services.Serializers { @@ -95,7 +95,7 @@ public byte[] SerializeToByteArray(IPubFile file, bool rewrite var checksumBytes = new List(); for (int i = 0; i < file.CheckSum.Count; i++) checksumBytes.AddRange(_numberEncoderService.EncodeNumber(file.CheckSum[i], 2)); - + if (rewriteChecksum) { var checksum = CRC32.Check(fileBytes); @@ -106,4 +106,4 @@ public byte[] SerializeToByteArray(IPubFile file, bool rewrite return fileBytes; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/PubRecordSerializer.cs b/EOLib.IO/Services/Serializers/PubRecordSerializer.cs index d589792d3..02a152350 100644 --- a/EOLib.IO/Services/Serializers/PubRecordSerializer.cs +++ b/EOLib.IO/Services/Serializers/PubRecordSerializer.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; -using EOLib.IO.Pub; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; +using AutomaticTypeMapper; +using EOLib.IO.Pub; namespace EOLib.IO.Services.Serializers { @@ -75,4 +75,4 @@ public byte[] SerializeToByteArray(IPubRecord record) return retList.ToArray(); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/SignMapEntitySerializer.cs b/EOLib.IO/Services/Serializers/SignMapEntitySerializer.cs index 13b9815a5..ab90f7af8 100644 --- a/EOLib.IO/Services/Serializers/SignMapEntitySerializer.cs +++ b/EOLib.IO/Services/Serializers/SignMapEntitySerializer.cs @@ -60,4 +60,4 @@ public SignMapEntity DeserializeFromByteArray(byte[] data) return sign; } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/UnknownMapEntitySerializer.cs b/EOLib.IO/Services/Serializers/UnknownMapEntitySerializer.cs index 55bac9cb3..d9dac4a4f 100644 --- a/EOLib.IO/Services/Serializers/UnknownMapEntitySerializer.cs +++ b/EOLib.IO/Services/Serializers/UnknownMapEntitySerializer.cs @@ -18,7 +18,7 @@ public UnknownMapEntitySerializer(INumberEncoderService numberEncoderService) public byte[] SerializeToByteArray(UnknownMapEntity mapEntity) { - if(mapEntity.RawData.Length != UnknownMapEntity.DATA_SIZE) + if (mapEntity.RawData.Length != UnknownMapEntity.DATA_SIZE) throw new ArgumentException("Data is improperly sized for serialization", nameof(mapEntity)); return mapEntity.RawData; @@ -35,4 +35,4 @@ public UnknownMapEntity DeserializeFromByteArray(byte[] data) .WithRawData(data); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/Serializers/WarpMapEntitySerializer.cs b/EOLib.IO/Services/Serializers/WarpMapEntitySerializer.cs index 41c7a8a0d..9ea93e7ee 100644 --- a/EOLib.IO/Services/Serializers/WarpMapEntitySerializer.cs +++ b/EOLib.IO/Services/Serializers/WarpMapEntitySerializer.cs @@ -41,7 +41,7 @@ public WarpMapEntity DeserializeFromByteArray(byte[] data) .WithDestinationMapX(_numberEncoderService.DecodeNumber(data[3])) .WithDestinationMapY(_numberEncoderService.DecodeNumber(data[4])) .WithLevelRequirement(_numberEncoderService.DecodeNumber(data[5])) - .WithDoorType((DoorSpec) _numberEncoderService.DecodeNumber(data[6], data[7])); + .WithDoorType((DoorSpec)_numberEncoderService.DecodeNumber(data[6], data[7])); } } -} +} \ No newline at end of file diff --git a/EOLib.IO/Services/SpellFileLoadService.cs b/EOLib.IO/Services/SpellFileLoadService.cs index 0eb60642f..b03cecf65 100644 --- a/EOLib.IO/Services/SpellFileLoadService.cs +++ b/EOLib.IO/Services/SpellFileLoadService.cs @@ -16,4 +16,4 @@ public SpellFileLoadService(IPubFileDeserializer pubFileDeserializer) protected override IPubFile Factory() => new ESFFile(); } -} +} \ No newline at end of file diff --git a/EOLib.Localization.Test/DataFileLoadActionsTest.cs b/EOLib.Localization.Test/DataFileLoadActionsTest.cs index dd79760b1..2de931a38 100644 --- a/EOLib.Localization.Test/DataFileLoadActionsTest.cs +++ b/EOLib.Localization.Test/DataFileLoadActionsTest.cs @@ -1,6 +1,6 @@ -using NUnit.Framework; -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.IO; +using NUnit.Framework; namespace EOLib.Localization.Test { @@ -75,4 +75,4 @@ private void GivenEDFFilesInRequiredDirectory(int numberOfFiles = DataFileConsta File.Create(string.Format(Path.Combine(DataFileConstants.DataFilePath, nameFormat), i)).Close(); } } -} +} \ No newline at end of file diff --git a/EOLib.Localization.Test/EDFLoaderServiceTest.cs b/EOLib.Localization.Test/EDFLoaderServiceTest.cs index 9c7a12a0a..dde150849 100644 --- a/EOLib.Localization.Test/EDFLoaderServiceTest.cs +++ b/EOLib.Localization.Test/EDFLoaderServiceTest.cs @@ -1,9 +1,9 @@ -using NUnit.Framework; -using System; +using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; +using NUnit.Framework; namespace EOLib.Localization.Test { @@ -117,7 +117,7 @@ public void NonSpecialDataFiles_AreDecodedCorrectly(DataFiles whichFile) public void NonSpecialDataFiles_AreDecodedCorrectly_MultipleLines(DataFiles whichFile) { const string fileData = "a7b6cg1f2e3d4 5\na7b6cg1f2e3d4 5"; - var expectedStrings = new[] { "abc12345 defg67", "abc12345 defg67"}; + var expectedStrings = new[] { "abc12345 defg67", "abc12345 defg67" }; GivenDataFileWithContents(FILE_NAME, fileData); @@ -181,7 +181,7 @@ public void NonSpecialDataFiles_Encode_SwapAdjacentCharacterValues_MultiplesOfSe public static DataFiles[] GetStandardEDFFiles() { - return new [] + return new[] { DataFiles.JukeBoxSongs, DataFiles.EnglishStatus1, @@ -206,4 +206,4 @@ private void AssertFileContent(string fileName, string fileData) Assert.That(text, Is.EqualTo(fileData)); } } -} +} \ No newline at end of file diff --git a/EOLib.Localization.Test/LocalizedStringServiceTest.cs b/EOLib.Localization.Test/LocalizedStringServiceTest.cs index 03ccebe97..7a54ee717 100644 --- a/EOLib.Localization.Test/LocalizedStringServiceTest.cs +++ b/EOLib.Localization.Test/LocalizedStringServiceTest.cs @@ -2,8 +2,8 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using EOLib.Config; -using NUnit.Framework; using Moq; +using NUnit.Framework; namespace EOLib.Localization.Test { @@ -29,7 +29,7 @@ public void SetUp() [Test] public void GetString_Dialog_InvalidLanguage_ThrowsArgumentOutOfRangeException() { - Assert.Throws(() => _localizedStringFinder.GetString((EOLanguage) 50, DialogResourceID.ACCOUNT_CREATE_ACCEPTED)); + Assert.Throws(() => _localizedStringFinder.GetString((EOLanguage)50, DialogResourceID.ACCOUNT_CREATE_ACCEPTED)); } [Test] @@ -131,4 +131,4 @@ private void GivenLanguageSetInConfig(EOLanguage language) .Returns(language); } } -} +} \ No newline at end of file diff --git a/EOLib.Localization.Test/Properties/AssemblyInfo.cs b/EOLib.Localization.Test/Properties/AssemblyInfo.cs index 50865fc94..7eb5e6783 100644 --- a/EOLib.Localization.Test/Properties/AssemblyInfo.cs +++ b/EOLib.Localization.Test/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/EOLib.Localization/DataFileConstants.cs b/EOLib.Localization/DataFileConstants.cs index d65a64d24..bcae69818 100644 --- a/EOLib.Localization/DataFileConstants.cs +++ b/EOLib.Localization/DataFileConstants.cs @@ -5,4 +5,4 @@ public static class DataFileConstants public const string DataFilePath = "data/"; public const int ExpectedNumberOfDataFiles = 12; } -} +} \ No newline at end of file diff --git a/EOLib.Localization/DataFileLoadActions.cs b/EOLib.Localization/DataFileLoadActions.cs index 787d34aba..0b9b9e26f 100644 --- a/EOLib.Localization/DataFileLoadActions.cs +++ b/EOLib.Localization/DataFileLoadActions.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; -using System.IO; +using System.IO; using System.Linq; +using AutomaticTypeMapper; namespace EOLib.Localization { diff --git a/EOLib.Localization/DataFileLoadException.cs b/EOLib.Localization/DataFileLoadException.cs index 176e73990..fcef3e680 100644 --- a/EOLib.Localization/DataFileLoadException.cs +++ b/EOLib.Localization/DataFileLoadException.cs @@ -9,4 +9,4 @@ public class DataFileLoadException : Exception public DataFileLoadException() : base(ExceptionMessage) { } } -} +} \ No newline at end of file diff --git a/EOLib.Localization/DataFileRepository.cs b/EOLib.Localization/DataFileRepository.cs index 01bb5966e..28eeda4be 100644 --- a/EOLib.Localization/DataFileRepository.cs +++ b/EOLib.Localization/DataFileRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EOLib.Localization { @@ -27,4 +27,4 @@ public interface IDataFileProvider { IReadOnlyDictionary DataFiles { get; } } -} +} \ No newline at end of file diff --git a/EOLib.Localization/EDFFile.cs b/EOLib.Localization/EDFFile.cs index 1ca39e8d1..e8cddc425 100644 --- a/EOLib.Localization/EDFFile.cs +++ b/EOLib.Localization/EDFFile.cs @@ -40,4 +40,4 @@ public interface IEDFFile IEDFFile WithDataEntry(int key, string data); } -} +} \ No newline at end of file diff --git a/EOLib.Localization/EOResourceID.cs b/EOLib.Localization/EOResourceID.cs index 58767337d..d9cddeaf7 100644 --- a/EOLib.Localization/EOResourceID.cs +++ b/EOLib.Localization/EOResourceID.cs @@ -157,8 +157,8 @@ public enum EOResourceID DIALOG_BARBER_BUY_HAIRSTYLE = 162, DIALOG_WORD_CURRENT = 163, DIALOG_BARBER_DO_YOU_WANT_TO_BUY_A_NEW_HAIRSTYLE = 164, - - + + DIALOG_TRADE_BOTH_PLAYERS_OFFER_ONE_ITEM = 165, DIALOG_TRANSFER_TRANSFER = 176, @@ -384,4 +384,4 @@ public enum EOResourceID DIALOG_BANK_MORE_SPACE = 432, STATUS_LABEL_LOCKER_SPACE_INCREASED = 433, } -} +} \ No newline at end of file diff --git a/EOLib.Localization/LocalizedStringFinder.cs b/EOLib.Localization/LocalizedStringFinder.cs index 12787618c..8dce6da72 100644 --- a/EOLib.Localization/LocalizedStringFinder.cs +++ b/EOLib.Localization/LocalizedStringFinder.cs @@ -74,4 +74,4 @@ public interface ILocalizedStringFinder string GetString(DialogResourceID dataConstant); string GetString(EOResourceID dataConstant); } -} +} \ No newline at end of file diff --git a/EOLib.Localization/Services/EDFLoaderService.cs b/EOLib.Localization/Services/EDFLoaderService.cs index e51fa2fd1..2eafd9550 100644 --- a/EOLib.Localization/Services/EDFLoaderService.cs +++ b/EOLib.Localization/Services/EDFLoaderService.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; -using Moffat.EndlessOnline.SDK.Data; -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; +using AutomaticTypeMapper; +using Moffat.EndlessOnline.SDK.Data; namespace EOLib.Localization { @@ -27,7 +27,7 @@ public IEDFFile LoadFile(string fileName, DataFiles whichFile) public void SaveFile(string fileName, IEDFFile file) { - switch(file.WhichFile) + switch (file.WhichFile) { case DataFiles.CurseFilter: { @@ -116,4 +116,4 @@ private string EncodeDatString(string content, DataFiles whichFile) return Encoding.ASCII.GetString(res); } } -} +} \ No newline at end of file diff --git a/EOLib.Logger/Constants.cs b/EOLib.Logger/Constants.cs index 3df2bbe1b..749be2d19 100644 --- a/EOLib.Logger/Constants.cs +++ b/EOLib.Logger/Constants.cs @@ -11,4 +11,4 @@ internal static class Constants internal const string LOG_FILE_PATH = LOG_DIRECTORY + "/debug.log"; internal const string LOG_FILE_FMT = LOG_DIRECTORY + "/{0}-debug.log"; } -} +} \ No newline at end of file diff --git a/EOLib.Logger/DebugOnlyLogger.cs b/EOLib.Logger/DebugOnlyLogger.cs index c232609b8..aaf3f6158 100644 --- a/EOLib.Logger/DebugOnlyLogger.cs +++ b/EOLib.Logger/DebugOnlyLogger.cs @@ -120,4 +120,4 @@ protected virtual void Dispose(bool disposing) } } } -} +} \ No newline at end of file diff --git a/EOLib.Logger/FileLogger.cs b/EOLib.Logger/FileLogger.cs index 00595543e..d7779fdfc 100644 --- a/EOLib.Logger/FileLogger.cs +++ b/EOLib.Logger/FileLogger.cs @@ -31,4 +31,4 @@ public void Dispose() } } } -} +} \ No newline at end of file diff --git a/EOLib.Logger/LoggerFactory.cs b/EOLib.Logger/LoggerFactory.cs index fcbf232ee..2d34d6d29 100644 --- a/EOLib.Logger/LoggerFactory.cs +++ b/EOLib.Logger/LoggerFactory.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; -using EOLib.Config; -using System; +using System; using System.Linq; +using AutomaticTypeMapper; +using EOLib.Config; namespace EOLib.Logger { @@ -36,4 +36,4 @@ public interface ILoggerFactory ILogger CreateLogger(string fileName = "") where TLogger : class, ILogger, new(); } -} +} \ No newline at end of file diff --git a/EOLib.Logger/LoggerProvider.cs b/EOLib.Logger/LoggerProvider.cs index b54ea7230..5f0d504e5 100644 --- a/EOLib.Logger/LoggerProvider.cs +++ b/EOLib.Logger/LoggerProvider.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System; +using System; +using AutomaticTypeMapper; namespace EOLib.Logger { @@ -32,4 +32,4 @@ public interface ILoggerProvider : IDisposable { ILogger Logger { get; } } -} +} \ No newline at end of file diff --git a/EOLib.Logger/NullLogger.cs b/EOLib.Logger/NullLogger.cs index b48f46945..89ce2101e 100644 --- a/EOLib.Logger/NullLogger.cs +++ b/EOLib.Logger/NullLogger.cs @@ -6,4 +6,4 @@ public void Dispose() { } public void Log(string format, params object[] parameters) { } } -} +} \ No newline at end of file diff --git a/EOLib.Test/Net/FileTransfer/FileRequestServiceTest.cs b/EOLib.Test/Net/FileTransfer/FileRequestServiceTest.cs index 5a2ce8a44..00c7d386c 100644 --- a/EOLib.Test/Net/FileTransfer/FileRequestServiceTest.cs +++ b/EOLib.Test/Net/FileTransfer/FileRequestServiceTest.cs @@ -1,6 +1,8 @@ using System; +using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Text; using EOLib.Domain.Protocol; using EOLib.IO.Map; using EOLib.IO.Pub; @@ -10,14 +12,12 @@ using EOLib.Net.Communication; using EOLib.Net.FileTransfer; using EOLib.Test.TestHelpers; -using NUnit.Framework; -using Moq; -using System.Collections.Generic; +using Moffat.EndlessOnline.SDK.Data; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Text; -using Moffat.EndlessOnline.SDK.Data; +using Moq; +using NUnit.Framework; namespace EOLib.Test.Net.FileTransfer { @@ -133,7 +133,7 @@ public void RequestMapFile_ResponsePacketHasInvalidHeader_ThrowsEmptyPacketRecei [Test] public void RequestMapFile_ResponsePacketHasIncorrectFileType_ThrowsMalformedPacketException() { - Mock.Get(_packetSendService).SetupReceivedPacketHasHeader((byte) InitReply.FileEsf, 33); + Mock.Get(_packetSendService).SetupReceivedPacketHasHeader((byte)InitReply.FileEsf, 33); Assert.ThrowsAsync(async () => await _fileRequestService.RequestMapFile(1, 1)); } @@ -172,7 +172,7 @@ private static bool IsCorrectFileRequestPacket(IPacket packet, FileType type, sh { var waPacket = packet as WelcomeAgreeClientPacket; var correctTyping = waPacket.FileType == type; - + var correctData = true; if (mapId > 0 && sessionId > 0) { @@ -278,4 +278,4 @@ private static byte[] CreateFilePacket(FileType type) #endregion } -} +} \ No newline at end of file diff --git a/EOLib.Test/Properties/AssemblyInfo.cs b/EOLib.Test/Properties/AssemblyInfo.cs index f1e9caf90..50ba5aeac 100644 --- a/EOLib.Test/Properties/AssemblyInfo.cs +++ b/EOLib.Test/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/EOLib.Test/TestHelpers/PacketSendServiceHelpers.cs b/EOLib.Test/TestHelpers/PacketSendServiceHelpers.cs index 4a0629c98..71890d2b1 100644 --- a/EOLib.Test/TestHelpers/PacketSendServiceHelpers.cs +++ b/EOLib.Test/TestHelpers/PacketSendServiceHelpers.cs @@ -1,10 +1,10 @@ -using EOLib.Net.Communication; +using System; +using System.Diagnostics.CodeAnalysis; +using System.Threading.Tasks; +using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Data; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moq; -using System; -using System.Diagnostics.CodeAnalysis; -using System.Threading.Tasks; namespace EOLib.Test.TestHelpers { @@ -25,4 +25,4 @@ internal static void SetupReceivedPacketHasHeader(this Mock(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/CharacterManagementActions.cs b/EOLib/Domain/Character/CharacterManagementActions.cs index 7a352a40a..21f4ac61c 100644 --- a/EOLib/Domain/Character/CharacterManagementActions.cs +++ b/EOLib/Domain/Character/CharacterManagementActions.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System.Linq; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Net; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Linq; -using System.Threading.Tasks; namespace EOLib.Domain.Character { @@ -49,7 +49,7 @@ public async Task CreateCharacter(ICharacterCreateParameters par var response = await _packetSendService.SendEncodedPacketAndWaitAsync(packet); if (!(response is CharacterReplyServerPacket responsePacket)) throw new EmptyPacketReceivedException(); - + if (responsePacket.ReplyCodeData is CharacterReplyServerPacket.ReplyCodeDataOk dataOk && dataOk.Characters.Any()) { _characterSelectorRepository.Characters = dataOk.Characters diff --git a/EOLib/Domain/Character/CharacterRenderProperties.cs b/EOLib/Domain/Character/CharacterRenderProperties.cs index f01a1f734..0346887ea 100644 --- a/EOLib/Domain/Character/CharacterRenderProperties.cs +++ b/EOLib/Domain/Character/CharacterRenderProperties.cs @@ -7,10 +7,10 @@ namespace EOLib.Domain.Character [Record] public sealed partial class CharacterRenderProperties { - public const int MAX_NUMBER_OF_WALK_FRAMES = 5; - public const int MAX_NUMBER_OF_ATTACK_FRAMES = 3; + public const int MAX_NUMBER_OF_WALK_FRAMES = 5; + public const int MAX_NUMBER_OF_ATTACK_FRAMES = 3; public const int MAX_NUMBER_OF_RANGED_ATTACK_FRAMES = 2; - public const int MAX_NUMBER_OF_EMOTE_FRAMES = 3; + public const int MAX_NUMBER_OF_EMOTE_FRAMES = 3; public CharacterActionState CurrentAction { get; } @@ -67,4 +67,4 @@ public static CharacterRenderProperties FromCharacterMapInfo(CharacterMapInfo ch }.ToImmutable(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/CharacterRepository.cs b/EOLib/Domain/Character/CharacterRepository.cs index 09db284f9..9df3edb0a 100644 --- a/EOLib/Domain/Character/CharacterRepository.cs +++ b/EOLib/Domain/Character/CharacterRepository.cs @@ -23,4 +23,4 @@ public class CharacterRepository : ICharacterRepository, ICharacterProvider public Character MainCharacter { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/CharacterSessionRepository.cs b/EOLib/Domain/Character/CharacterSessionRepository.cs index 13b1b7207..ee48aa7b0 100644 --- a/EOLib/Domain/Character/CharacterSessionRepository.cs +++ b/EOLib/Domain/Character/CharacterSessionRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System; +using System; +using AutomaticTypeMapper; namespace EOLib.Domain.Character { @@ -49,4 +49,4 @@ public void ResetState() TodayTotalExp = 0; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/CharacterStat.cs b/EOLib/Domain/Character/CharacterStat.cs index e89b9a0ad..f2d1a9e05 100644 --- a/EOLib/Domain/Character/CharacterStat.cs +++ b/EOLib/Domain/Character/CharacterStat.cs @@ -39,4 +39,4 @@ public enum CharacterStat Earth, Wind, } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/CharacterStats.cs b/EOLib/Domain/Character/CharacterStats.cs index 506718e28..473a17be3 100644 --- a/EOLib/Domain/Character/CharacterStats.cs +++ b/EOLib/Domain/Character/CharacterStats.cs @@ -1,8 +1,8 @@ -using Amadevus.RecordGenerator; -using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; +using System; using System.Collections.Generic; using System.Linq; +using Amadevus.RecordGenerator; +using Moffat.EndlessOnline.SDK.Protocol.Net.Server; namespace EOLib.Domain.Character { @@ -123,4 +123,4 @@ public static CharacterStats FromStatReset(CharacterStatsReset characterStatsUpd }); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/Emote.cs b/EOLib/Domain/Character/Emote.cs index 7cacde529..f23ac77a0 100644 --- a/EOLib/Domain/Character/Emote.cs +++ b/EOLib/Domain/Character/Emote.cs @@ -25,4 +25,4 @@ public enum Emote Playful = 14, MusicNotes = 15, } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/ExperienceTableProvider.cs b/EOLib/Domain/Character/ExperienceTableProvider.cs index 0fbd1a293..2fff39545 100644 --- a/EOLib/Domain/Character/ExperienceTableProvider.cs +++ b/EOLib/Domain/Character/ExperienceTableProvider.cs @@ -13,7 +13,7 @@ public ExperienceTableProvider() { var exp_table = new List { 0 }; for (int i = 1; i < byte.MaxValue - 1; ++i) - exp_table.Add((int) Math.Round(Math.Pow(i, 3)*133.1)); + exp_table.Add((int)Math.Round(Math.Pow(i, 3) * 133.1)); ExperienceByLevel = exp_table; } @@ -23,4 +23,4 @@ public interface IExperienceTableProvider { IReadOnlyList ExperienceByLevel { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/GhostingRepository.cs b/EOLib/Domain/Character/GhostingRepository.cs index f7126cd60..fd88ae427 100644 --- a/EOLib/Domain/Character/GhostingRepository.cs +++ b/EOLib/Domain/Character/GhostingRepository.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Diagnostics; +using AutomaticTypeMapper; using Optional; -using System.Diagnostics; namespace EOLib.Domain.Character { [AutoMappedType(IsSingleton = true)] - public sealed class GhostingRepository: IGhostingProvider, IGhostingRepository + public sealed class GhostingRepository : IGhostingProvider, IGhostingRepository { public bool GhostedRecently => GhostStartTime.Elapsed.TotalMilliseconds > 0 && !GhostStartTime.IsRunning; @@ -47,4 +47,4 @@ public interface IGhostingProvider : IResettable Option GhostTarget { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/IPlayerInfoData.cs b/EOLib/Domain/Character/IPlayerInfoData.cs index ae162a5d1..2990acec4 100644 --- a/EOLib/Domain/Character/IPlayerInfoData.cs +++ b/EOLib/Domain/Character/IPlayerInfoData.cs @@ -24,4 +24,4 @@ public interface IPlayerInfoData CharacterIcon Icon { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/InventoryItem.cs b/EOLib/Domain/Character/InventoryItem.cs index cb5b26e9c..adc0534d7 100644 --- a/EOLib/Domain/Character/InventoryItem.cs +++ b/EOLib/Domain/Character/InventoryItem.cs @@ -1,6 +1,5 @@ -using Amadevus.RecordGenerator; using System; - +using Amadevus.RecordGenerator; using NetItem = Moffat.EndlessOnline.SDK.Protocol.Net.Item; namespace EOLib.Domain.Character @@ -9,7 +8,7 @@ namespace EOLib.Domain.Character public sealed partial class InventoryItem { public int ItemID { get; } - + public int Amount { get; } public static InventoryItem FromNet(NetItem source) => new InventoryItem(source.Id, source.Amount); diff --git a/EOLib/Domain/Character/PaperdollData.cs b/EOLib/Domain/Character/PaperdollData.cs index 3ded396da..5413bbc2e 100644 --- a/EOLib/Domain/Character/PaperdollData.cs +++ b/EOLib/Domain/Character/PaperdollData.cs @@ -1,8 +1,8 @@ -using Amadevus.RecordGenerator; +using System.Collections.Generic; +using Amadevus.RecordGenerator; using EOLib.IO; using Moffat.EndlessOnline.SDK.Protocol; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.Domain.Character { @@ -41,4 +41,4 @@ public PaperdollData() QuestNames = new List(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/PaperdollRepository.cs b/EOLib/Domain/Character/PaperdollRepository.cs index 87eb64a98..bacc09d9e 100644 --- a/EOLib/Domain/Character/PaperdollRepository.cs +++ b/EOLib/Domain/Character/PaperdollRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EOLib.Domain.Character { @@ -20,4 +20,4 @@ public class PaperdollRepository : IPaperdollRepository, IPaperdollProvider IReadOnlyDictionary IPaperdollProvider.VisibleCharacterPaperdolls => VisibleCharacterPaperdolls; } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/TrainingActions.cs b/EOLib/Domain/Character/TrainingActions.cs index 6d4014ba2..30555490d 100644 --- a/EOLib/Domain/Character/TrainingActions.cs +++ b/EOLib/Domain/Character/TrainingActions.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; -using System; namespace EOLib.Domain.Character { @@ -79,4 +79,4 @@ public interface ITrainingActions void LevelUpSkill(int spellId); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Character/WalkValidationActions.cs b/EOLib/Domain/Character/WalkValidationActions.cs index d02a7f17a..bcd7f1c53 100644 --- a/EOLib/Domain/Character/WalkValidationActions.cs +++ b/EOLib/Domain/Character/WalkValidationActions.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Extensions; using EOLib.Domain.Map; using EOLib.IO.Map; using Optional; -using System; -using System.Linq; namespace EOLib.Domain.Character { @@ -70,7 +70,8 @@ public WalkValidationResult IsCellStateWalkable(IMapCellState cellState) var cellChar = cellState.Character.FlatMap(c => c.SomeWhen(cc => cc != mc)); return cellChar.Match( - some: c => { + some: c => + { if (mc.NoWall) return WalkValidationResult.Walkable; @@ -199,4 +200,4 @@ public interface IWalkValidationActions WalkValidationResult IsCellStateWalkable(IMapCellState cellState); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/Builders/ChatPacketBuilder.cs b/EOLib/Domain/Chat/Builders/ChatPacketBuilder.cs index ff643914f..9c22a20f0 100644 --- a/EOLib/Domain/Chat/Builders/ChatPacketBuilder.cs +++ b/EOLib/Domain/Chat/Builders/ChatPacketBuilder.cs @@ -31,4 +31,4 @@ public IPacket BuildChatPacket(ChatType chatType, string chat, string targetChar return packet; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/Builders/IChatPacketBuilder.cs b/EOLib/Domain/Chat/Builders/IChatPacketBuilder.cs index 8768ed773..e9bd22fbb 100644 --- a/EOLib/Domain/Chat/Builders/IChatPacketBuilder.cs +++ b/EOLib/Domain/Chat/Builders/IChatPacketBuilder.cs @@ -6,4 +6,4 @@ public interface IChatPacketBuilder { IPacket BuildChatPacket(ChatType chatType, string chat, string targetCharacter); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/ChatActions.cs b/EOLib/Domain/Chat/ChatActions.cs index adeb17eea..be7a13953 100644 --- a/EOLib/Domain/Chat/ChatActions.cs +++ b/EOLib/Domain/Chat/ChatActions.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Chat.Builders; using EOLib.Domain.Map; @@ -6,8 +8,6 @@ using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; -using System; -using System.Linq; namespace EOLib.Domain.Chat { @@ -155,7 +155,7 @@ private void AddChatForLocalDisplay(ChatType chatType, string chat, string targe _chatRepository.AllChat[ChatTab.Group].Add(new ChatData(ChatTab.Group, who, chat, ChatIcon.HGM, ChatColor.Admin)); break; case ChatType.PM: - if(targetCharacter == _chatRepository.PMTarget1) + if (targetCharacter == _chatRepository.PMTarget1) _chatRepository.AllChat[ChatTab.Private1].Add(new ChatData(ChatTab.Private1, who, chat, ChatIcon.Note, ChatColor.PM)); else if (targetCharacter == _chatRepository.PMTarget2) _chatRepository.AllChat[ChatTab.Private2].Add(new ChatData(ChatTab.Private2, who, chat, ChatIcon.Note, ChatColor.PM)); diff --git a/EOLib/Domain/Chat/ChatData.cs b/EOLib/Domain/Chat/ChatData.cs index b810ba7b3..3ea910917 100644 --- a/EOLib/Domain/Chat/ChatData.cs +++ b/EOLib/Domain/Chat/ChatData.cs @@ -1,5 +1,5 @@ -using Amadevus.RecordGenerator; using System; +using Amadevus.RecordGenerator; namespace EOLib.Domain.Chat { diff --git a/EOLib/Domain/Chat/ChatLoggerProvider.cs b/EOLib/Domain/Chat/ChatLoggerProvider.cs index c6cc93bc2..af4b50a24 100644 --- a/EOLib/Domain/Chat/ChatLoggerProvider.cs +++ b/EOLib/Domain/Chat/ChatLoggerProvider.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.Config; using EOLib.Logger; -using System; namespace EOLib.Domain.Chat { @@ -28,4 +28,4 @@ public void Dispose() ChatLogger.Dispose(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/ChatProcessor.cs b/EOLib/Domain/Chat/ChatProcessor.cs index 0a64f255b..81d2b34ca 100644 --- a/EOLib/Domain/Chat/ChatProcessor.cs +++ b/EOLib/Domain/Chat/ChatProcessor.cs @@ -67,21 +67,21 @@ public string MakeDrunk(string input) if (char.ToLower(c) == 'e' || char.ToLower(c) == 'a') { if (_random.Next(100) < 70) - ret.Insert(i+1, 'j'); + ret.Insert(i + 1, 'j'); } else if (char.ToLower(c) == 'u' || char.ToLower(c) == 'o') { if (_random.Next(100) < 70) - ret.Insert(i+1, 'w'); + ret.Insert(i + 1, 'w'); } else if (c == 'i') { if (_random.Next(100) < 40) - ret.Insert(i+1, 'u'); + ret.Insert(i + 1, 'u'); } else if (c != ' ' && _random.Next(100) < 40) { - ret.Insert(i+1, c); + ret.Insert(i + 1, c); } } @@ -105,7 +105,7 @@ public string MakeDrunk(string input) { if (ret[i] == ' ' && _random.Next(100) < 30) { - ret.Insert(i+1, "*hic* "); + ret.Insert(i + 1, "*hic* "); i += 6; } } @@ -154,4 +154,4 @@ public interface IChatProcessor (bool ShowChat, string FilteredMessage) FilterCurses(string input); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/ChatRepository.cs b/EOLib/Domain/Chat/ChatRepository.cs index 16e7508ae..daa8bad71 100644 --- a/EOLib/Domain/Chat/ChatRepository.cs +++ b/EOLib/Domain/Chat/ChatRepository.cs @@ -61,10 +61,10 @@ public ChatRepository(IConfigurationProvider configurationProvider, public void ResetState() { var chat = new Dictionary>(); - foreach (var tab in (ChatTab[]) Enum.GetValues(typeof(ChatTab))) + foreach (var tab in (ChatTab[])Enum.GetValues(typeof(ChatTab))) chat.Add(tab, new LoggingList(_configurationProvider, _chatLoggerProvider, _chatProcessor)); AllChat = chat; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/ChatTypeCalculator.cs b/EOLib/Domain/Chat/ChatTypeCalculator.cs index 4bfea9423..b0737cfb0 100644 --- a/EOLib/Domain/Chat/ChatTypeCalculator.cs +++ b/EOLib/Domain/Chat/ChatTypeCalculator.cs @@ -16,10 +16,10 @@ public ChatTypeCalculator(ICharacterProvider characterProvider) public ChatType CalculateChatType(string input) { - if(string.IsNullOrEmpty(input)) + if (string.IsNullOrEmpty(input)) return ChatType.Local; - if(!CharacterIsAdmin && (input[0] == '+' || input[0] == '@')) + if (!CharacterIsAdmin && (input[0] == '+' || input[0] == '@')) return ChatType.Local; return input[0] switch diff --git a/EOLib/Domain/Chat/Commands/IPlayerCommand.cs b/EOLib/Domain/Chat/Commands/IPlayerCommand.cs index 4c867bc28..52400e771 100644 --- a/EOLib/Domain/Chat/Commands/IPlayerCommand.cs +++ b/EOLib/Domain/Chat/Commands/IPlayerCommand.cs @@ -6,4 +6,4 @@ public interface IPlayerCommand bool Execute(string parameter); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/Commands/NoWallCommand.cs b/EOLib/Domain/Chat/Commands/NoWallCommand.cs index 1a29ee7a0..293e61677 100644 --- a/EOLib/Domain/Chat/Commands/NoWallCommand.cs +++ b/EOLib/Domain/Chat/Commands/NoWallCommand.cs @@ -30,4 +30,4 @@ public bool Execute(string parameter) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/Commands/PingCommand.cs b/EOLib/Domain/Chat/Commands/PingCommand.cs index 53b2be141..4b6fbc501 100644 --- a/EOLib/Domain/Chat/Commands/PingCommand.cs +++ b/EOLib/Domain/Chat/Commands/PingCommand.cs @@ -29,4 +29,4 @@ public bool Execute(string parameter) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/Commands/UsageCommand.cs b/EOLib/Domain/Chat/Commands/UsageCommand.cs index 9c487c1ec..16ef26e12 100644 --- a/EOLib/Domain/Chat/Commands/UsageCommand.cs +++ b/EOLib/Domain/Chat/Commands/UsageCommand.cs @@ -21,7 +21,7 @@ public UsageCommand(ICharacterProvider characterProvider, public bool Execute(string parameter) { var usage = _characterProvider.MainCharacter.Stats[CharacterStat.Usage]; - var message = $"[x] usage: {usage/60}hrs. {usage%60}min."; + var message = $"[x] usage: {usage / 60}hrs. {usage % 60}min."; var chatData = new ChatData(ChatTab.Local, "System", message, ChatIcon.LookingDude); _chatRepository.AllChat[ChatTab.Local].Add(chatData); @@ -29,4 +29,4 @@ public bool Execute(string parameter) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Chat/LoggingList.cs b/EOLib/Domain/Chat/LoggingList.cs index 849d61fbe..3779aef4f 100644 --- a/EOLib/Domain/Chat/LoggingList.cs +++ b/EOLib/Domain/Chat/LoggingList.cs @@ -1,8 +1,8 @@ -using EOLib.Config; -using EOLib.Localization; -using System; +using System; using System.Collections; using System.Collections.Generic; +using EOLib.Config; +using EOLib.Localization; namespace EOLib.Domain.Chat { @@ -95,4 +95,4 @@ private string GetChatTabString(ChatTab tab) #endregion } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Extensions/CharacterExtensions.cs b/EOLib/Domain/Extensions/CharacterExtensions.cs index fc5b251d0..bf8a4ae63 100644 --- a/EOLib/Domain/Extensions/CharacterExtensions.cs +++ b/EOLib/Domain/Extensions/CharacterExtensions.cs @@ -1,5 +1,5 @@ -using EOLib.Domain.Character; -using System; +using System; +using EOLib.Domain.Character; namespace EOLib.Domain.Extensions { @@ -44,4 +44,4 @@ public static Character.Character WithDamage(this Character.Character original, return original.WithStats(stats).WithRenderProperties(props); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Extensions/CharacterRenderPropertiesExtensions.cs b/EOLib/Domain/Extensions/CharacterRenderPropertiesExtensions.cs index e22612879..ecf88409d 100644 --- a/EOLib/Domain/Extensions/CharacterRenderPropertiesExtensions.cs +++ b/EOLib/Domain/Extensions/CharacterRenderPropertiesExtensions.cs @@ -121,4 +121,4 @@ public static CharacterRenderProperties ResetAnimationFrames(this CharacterRende public static MapCoordinate DestinationCoordinates(this CharacterRenderProperties rp) => new MapCoordinate(rp.GetDestinationX(), rp.GetDestinationY()); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Extensions/CharacterStatExtensions.cs b/EOLib/Domain/Extensions/CharacterStatExtensions.cs index 4cbbd9487..505cb8b2f 100644 --- a/EOLib/Domain/Extensions/CharacterStatExtensions.cs +++ b/EOLib/Domain/Extensions/CharacterStatExtensions.cs @@ -44,4 +44,4 @@ public static string GetKarmaString(this CharacterStats characterStats) return string.Empty; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Extensions/MapExtensions.cs b/EOLib/Domain/Extensions/MapExtensions.cs index ee102fded..691d0350f 100644 --- a/EOLib/Domain/Extensions/MapExtensions.cs +++ b/EOLib/Domain/Extensions/MapExtensions.cs @@ -1,8 +1,8 @@ -using EOLib.Domain.Map; -using EOLib.IO.Map; -using System; +using System; using System.Collections.Generic; using System.Linq; +using EOLib.Domain.Map; +using EOLib.IO.Map; namespace EOLib.Domain.Extensions { @@ -45,4 +45,4 @@ public static IEnumerable GetTileSpecs(this IMapFile map, params } } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Extensions/NPCExtensions.cs b/EOLib/Domain/Extensions/NPCExtensions.cs index 566735522..9e79cecc9 100644 --- a/EOLib/Domain/Extensions/NPCExtensions.cs +++ b/EOLib/Domain/Extensions/NPCExtensions.cs @@ -94,4 +94,4 @@ private static int GetYOffset(EODirection direction) direction == EODirection.Up ? -1 : 0; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Extensions/PaperdollExtensions.cs b/EOLib/Domain/Extensions/PaperdollExtensions.cs index 59bd16f3b..7f59a7efe 100644 --- a/EOLib/Domain/Extensions/PaperdollExtensions.cs +++ b/EOLib/Domain/Extensions/PaperdollExtensions.cs @@ -1,6 +1,6 @@ -using EOLib.IO; +using System.Collections.Generic; +using EOLib.IO; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.Domain.Extensions { @@ -50,4 +50,4 @@ public static IReadOnlyDictionary GetPaperdoll(this Equipmen }; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/IResetStateAction.cs b/EOLib/Domain/IResetStateAction.cs index 2cd328c78..a28e3844d 100644 --- a/EOLib/Domain/IResetStateAction.cs +++ b/EOLib/Domain/IResetStateAction.cs @@ -4,4 +4,4 @@ public interface IResetStateAction { void ResetState(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Bank/BankActions.cs b/EOLib/Domain/Interact/Bank/BankActions.cs index fd221e1d5..94df4b762 100644 --- a/EOLib/Domain/Interact/Bank/BankActions.cs +++ b/EOLib/Domain/Interact/Bank/BankActions.cs @@ -41,4 +41,4 @@ public interface IBankActions void BuyStorageUpgrade(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Bank/BankDataRepository.cs b/EOLib/Domain/Interact/Bank/BankDataRepository.cs index 2a6bd49c4..3306be242 100644 --- a/EOLib/Domain/Interact/Bank/BankDataRepository.cs +++ b/EOLib/Domain/Interact/Bank/BankDataRepository.cs @@ -42,4 +42,4 @@ public void ResetState() LockerUpgrades = Option.None(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Barber/BarberActions.cs b/EOLib/Domain/Interact/Barber/BarberActions.cs index 9624ca394..26af9f499 100644 --- a/EOLib/Domain/Interact/Barber/BarberActions.cs +++ b/EOLib/Domain/Interact/Barber/BarberActions.cs @@ -31,4 +31,4 @@ public interface IBarberActions { void Purchase(int hairStyle, int hairColor); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Barber/BarberDataRepository.cs b/EOLib/Domain/Interact/Barber/BarberDataRepository.cs index d88e0a335..38ebe3c5a 100644 --- a/EOLib/Domain/Interact/Barber/BarberDataRepository.cs +++ b/EOLib/Domain/Interact/Barber/BarberDataRepository.cs @@ -27,4 +27,4 @@ public void ResetState() SessionID = 0; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Board/BoardActions.cs b/EOLib/Domain/Interact/Board/BoardActions.cs index 42802b0ad..9a86e287b 100644 --- a/EOLib/Domain/Interact/Board/BoardActions.cs +++ b/EOLib/Domain/Interact/Board/BoardActions.cs @@ -67,4 +67,4 @@ public interface IBoardActions void DeletePost(int postId); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Board/BoardDataRepository.cs b/EOLib/Domain/Interact/Board/BoardDataRepository.cs index cc09ddaa3..b99db2e75 100644 --- a/EOLib/Domain/Interact/Board/BoardDataRepository.cs +++ b/EOLib/Domain/Interact/Board/BoardDataRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using Optional; -using System.Collections.Generic; namespace EOLib.Domain.Interact.Board { @@ -52,4 +52,4 @@ public void ResetState() ActivePostMessage = Option.None(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Board/BoardPostInfo.cs b/EOLib/Domain/Interact/Board/BoardPostInfo.cs index 41a368abd..f695633f7 100644 --- a/EOLib/Domain/Interact/Board/BoardPostInfo.cs +++ b/EOLib/Domain/Interact/Board/BoardPostInfo.cs @@ -11,4 +11,4 @@ public sealed partial class BoardPostInfo public string Subject { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/BookActions.cs b/EOLib/Domain/Interact/BookActions.cs index 3108ac140..57b0aa731 100644 --- a/EOLib/Domain/Interact/BookActions.cs +++ b/EOLib/Domain/Interact/BookActions.cs @@ -25,4 +25,4 @@ public interface IBookActions { void RequestBook(int characterId); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Citizen/CitizenActions.cs b/EOLib/Domain/Interact/Citizen/CitizenActions.cs index c2d769932..c8348198b 100644 --- a/EOLib/Domain/Interact/Citizen/CitizenActions.cs +++ b/EOLib/Domain/Interact/Citizen/CitizenActions.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Map; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; -using System.Collections.Generic; -using System.Linq; namespace EOLib.Domain.Interact.Citizen { @@ -75,4 +75,4 @@ public interface ICitizenActions void Unsubscribe(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Citizen/CitizenDataRepository.cs b/EOLib/Domain/Interact/Citizen/CitizenDataRepository.cs index f4d131ed2..cdd45c8be 100644 --- a/EOLib/Domain/Interact/Citizen/CitizenDataRepository.cs +++ b/EOLib/Domain/Interact/Citizen/CitizenDataRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using Optional; -using System.Collections.Generic; namespace EOLib.Domain.Interact.Citizen { @@ -38,4 +38,4 @@ public CitizenDataRepository() Questions = new List(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Guild/GuildActions.cs b/EOLib/Domain/Interact/Guild/GuildActions.cs index c1e43f1f3..e48463248 100644 --- a/EOLib/Domain/Interact/Guild/GuildActions.cs +++ b/EOLib/Domain/Interact/Guild/GuildActions.cs @@ -34,4 +34,4 @@ public interface IGuildActions void ViewMembers(string identity); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Guild/GuildSessionRepository.cs b/EOLib/Domain/Interact/Guild/GuildSessionRepository.cs index bc4cfd76b..072ba353b 100644 --- a/EOLib/Domain/Interact/Guild/GuildSessionRepository.cs +++ b/EOLib/Domain/Interact/Guild/GuildSessionRepository.cs @@ -22,4 +22,4 @@ public GuildSessionRepository() SessionID = 0; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/INPCInteractionNotifier.cs b/EOLib/Domain/Interact/INPCInteractionNotifier.cs index b340b801a..064d1b011 100644 --- a/EOLib/Domain/Interact/INPCInteractionNotifier.cs +++ b/EOLib/Domain/Interact/INPCInteractionNotifier.cs @@ -55,4 +55,4 @@ public void NotifyPriestRequest(string partnerName) { } public void NotifyMarriageReply(MarriageReply reply) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Jukebox/JukeboxActions.cs b/EOLib/Domain/Interact/Jukebox/JukeboxActions.cs index 2aa3c265b..f6435ff95 100644 --- a/EOLib/Domain/Interact/Jukebox/JukeboxActions.cs +++ b/EOLib/Domain/Interact/Jukebox/JukeboxActions.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.IO; using EOLib.IO.Repositories; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Optional.Collections; -using System; namespace EOLib.Domain.Interact.Jukebox { @@ -57,4 +57,4 @@ public interface IJukeboxActions void RequestSong(int songIndex); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Jukebox/JukeboxDataRepository.cs b/EOLib/Domain/Interact/Jukebox/JukeboxDataRepository.cs index de7a4a3e1..8e8c97160 100644 --- a/EOLib/Domain/Interact/Jukebox/JukeboxDataRepository.cs +++ b/EOLib/Domain/Interact/Jukebox/JukeboxDataRepository.cs @@ -29,4 +29,4 @@ public void ResetState() PlayingRequestName = Option.None(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Law/LawActions.cs b/EOLib/Domain/Interact/Law/LawActions.cs index 61f0ba62b..0c66cfcb7 100644 --- a/EOLib/Domain/Interact/Law/LawActions.cs +++ b/EOLib/Domain/Interact/Law/LawActions.cs @@ -45,4 +45,4 @@ public interface ILawActions void RequestDivorce(string partner); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Law/LawSessionRepository.cs b/EOLib/Domain/Interact/Law/LawSessionRepository.cs index e3a882691..99bb236ff 100644 --- a/EOLib/Domain/Interact/Law/LawSessionRepository.cs +++ b/EOLib/Domain/Interact/Law/LawSessionRepository.cs @@ -22,4 +22,4 @@ public LawSessionRepository() SessionID = 0; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/MapNPCActions.cs b/EOLib/Domain/Interact/MapNPCActions.cs index 9416146ce..a265b56ef 100644 --- a/EOLib/Domain/Interact/MapNPCActions.cs +++ b/EOLib/Domain/Interact/MapNPCActions.cs @@ -97,4 +97,4 @@ public interface IMapNPCActions void RequestGuild(NPC.NPC npc); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/PaperdollActions.cs b/EOLib/Domain/Interact/PaperdollActions.cs index f510dac80..388db9ee5 100644 --- a/EOLib/Domain/Interact/PaperdollActions.cs +++ b/EOLib/Domain/Interact/PaperdollActions.cs @@ -25,4 +25,4 @@ public interface IPaperdollActions { void RequestPaperdoll(int characterId); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Priest/PriestActions.cs b/EOLib/Domain/Interact/Priest/PriestActions.cs index d9d0e195d..5d83d4608 100644 --- a/EOLib/Domain/Interact/Priest/PriestActions.cs +++ b/EOLib/Domain/Interact/Priest/PriestActions.cs @@ -44,4 +44,4 @@ public interface IPriestActions void ConfirmMarriage(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Priest/PriestSessionRepository.cs b/EOLib/Domain/Interact/Priest/PriestSessionRepository.cs index b2a5ce82e..6f4056c82 100644 --- a/EOLib/Domain/Interact/Priest/PriestSessionRepository.cs +++ b/EOLib/Domain/Interact/Priest/PriestSessionRepository.cs @@ -22,4 +22,4 @@ public PriestSessionRepository() SessionID = 0; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Quest/IStatusLabelNotifier.cs b/EOLib/Domain/Interact/Quest/IStatusLabelNotifier.cs index de069a688..6cebaf2ad 100644 --- a/EOLib/Domain/Interact/Quest/IStatusLabelNotifier.cs +++ b/EOLib/Domain/Interact/Quest/IStatusLabelNotifier.cs @@ -12,4 +12,4 @@ public class NoOpStatusLabelNotifier : IStatusLabelNotifier { public void ShowWarning(string message) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Quest/QuestActions.cs b/EOLib/Domain/Interact/Quest/QuestActions.cs index a483a982a..e378bf797 100644 --- a/EOLib/Domain/Interact/Quest/QuestActions.cs +++ b/EOLib/Domain/Interact/Quest/QuestActions.cs @@ -53,4 +53,4 @@ public interface IQuestActions void RequestQuestHistory(QuestPage page); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Quest/QuestDataRepository.cs b/EOLib/Domain/Interact/Quest/QuestDataRepository.cs index 417e8aa60..47f80a731 100644 --- a/EOLib/Domain/Interact/Quest/QuestDataRepository.cs +++ b/EOLib/Domain/Interact/Quest/QuestDataRepository.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.NPC; using Optional; -using System.Collections.Generic; namespace EOLib.Domain.Interact.Quest { @@ -54,4 +54,4 @@ public void ResetState() QuestHistory = new List(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Quest/QuestDialogData.cs b/EOLib/Domain/Interact/Quest/QuestDialogData.cs index d42214876..b83f4ae87 100644 --- a/EOLib/Domain/Interact/Quest/QuestDialogData.cs +++ b/EOLib/Domain/Interact/Quest/QuestDialogData.cs @@ -1,5 +1,5 @@ -using Amadevus.RecordGenerator; -using System.Collections.Generic; +using System.Collections.Generic; +using Amadevus.RecordGenerator; namespace EOLib.Domain.Interact.Quest { @@ -27,4 +27,4 @@ public QuestDialogData() Actions = new List<(int, string)>(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Quest/QuestProgressData.cs b/EOLib/Domain/Interact/Quest/QuestProgressData.cs index d1cffcc24..8870cedcb 100644 --- a/EOLib/Domain/Interact/Quest/QuestProgressData.cs +++ b/EOLib/Domain/Interact/Quest/QuestProgressData.cs @@ -1,6 +1,6 @@ -using Amadevus.RecordGenerator; +using System; +using Amadevus.RecordGenerator; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; namespace EOLib.Domain.Interact.Quest { @@ -29,4 +29,4 @@ public sealed partial class QuestProgressData public int Target { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Shop/ShopActions.cs b/EOLib/Domain/Interact/Shop/ShopActions.cs index 1df130e86..6c1fc51d9 100644 --- a/EOLib/Domain/Interact/Shop/ShopActions.cs +++ b/EOLib/Domain/Interact/Shop/ShopActions.cs @@ -64,4 +64,4 @@ public interface IShopActions void CraftItem(int itemId); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Shop/ShopCraftIngredient.cs b/EOLib/Domain/Interact/Shop/ShopCraftIngredient.cs index 3c2f11542..65ae47b1e 100644 --- a/EOLib/Domain/Interact/Shop/ShopCraftIngredient.cs +++ b/EOLib/Domain/Interact/Shop/ShopCraftIngredient.cs @@ -19,4 +19,4 @@ public interface IShopCraftIngredient int Amount { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Shop/ShopCraftItem.cs b/EOLib/Domain/Interact/Shop/ShopCraftItem.cs index ccc574ebc..c5ee0512d 100644 --- a/EOLib/Domain/Interact/Shop/ShopCraftItem.cs +++ b/EOLib/Domain/Interact/Shop/ShopCraftItem.cs @@ -21,4 +21,4 @@ public interface IShopCraftItem IReadOnlyList Ingredients { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Shop/ShopDataRepository.cs b/EOLib/Domain/Interact/Shop/ShopDataRepository.cs index fc4b5d047..e3f3e310c 100644 --- a/EOLib/Domain/Interact/Shop/ShopDataRepository.cs +++ b/EOLib/Domain/Interact/Shop/ShopDataRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EOLib.Domain.Interact.Shop { @@ -32,7 +32,7 @@ public class ShopDataRepository : IShopDataProvider, IShopDataRepository public string ShopName { get; set; } public List TradeItems { get; set; } - + public List CraftItems { get; set; } IReadOnlyList IShopDataProvider.TradeItems => TradeItems; @@ -52,4 +52,4 @@ public void ResetState() CraftItems = new List(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Shop/ShopItem.cs b/EOLib/Domain/Interact/Shop/ShopItem.cs index 4a2de6f57..2b491afb2 100644 --- a/EOLib/Domain/Interact/Shop/ShopItem.cs +++ b/EOLib/Domain/Interact/Shop/ShopItem.cs @@ -29,4 +29,4 @@ public interface IShopItem int MaxBuy { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Skill/Skill.cs b/EOLib/Domain/Interact/Skill/Skill.cs index 9eca63b3b..8b5cacef8 100644 --- a/EOLib/Domain/Interact/Skill/Skill.cs +++ b/EOLib/Domain/Interact/Skill/Skill.cs @@ -1,5 +1,5 @@ -using Amadevus.RecordGenerator; -using System.Collections.Generic; +using System.Collections.Generic; +using Amadevus.RecordGenerator; namespace EOLib.Domain.Interact.Skill { @@ -29,4 +29,4 @@ public sealed partial class Skill public int ChaRequirement { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Skill/SkillDataRepository.cs b/EOLib/Domain/Interact/Skill/SkillDataRepository.cs index 9b6068439..92ab5646b 100644 --- a/EOLib/Domain/Interact/Skill/SkillDataRepository.cs +++ b/EOLib/Domain/Interact/Skill/SkillDataRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EOLib.Domain.Interact.Skill { @@ -44,4 +44,4 @@ public void ResetState() Skills = new HashSet(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Skill/SkillmasterActions.cs b/EOLib/Domain/Interact/Skill/SkillmasterActions.cs index 2eac1fa5d..1f10f2bd1 100644 --- a/EOLib/Domain/Interact/Skill/SkillmasterActions.cs +++ b/EOLib/Domain/Interact/Skill/SkillmasterActions.cs @@ -55,4 +55,4 @@ public interface ISkillmasterActions void ResetCharacter(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/Skill/SkillmasterReply.cs b/EOLib/Domain/Interact/Skill/SkillmasterReply.cs index afe01aafe..b281929ef 100644 --- a/EOLib/Domain/Interact/Skill/SkillmasterReply.cs +++ b/EOLib/Domain/Interact/Skill/SkillmasterReply.cs @@ -9,4 +9,4 @@ public enum SkillmasterReply ErrorRemoveItems = 1, ErrorWrongClass = 2 } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Interact/TileSpecMapEntity.cs b/EOLib/Domain/Interact/TileSpecMapEntity.cs index 832cd1c01..0bd43fdc1 100644 --- a/EOLib/Domain/Interact/TileSpecMapEntity.cs +++ b/EOLib/Domain/Interact/TileSpecMapEntity.cs @@ -10,4 +10,4 @@ public sealed partial class TileSpecMapEntity : IMapEntity public int Y { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Item/ItemActions.cs b/EOLib/Domain/Item/ItemActions.cs index 784011137..73bab0548 100644 --- a/EOLib/Domain/Item/ItemActions.cs +++ b/EOLib/Domain/Item/ItemActions.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.IO; +using AutomaticTypeMapper; using EOLib.Domain.Map; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Data; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; -using System.IO; namespace EOLib.Domain.Item { @@ -88,4 +88,4 @@ public interface IItemActions void JunkItem(int itemId, int amount); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Item/ItemDropResult.cs b/EOLib/Domain/Item/ItemDropResult.cs index eb32175e8..158a85dbc 100644 --- a/EOLib/Domain/Item/ItemDropResult.cs +++ b/EOLib/Domain/Item/ItemDropResult.cs @@ -7,4 +7,4 @@ public enum ItemDropResult Jail, TooFar } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Item/ItemDropValidator.cs b/EOLib/Domain/Item/ItemDropValidator.cs index d131479e4..f14a521e8 100644 --- a/EOLib/Domain/Item/ItemDropValidator.cs +++ b/EOLib/Domain/Item/ItemDropValidator.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Map; using EOLib.IO; using EOLib.IO.Repositories; -using System; namespace EOLib.Domain.Item { @@ -53,4 +53,4 @@ public interface IItemDropValidator ItemDropResult ValidateItemDrop(Character.Character mainCharacter, InventoryItem item, MapCoordinate dropPoint); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Item/ItemEquipValidator.cs b/EOLib/Domain/Item/ItemEquipValidator.cs index 58613711b..7a0960513 100644 --- a/EOLib/Domain/Item/ItemEquipValidator.cs +++ b/EOLib/Domain/Item/ItemEquipValidator.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.IO; using EOLib.IO.Extensions; using EOLib.IO.Pub; using EOLib.IO.Repositories; -using System.Linq; namespace EOLib.Domain.Item { @@ -82,4 +82,4 @@ public interface IItemEquipValidator { (ItemEquipResult Result, string Detail, bool IsAlternateEquipLocation) ValidateItemEquip(Character.Character mainCharacter, EIFRecord itemData); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Item/ItemPickupResult.cs b/EOLib/Domain/Item/ItemPickupResult.cs index 61870647e..32aa1e442 100644 --- a/EOLib/Domain/Item/ItemPickupResult.cs +++ b/EOLib/Domain/Item/ItemPickupResult.cs @@ -7,4 +7,4 @@ public enum ItemPickupResult DropProtection, TooHeavy } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Item/ItemPickupValidator.cs b/EOLib/Domain/Item/ItemPickupValidator.cs index 5ce014970..947f950a4 100644 --- a/EOLib/Domain/Item/ItemPickupValidator.cs +++ b/EOLib/Domain/Item/ItemPickupValidator.cs @@ -60,4 +60,4 @@ public interface IItemPickupValidator { ItemPickupResult ValidateItemPickup(Character.Character mainCharacter, MapItem item); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Item/ItemStringService.cs b/EOLib/Domain/Item/ItemStringService.cs index b51b64905..6aa7b7dc6 100644 --- a/EOLib/Domain/Item/ItemStringService.cs +++ b/EOLib/Domain/Item/ItemStringService.cs @@ -30,4 +30,4 @@ public interface IItemStringService string GetStringForInventoryDisplay(EIFRecord record, int amount); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Login/CharacterSelectorRepository.cs b/EOLib/Domain/Login/CharacterSelectorRepository.cs index 4c6f302d0..984567de0 100644 --- a/EOLib/Domain/Login/CharacterSelectorRepository.cs +++ b/EOLib/Domain/Login/CharacterSelectorRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using Optional; -using System.Collections.Generic; namespace EOLib.Domain.Login { @@ -25,4 +25,4 @@ public class CharacterSelectorRepository : ICharacterSelectorRepository, ICharac public Option CharacterForDelete { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Login/LoginActions.cs b/EOLib/Domain/Login/LoginActions.cs index 7a4593d91..6a07d7238 100644 --- a/EOLib/Domain/Login/LoginActions.cs +++ b/EOLib/Domain/Login/LoginActions.cs @@ -1,4 +1,8 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Map; @@ -9,10 +13,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace EOLib.Domain.Login { diff --git a/EOLib/Domain/Login/NewsRepository.cs b/EOLib/Domain/Login/NewsRepository.cs index 5fed0d4f9..ffb77947f 100644 --- a/EOLib/Domain/Login/NewsRepository.cs +++ b/EOLib/Domain/Login/NewsRepository.cs @@ -26,4 +26,4 @@ public class NewsRepository : INewsRepository, INewsProvider IReadOnlyList INewsProvider.NewsText => NewsText; } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Login/PlayerInfoRepository.cs b/EOLib/Domain/Login/PlayerInfoRepository.cs index 8b03b51d6..cb6cfe1d0 100644 --- a/EOLib/Domain/Login/PlayerInfoRepository.cs +++ b/EOLib/Domain/Login/PlayerInfoRepository.cs @@ -66,4 +66,4 @@ public void ResetState() PlayerHasAdminCharacter = false; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/ChestActions.cs b/EOLib/Domain/Map/ChestActions.cs index c9928544f..74ce06dd0 100644 --- a/EOLib/Domain/Map/ChestActions.cs +++ b/EOLib/Domain/Map/ChestActions.cs @@ -60,4 +60,4 @@ public interface IChestActions void TakeItemFromChest(int itemId); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/ChestDataRepository.cs b/EOLib/Domain/Map/ChestDataRepository.cs index edb3bdaff..b39906ec4 100644 --- a/EOLib/Domain/Map/ChestDataRepository.cs +++ b/EOLib/Domain/Map/ChestDataRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; -using System.Collections.Generic; namespace EOLib.Domain.Map { @@ -38,4 +38,4 @@ public void ResetState() Items = new HashSet(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/ChestItem.cs b/EOLib/Domain/Map/ChestItem.cs index 747abb3f3..12b104a84 100644 --- a/EOLib/Domain/Map/ChestItem.cs +++ b/EOLib/Domain/Map/ChestItem.cs @@ -11,4 +11,4 @@ public sealed partial class ChestItem public int Slot { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/CurrentMapProvider.cs b/EOLib/Domain/Map/CurrentMapProvider.cs index 9181cc718..f8c9354f4 100644 --- a/EOLib/Domain/Map/CurrentMapProvider.cs +++ b/EOLib/Domain/Map/CurrentMapProvider.cs @@ -24,4 +24,4 @@ public interface ICurrentMapProvider { IMapFile CurrentMap { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/CurrentMapStateRepository.cs b/EOLib/Domain/Map/CurrentMapStateRepository.cs index e599d0cb8..0128622a7 100644 --- a/EOLib/Domain/Map/CurrentMapStateRepository.cs +++ b/EOLib/Domain/Map/CurrentMapStateRepository.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; -using Optional; using System; using System.Collections.Generic; +using AutomaticTypeMapper; +using Optional; namespace EOLib.Domain.Map { @@ -21,7 +21,7 @@ public interface ICurrentMapStateRepository MapEntityCollectionHashSet MapItems { get; set; } - HashSet OpenDoors { get; set; } + HashSet OpenDoors { get; set; } HashSet PendingDoors { get; set; } @@ -156,4 +156,4 @@ public void ResetState() IsSleepWarp = false; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/IMapCellState.cs b/EOLib/Domain/Map/IMapCellState.cs index b14801373..2e97d6fa5 100644 --- a/EOLib/Domain/Map/IMapCellState.cs +++ b/EOLib/Domain/Map/IMapCellState.cs @@ -1,7 +1,7 @@ -using EOLib.Domain.Character; +using System.Collections.Generic; +using EOLib.Domain.Character; using EOLib.IO.Map; using Optional; -using System.Collections.Generic; namespace EOLib.Domain.Map { @@ -9,7 +9,7 @@ public interface IMapCellState { bool InBounds { get; } - MapCoordinate Coordinate { get; } + MapCoordinate Coordinate { get; } IReadOnlyList Items { get; } @@ -20,11 +20,11 @@ public interface IMapCellState Option Character { get; } IReadOnlyList Characters { get; } - + Option ChestKey { get; } Option Warp { get; } Option Sign { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/LockerActions.cs b/EOLib/Domain/Map/LockerActions.cs index 4a1eb6475..350767dff 100644 --- a/EOLib/Domain/Map/LockerActions.cs +++ b/EOLib/Domain/Map/LockerActions.cs @@ -69,4 +69,4 @@ public interface ILockerActions int GetNewItemAmount(int itemId, int amount); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/LockerDataRepository.cs b/EOLib/Domain/Map/LockerDataRepository.cs index c653933ab..dde7124f1 100644 --- a/EOLib/Domain/Map/LockerDataRepository.cs +++ b/EOLib/Domain/Map/LockerDataRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; -using System.Collections.Generic; namespace EOLib.Domain.Map { @@ -38,4 +38,4 @@ public void ResetState() Items = new HashSet(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/MapActions.cs b/EOLib/Domain/Map/MapActions.cs index 9c41b90c2..707ce286a 100644 --- a/EOLib/Domain/Map/MapActions.cs +++ b/EOLib/Domain/Map/MapActions.cs @@ -92,4 +92,4 @@ public interface IMapActions void OpenJukebox(MapCoordinate location); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/MapCellState.cs b/EOLib/Domain/Map/MapCellState.cs index 5edcdce2a..06cf20c00 100644 --- a/EOLib/Domain/Map/MapCellState.cs +++ b/EOLib/Domain/Map/MapCellState.cs @@ -1,6 +1,6 @@ -using EOLib.IO.Map; +using System.Collections.Generic; +using EOLib.IO.Map; using Optional; -using System.Collections.Generic; namespace EOLib.Domain.Map { @@ -39,4 +39,4 @@ public MapCellState() Sign = Option.None(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/MapCellStateProvider.cs b/EOLib/Domain/Map/MapCellStateProvider.cs index 65b0de3da..206b5fcf9 100644 --- a/EOLib/Domain/Map/MapCellStateProvider.cs +++ b/EOLib/Domain/Map/MapCellStateProvider.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.NPC; @@ -6,8 +8,6 @@ using EOLib.IO.Repositories; using Optional; using Optional.Collections; -using System.Collections.Generic; -using System.Linq; namespace EOLib.Domain.Map { @@ -40,7 +40,7 @@ public IMapCellState GetCellStateAt(int x, int y) var sign = CurrentMap.Signs.FirstOrDefault(s => s.X == x && s.Y == y); var characters = new List(); - if (_mapStateProvider.Characters.ContainsKey(new MapCoordinate(x,y))) + if (_mapStateProvider.Characters.ContainsKey(new MapCoordinate(x, y))) characters = _mapStateProvider.Characters[new MapCoordinate(x, y)].ToList(); if (_characterProvider.MainCharacter.X == x && _characterProvider.MainCharacter.Y == y) characters.Add(_characterProvider.MainCharacter); @@ -59,16 +59,16 @@ public IMapCellState GetCellStateAt(int x, int y) return new MapCellState { - InBounds = true, + InBounds = true, Coordinate = new MapCoordinate(x, y), - Items = items, - TileSpec = tileSpec, - Warp = warp.SomeNotNull().Map(w => new Warp(w)), - ChestKey = chest.SomeNotNull(), - Sign = sign.SomeNotNull().Map(s => new Sign(s)), - Character = characters.FirstOrNone(), + Items = items, + TileSpec = tileSpec, + Warp = warp.SomeNotNull().Map(w => new Warp(w)), + ChestKey = chest.SomeNotNull(), + Sign = sign.SomeNotNull().Map(s => new Sign(s)), + Character = characters.FirstOrNone(), Characters = characters, - NPC = npc + NPC = npc }; } diff --git a/EOLib/Domain/Map/MapCoordinate.cs b/EOLib/Domain/Map/MapCoordinate.cs index 53f9abc52..9c7abc89f 100644 --- a/EOLib/Domain/Map/MapCoordinate.cs +++ b/EOLib/Domain/Map/MapCoordinate.cs @@ -1,5 +1,5 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; +using System; +using Moffat.EndlessOnline.SDK.Protocol.Net.Server; namespace EOLib.Domain.Map { @@ -47,7 +47,7 @@ public override bool Equals(object obj) if (!(obj is MapCoordinate)) return false; - var other = (MapCoordinate) obj; + var other = (MapCoordinate)obj; return X == other.X && Y == other.Y; } @@ -72,4 +72,4 @@ public int CompareTo(MapCoordinate other) return 0; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/MapEntityCollectionHashSet.cs b/EOLib/Domain/Map/MapEntityCollectionHashSet.cs index 3ca5bc1f8..0513fc735 100644 --- a/EOLib/Domain/Map/MapEntityCollectionHashSet.cs +++ b/EOLib/Domain/Map/MapEntityCollectionHashSet.cs @@ -128,4 +128,4 @@ public interface IReadOnlyMapEntityCollection : IEnumerable bool TryGetValue(int key1, out TValue value); bool TryGetValues(MapCoordinate key2, out HashSet values); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/MapItem.cs b/EOLib/Domain/Map/MapItem.cs index 31352bc00..77a32edb7 100644 --- a/EOLib/Domain/Map/MapItem.cs +++ b/EOLib/Domain/Map/MapItem.cs @@ -1,8 +1,8 @@ -using Amadevus.RecordGenerator; +using System; +using Amadevus.RecordGenerator; using EOLib.IO.Map; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; namespace EOLib.Domain.Map { diff --git a/EOLib/Domain/Map/Sign.cs b/EOLib/Domain/Map/Sign.cs index 407dc9a6c..bbcbc848a 100644 --- a/EOLib/Domain/Map/Sign.cs +++ b/EOLib/Domain/Map/Sign.cs @@ -1,5 +1,5 @@ -using EOLib.IO.Map; -using System.Linq; +using System.Linq; +using EOLib.IO.Map; namespace EOLib.Domain.Map { @@ -28,4 +28,4 @@ private static string Filter(string input) return new string(input.Where(x => !char.IsControl(x)).ToArray()); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/UnknownEntitiesRequestActions.cs b/EOLib/Domain/Map/UnknownEntitiesRequestActions.cs index 7b63dd48f..b0a81d522 100644 --- a/EOLib/Domain/Map/UnknownEntitiesRequestActions.cs +++ b/EOLib/Domain/Map/UnknownEntitiesRequestActions.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; -using System.Linq; namespace EOLib.Domain.Map { @@ -59,4 +59,4 @@ public interface IUnknownEntitiesRequestActions void RequestAll(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/UnlockChestValidator.cs b/EOLib/Domain/Map/UnlockChestValidator.cs index 938f1f48f..20572d831 100644 --- a/EOLib/Domain/Map/UnlockChestValidator.cs +++ b/EOLib/Domain/Map/UnlockChestValidator.cs @@ -42,4 +42,4 @@ public interface IUnlockChestValidator Option GetRequiredKeyName(ChestKey requiredKey); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/UnlockDoorValidator.cs b/EOLib/Domain/Map/UnlockDoorValidator.cs index 2482093d8..5760ed2c3 100644 --- a/EOLib/Domain/Map/UnlockDoorValidator.cs +++ b/EOLib/Domain/Map/UnlockDoorValidator.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.IO.Repositories; using Optional; using Optional.Collections; -using System.Linq; namespace EOLib.Domain.Map { @@ -45,4 +45,4 @@ public interface IUnlockDoorValidator Option GetRequiredKey(Warp warp); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/Warp.cs b/EOLib/Domain/Map/Warp.cs index c322943f9..c2071b15d 100644 --- a/EOLib/Domain/Map/Warp.cs +++ b/EOLib/Domain/Map/Warp.cs @@ -21,4 +21,4 @@ public Warp(WarpMapEntity warpEntity) _warpEntity = warpEntity; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Map/WarpState.cs b/EOLib/Domain/Map/WarpState.cs index 870a6adeb..e6e5cbe24 100644 --- a/EOLib/Domain/Map/WarpState.cs +++ b/EOLib/Domain/Map/WarpState.cs @@ -6,4 +6,4 @@ public enum WarpState WarpStarted, WarpCompleting } -} +} \ No newline at end of file diff --git a/EOLib/Domain/NPC/NPCActionState.cs b/EOLib/Domain/NPC/NPCActionState.cs index 95fafa24c..1828320c1 100644 --- a/EOLib/Domain/NPC/NPCActionState.cs +++ b/EOLib/Domain/NPC/NPCActionState.cs @@ -6,4 +6,4 @@ public enum NPCActionState Walking, Attacking } -} +} \ No newline at end of file diff --git a/EOLib/Domain/NPC/NPCFrame.cs b/EOLib/Domain/NPC/NPCFrame.cs index 5ef86cdac..b66cbb918 100644 --- a/EOLib/Domain/NPC/NPCFrame.cs +++ b/EOLib/Domain/NPC/NPCFrame.cs @@ -13,4 +13,4 @@ public enum NPCFrame Attack2, //354, 356 //there may be an Attack3 frame, there are 2 extra graphics at this point } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IArenaNotifier.cs b/EOLib/Domain/Notifiers/IArenaNotifier.cs index 5ec443a4c..dae45b10c 100644 --- a/EOLib/Domain/Notifiers/IArenaNotifier.cs +++ b/EOLib/Domain/Notifiers/IArenaNotifier.cs @@ -24,4 +24,4 @@ public void NotifyArenaKill(int killCount, string killer, string victim) { } public void NotifyArenaWin(string winner) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IChatEventNotifier.cs b/EOLib/Domain/Notifiers/IChatEventNotifier.cs index 64ad7149c..09290e28d 100644 --- a/EOLib/Domain/Notifiers/IChatEventNotifier.cs +++ b/EOLib/Domain/Notifiers/IChatEventNotifier.cs @@ -35,4 +35,4 @@ public void NotifyServerMessage(string serverMessage) { } public void NotifyServerPing(int timeInMS) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IChestEventNotifier.cs b/EOLib/Domain/Notifiers/IChestEventNotifier.cs index 462ebe9f2..b68b0b383 100644 --- a/EOLib/Domain/Notifiers/IChestEventNotifier.cs +++ b/EOLib/Domain/Notifiers/IChestEventNotifier.cs @@ -15,4 +15,4 @@ public void NotifyChestLocked(ChestKey key) { } public void NotifyChestBroken() { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IEffectNotifier.cs b/EOLib/Domain/Notifiers/IEffectNotifier.cs index 5c359a076..1ddbf1c0f 100644 --- a/EOLib/Domain/Notifiers/IEffectNotifier.cs +++ b/EOLib/Domain/Notifiers/IEffectNotifier.cs @@ -30,4 +30,4 @@ public void NotifyMapEffect(IO.Map.MapEffect effect, int strength = 0) { } public void NotifyEffectAtLocation(MapCoordinate location, int effectId) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IEmoteNotifier.cs b/EOLib/Domain/Notifiers/IEmoteNotifier.cs index 633150fff..3a7aa8095 100644 --- a/EOLib/Domain/Notifiers/IEmoteNotifier.cs +++ b/EOLib/Domain/Notifiers/IEmoteNotifier.cs @@ -17,4 +17,4 @@ public void NotifyEmote(int playerId, Emote emote) { } public void MakeMainPlayerDrunk() { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/ILockerEventNotifier.cs b/EOLib/Domain/Notifiers/ILockerEventNotifier.cs index 01516f84e..1fcbc8381 100644 --- a/EOLib/Domain/Notifiers/ILockerEventNotifier.cs +++ b/EOLib/Domain/Notifiers/ILockerEventNotifier.cs @@ -12,4 +12,4 @@ public class NoOpLockerEventNotifier : ILockerEventNotifier { public void NotifyLockerFull(int maxItems) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IMainCharacterEventNotifier.cs b/EOLib/Domain/Notifiers/IMainCharacterEventNotifier.cs index b20867128..498d3b1e7 100644 --- a/EOLib/Domain/Notifiers/IMainCharacterEventNotifier.cs +++ b/EOLib/Domain/Notifiers/IMainCharacterEventNotifier.cs @@ -29,4 +29,4 @@ public void DropItem(int id, int amountDropped) { } public void JunkItem(int id, int amountTaken) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IMapChangedNotifier.cs b/EOLib/Domain/Notifiers/IMapChangedNotifier.cs index 4ee0256fe..1d866780d 100644 --- a/EOLib/Domain/Notifiers/IMapChangedNotifier.cs +++ b/EOLib/Domain/Notifiers/IMapChangedNotifier.cs @@ -17,4 +17,4 @@ public void NotifyMapChanged(WarpEffect warpEffect, bool differentMapID) { } public void NotifyMapMutation() { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/INPCActionNotifier.cs b/EOLib/Domain/Notifiers/INPCActionNotifier.cs index 63df65f7c..0a4c1ae77 100644 --- a/EOLib/Domain/Notifiers/INPCActionNotifier.cs +++ b/EOLib/Domain/Notifiers/INPCActionNotifier.cs @@ -34,4 +34,4 @@ public void NPCTakeDamage(int npcIndex, int fromPlayerId, int damageToNpc, int n public void NPCDropItem(MapItem item) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IOtherCharacterAnimationNotifier.cs b/EOLib/Domain/Notifiers/IOtherCharacterAnimationNotifier.cs index 6e6c5e743..45c7419a8 100644 --- a/EOLib/Domain/Notifiers/IOtherCharacterAnimationNotifier.cs +++ b/EOLib/Domain/Notifiers/IOtherCharacterAnimationNotifier.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Map; using EOLib.Domain.Spells; -using System.Collections.Generic; namespace EOLib.Domain.Notifiers { @@ -39,4 +39,4 @@ public void NotifyTargetOtherSpellCast(int sourcePlayerID, int targetPlayerID, i public void NotifyGroupSpellCast(int playerId, int spellId, int spellHp, List spellTargets) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IOtherCharacterEventNotifier.cs b/EOLib/Domain/Notifiers/IOtherCharacterEventNotifier.cs index f42022e28..ea066dca6 100644 --- a/EOLib/Domain/Notifiers/IOtherCharacterEventNotifier.cs +++ b/EOLib/Domain/Notifiers/IOtherCharacterEventNotifier.cs @@ -24,4 +24,4 @@ public void OtherCharacterSaySomethingToGroup(int characterID, string message) { public void AdminAnnounce(string message) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IPartyEventNotifier.cs b/EOLib/Domain/Notifiers/IPartyEventNotifier.cs index a4567f4c5..afea7c603 100644 --- a/EOLib/Domain/Notifiers/IPartyEventNotifier.cs +++ b/EOLib/Domain/Notifiers/IPartyEventNotifier.cs @@ -25,4 +25,4 @@ public void NotifyPartyMemberAdd(string name) { } public void NotifyPartyMemberRemove(string name) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IServerRebootNotifier.cs b/EOLib/Domain/Notifiers/IServerRebootNotifier.cs new file mode 100644 index 000000000..950170bec --- /dev/null +++ b/EOLib/Domain/Notifiers/IServerRebootNotifier.cs @@ -0,0 +1,15 @@ +using AutomaticTypeMapper; + +namespace EOLib.Domain.Notifiers +{ + public interface IServerRebootNotifier + { + void NotifyServerReboot(); + } + + [AutoMappedType] + public class NoOpServerRebootNotifier : IServerRebootNotifier + { + public void NotifyServerReboot() { } + } +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/ISoundNotifier.cs b/EOLib/Domain/Notifiers/ISoundNotifier.cs index 6cc702636..f698f996e 100644 --- a/EOLib/Domain/Notifiers/ISoundNotifier.cs +++ b/EOLib/Domain/Notifiers/ISoundNotifier.cs @@ -16,4 +16,4 @@ public void NotifySoundEffect(int soundEffectId) { } public void NotifyMusic(int musicEffectId, bool isJukebox) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/ITradeEventNotifier.cs b/EOLib/Domain/Notifiers/ITradeEventNotifier.cs index e45cbd451..b3fc62cf2 100644 --- a/EOLib/Domain/Notifiers/ITradeEventNotifier.cs +++ b/EOLib/Domain/Notifiers/ITradeEventNotifier.cs @@ -20,4 +20,4 @@ public void NotifyTradeAccepted() { } public void NotifyTradeClose(bool cancel) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Notifiers/IUserInterfaceNotifier.cs b/EOLib/Domain/Notifiers/IUserInterfaceNotifier.cs index ae2533207..0003e1771 100644 --- a/EOLib/Domain/Notifiers/IUserInterfaceNotifier.cs +++ b/EOLib/Domain/Notifiers/IUserInterfaceNotifier.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Map; using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Collections.Generic; namespace EOLib.Domain.Notifiers { @@ -28,4 +28,4 @@ public void NotifyCharacterInfo(string name, int mapId, MapCoordinate mapCoords, public void NotifyCharacterInventory(string name, int usage, int gold, IReadOnlyList inventory, IReadOnlyList bank) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Online/OnlinePlayerActions.cs b/EOLib/Domain/Online/OnlinePlayerActions.cs index 5febe33fd..5231d91d3 100644 --- a/EOLib/Domain/Online/OnlinePlayerActions.cs +++ b/EOLib/Domain/Online/OnlinePlayerActions.cs @@ -25,4 +25,4 @@ public interface IOnlinePlayerActions { void RequestOnlinePlayers(bool fullList); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Online/OnlinePlayerInfo.cs b/EOLib/Domain/Online/OnlinePlayerInfo.cs index 01ff54eae..0cba01ca9 100644 --- a/EOLib/Domain/Online/OnlinePlayerInfo.cs +++ b/EOLib/Domain/Online/OnlinePlayerInfo.cs @@ -21,4 +21,4 @@ public OnlinePlayerInfo(string name) { } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Online/OnlinePlayerRepository.cs b/EOLib/Domain/Online/OnlinePlayerRepository.cs index 4f271f538..ed8515447 100644 --- a/EOLib/Domain/Online/OnlinePlayerRepository.cs +++ b/EOLib/Domain/Online/OnlinePlayerRepository.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EOLib.Domain.Online { public interface IOnlinePlayerRepository : IResettable { - HashSet OnlinePlayers { get; set; } + HashSet OnlinePlayers { get; set; } } public interface IOnlinePlayerProvider @@ -30,4 +30,4 @@ public void ResetState() OnlinePlayers = new HashSet(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Party/PartyActions.cs b/EOLib/Domain/Party/PartyActions.cs index 2f6f8b843..3dd08b0ea 100644 --- a/EOLib/Domain/Party/PartyActions.cs +++ b/EOLib/Domain/Party/PartyActions.cs @@ -60,4 +60,4 @@ public interface IPartyActions void RemovePartyMember(int targetCharacterId); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Party/PartyMember.cs b/EOLib/Domain/Party/PartyMember.cs index 8e0a4e7e2..e927f4e0f 100644 --- a/EOLib/Domain/Party/PartyMember.cs +++ b/EOLib/Domain/Party/PartyMember.cs @@ -15,4 +15,4 @@ public sealed partial class PartyMember public string Name { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Party/PartyRepository.cs b/EOLib/Domain/Party/PartyRepository.cs index 6f39e3702..bbe93a745 100644 --- a/EOLib/Domain/Party/PartyRepository.cs +++ b/EOLib/Domain/Party/PartyRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EOLib.Domain.Party { @@ -8,7 +8,7 @@ public interface IPartyDataRepository List Members { get; } } - public interface IPartyDataProvider + public interface IPartyDataProvider { IReadOnlyList Members { get; } } @@ -25,4 +25,4 @@ public PartyDataRepository() Members = new List(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Protocol/PingTimeRepository.cs b/EOLib/Domain/Protocol/PingTimeRepository.cs index f50454169..cf2b7e6df 100644 --- a/EOLib/Domain/Protocol/PingTimeRepository.cs +++ b/EOLib/Domain/Protocol/PingTimeRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Diagnostics; +using System.Diagnostics; +using AutomaticTypeMapper; namespace EOLib.Domain.Protocol { @@ -18,4 +18,4 @@ public PingTimeRepository() RequestTimer = new Stopwatch(); } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Report/ReportActions.cs b/EOLib/Domain/Report/ReportActions.cs index fb86fc0cd..8d1b0d5c1 100644 --- a/EOLib/Domain/Report/ReportActions.cs +++ b/EOLib/Domain/Report/ReportActions.cs @@ -37,4 +37,4 @@ public interface IReportActions void SpeakToAdmin(string message); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Spells/GroupSpellTarget.cs b/EOLib/Domain/Spells/GroupSpellTarget.cs index 49cefc465..dc721d6ba 100644 --- a/EOLib/Domain/Spells/GroupSpellTarget.cs +++ b/EOLib/Domain/Spells/GroupSpellTarget.cs @@ -11,4 +11,4 @@ public sealed partial class GroupSpellTarget public int TargetHp { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Spells/ISpellTargetable.cs b/EOLib/Domain/Spells/ISpellTargetable.cs index 1da2033de..a919b666a 100644 --- a/EOLib/Domain/Spells/ISpellTargetable.cs +++ b/EOLib/Domain/Spells/ISpellTargetable.cs @@ -8,4 +8,4 @@ public interface ISpellTargetable : IMapEntity int Index { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Spells/SpellCastValidationActions.cs b/EOLib/Domain/Spells/SpellCastValidationActions.cs index 2382a869e..653a7ce83 100644 --- a/EOLib/Domain/Spells/SpellCastValidationActions.cs +++ b/EOLib/Domain/Spells/SpellCastValidationActions.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Map; using EOLib.IO; using EOLib.IO.Repositories; -using System.Linq; namespace EOLib.Domain.Spells { @@ -88,4 +88,4 @@ public interface ISpellCastValidationActions bool ValidateBard(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Spells/SpellCastValidationResult.cs b/EOLib/Domain/Spells/SpellCastValidationResult.cs index 0be33f540..1a3e456ec 100644 --- a/EOLib/Domain/Spells/SpellCastValidationResult.cs +++ b/EOLib/Domain/Spells/SpellCastValidationResult.cs @@ -8,4 +8,4 @@ public enum SpellCastValidationResult ExhaustedNoSp, ExhaustedNoTp, } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Trade/TradeActions.cs b/EOLib/Domain/Trade/TradeActions.cs index 96e61aad8..d0f754f07 100644 --- a/EOLib/Domain/Trade/TradeActions.cs +++ b/EOLib/Domain/Trade/TradeActions.cs @@ -28,7 +28,7 @@ public void AcceptTradeRequest(int characterID) public void RemoveItemFromOffer(int itemID) { - var packet = new TradeRemoveClientPacket { ItemId = itemID }; + var packet = new TradeRemoveClientPacket { ItemId = itemID }; _packetSendService.SendPacket(packet); } @@ -68,4 +68,4 @@ public interface ITradeActions void CancelTrade(); } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Trade/TradeOffer.cs b/EOLib/Domain/Trade/TradeOffer.cs index 71e2d219d..ed5c46009 100644 --- a/EOLib/Domain/Trade/TradeOffer.cs +++ b/EOLib/Domain/Trade/TradeOffer.cs @@ -1,6 +1,6 @@ -using Amadevus.RecordGenerator; +using System.Collections.Generic; +using Amadevus.RecordGenerator; using EOLib.Domain.Character; -using System.Collections.Generic; namespace EOLib.Domain.Trade { @@ -15,4 +15,4 @@ public sealed partial class TradeOffer public IReadOnlyList Items { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Domain/Trade/TradeRepository.cs b/EOLib/Domain/Trade/TradeRepository.cs index 124ac54dc..bb10d06c6 100644 --- a/EOLib/Domain/Trade/TradeRepository.cs +++ b/EOLib/Domain/Trade/TradeRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; -using System.Collections.Generic; namespace EOLib.Domain.Trade { @@ -36,4 +36,4 @@ public void ResetState() PlayerTwoOffer = new TradeOffer(false, 0, string.Empty, new List()); } } -} +} \ No newline at end of file diff --git a/EOLib/EODirection.cs b/EOLib/EODirection.cs index a5de40f19..025f1ed1a 100644 --- a/EOLib/EODirection.cs +++ b/EOLib/EODirection.cs @@ -18,7 +18,7 @@ public static EODirection Opposite(this EODirection direction) switch (direction) { case EODirection.Invalid: return EODirection.Invalid; - default: return (EODirection) ((int) (direction + 2) % 4); + default: return (EODirection)((int)(direction + 2) % 4); } } } diff --git a/EOLib/Extensions/ChatIconExtensions.cs b/EOLib/Extensions/ChatIconExtensions.cs index 671c41ea3..e9ec826e8 100644 --- a/EOLib/Extensions/ChatIconExtensions.cs +++ b/EOLib/Extensions/ChatIconExtensions.cs @@ -10,4 +10,4 @@ public static class ChatIconExtensions return icon == ChatIcon.None ? Option.None<(int, int, int, int)>() : Option.Some((0, (int)icon * 13, 13, 13)); } } -} +} \ No newline at end of file diff --git a/EOLib/Extensions/OnlineIconExtensions.cs b/EOLib/Extensions/OnlineIconExtensions.cs index d498859a5..b5ce79a78 100644 --- a/EOLib/Extensions/OnlineIconExtensions.cs +++ b/EOLib/Extensions/OnlineIconExtensions.cs @@ -20,4 +20,4 @@ public static ChatIcon ToChatIcon(this CharacterIcon icon) }; } } -} +} \ No newline at end of file diff --git a/EOLib/FixedTimeStepRepository.cs b/EOLib/FixedTimeStepRepository.cs index 81cbe0ec5..1e8a3d47f 100644 --- a/EOLib/FixedTimeStepRepository.cs +++ b/EOLib/FixedTimeStepRepository.cs @@ -25,4 +25,4 @@ public interface IFixedTimeStepRepository void Tick(uint ticks = 1); } -} +} \ No newline at end of file diff --git a/EOLib/HDSerialNumberService.cs b/EOLib/HDSerialNumberService.cs index d077e8998..e0f93b26a 100644 --- a/EOLib/HDSerialNumberService.cs +++ b/EOLib/HDSerialNumberService.cs @@ -36,12 +36,12 @@ private static string GetHDSerialNumberWindows() return Win32.GetVolumeInformation( strDriveLetter, volumeLabel, - (uint) volumeLabel.Capacity, + (uint)volumeLabel.Capacity, ref serNum, ref maxCompLen, ref VolFlags, fileSystemName, - (uint) fileSystemName.Capacity) != 0 + (uint)fileSystemName.Capacity) != 0 ? Convert.ToString(serNum) : string.Empty; } @@ -119,7 +119,7 @@ private static string GetHDSerialNumberOSX() } // replace letters with their corresponding numbers - serialNumber = Regex.Replace(serialNumber, "[A-Z]", m => ((int) m.Value[0] - 55).ToString()); + serialNumber = Regex.Replace(serialNumber, "[A-Z]", m => ((int)m.Value[0] - 55).ToString()); // make the serial number shorted so eoserv can handle it while (ulong.TryParse(serialNumber, out var sn) && sn > uint.MaxValue) @@ -136,4 +136,4 @@ private static string GetHDSerialNumberOSX() } } } -} +} \ No newline at end of file diff --git a/EOLib/IHDSerialNumberService.cs b/EOLib/IHDSerialNumberService.cs index 70973c1ef..37dfe6981 100644 --- a/EOLib/IHDSerialNumberService.cs +++ b/EOLib/IHDSerialNumberService.cs @@ -4,4 +4,4 @@ public interface IHDSerialNumberService { string GetHDSerialNumber(); } -} +} \ No newline at end of file diff --git a/EOLib/IResettable.cs b/EOLib/IResettable.cs index c9ac50b22..9fa23f70a 100644 --- a/EOLib/IResettable.cs +++ b/EOLib/IResettable.cs @@ -4,4 +4,4 @@ public interface IResettable { void ResetState(); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/AsyncSocket.cs b/EOLib/Net/Communication/AsyncSocket.cs index a5fa860d0..26fde0eeb 100644 --- a/EOLib/Net/Communication/AsyncSocket.cs +++ b/EOLib/Net/Communication/AsyncSocket.cs @@ -138,19 +138,19 @@ private ConnectResult BlockingConnect(EndPoint endPoint) result = ConnectResult.Success; _connected = true; } - catch(ArgumentNullException) + catch (ArgumentNullException) { result = ConnectResult.InvalidEndpoint; } - catch(SocketException sex) + catch (SocketException sex) { result = ConnectResult.SocketError | (ConnectResult)sex.ErrorCode; } - catch(ObjectDisposedException) + catch (ObjectDisposedException) { result = ConnectResult.InvalidSocket; } - catch(InvalidOperationException) + catch (InvalidOperationException) { result = ConnectResult.InvalidSocket; } @@ -198,4 +198,4 @@ protected virtual void Dispose(bool disposing) #endregion } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/IAsyncSocket.cs b/EOLib/Net/Communication/IAsyncSocket.cs index b2df17594..73fbf9f2a 100644 --- a/EOLib/Net/Communication/IAsyncSocket.cs +++ b/EOLib/Net/Communication/IAsyncSocket.cs @@ -19,4 +19,4 @@ public interface IAsyncSocket : IDisposable Task DisconnectAsync(CancellationToken ct); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/INetworkClient.cs b/EOLib/Net/Communication/INetworkClient.cs index 0d857d723..6be7a80ef 100644 --- a/EOLib/Net/Communication/INetworkClient.cs +++ b/EOLib/Net/Communication/INetworkClient.cs @@ -1,7 +1,7 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System; +using System; using System.Threading; using System.Threading.Tasks; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Communication { @@ -22,7 +22,7 @@ public interface INetworkClient : IDisposable int Send(IPacket packet); Task SendAsync(IPacket packet, int timeout = 1500); - + Task SendRawPacketAsync(IPacket packet, int timeout = 1500); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/INetworkClientDisposer.cs b/EOLib/Net/Communication/INetworkClientDisposer.cs index beb54c36e..df6de1c22 100644 --- a/EOLib/Net/Communication/INetworkClientDisposer.cs +++ b/EOLib/Net/Communication/INetworkClientDisposer.cs @@ -5,4 +5,4 @@ namespace EOLib.Net.Communication public interface INetworkClientDisposer : IDisposable { } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/INetworkClientFactory.cs b/EOLib/Net/Communication/INetworkClientFactory.cs index ea701ed98..790817c49 100644 --- a/EOLib/Net/Communication/INetworkClientFactory.cs +++ b/EOLib/Net/Communication/INetworkClientFactory.cs @@ -4,4 +4,4 @@ public interface INetworkClientFactory { INetworkClient CreateNetworkClient(int timeout = Constants.ResponseTimeout); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/INetworkClientRepository.cs b/EOLib/Net/Communication/INetworkClientRepository.cs index 62a86ba2b..0220d59b9 100644 --- a/EOLib/Net/Communication/INetworkClientRepository.cs +++ b/EOLib/Net/Communication/INetworkClientRepository.cs @@ -16,11 +16,11 @@ public interface INetworkClientProvider public sealed class NetworkClientRepository : INetworkClientProvider, INetworkClientRepository, INetworkClientDisposer { public INetworkClient NetworkClient { get; set; } - + public void Dispose() { if (NetworkClient != null) NetworkClient.Dispose(); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/IPacketQueue.cs b/EOLib/Net/Communication/IPacketQueue.cs index 45fae7cdd..7887b2fc5 100644 --- a/EOLib/Net/Communication/IPacketQueue.cs +++ b/EOLib/Net/Communication/IPacketQueue.cs @@ -1,5 +1,5 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Collections.Generic; +using System.Collections.Generic; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Communication { @@ -15,4 +15,4 @@ public interface IPacketQueue IEnumerable DequeueAllPackets(); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/IPacketQueueRepository.cs b/EOLib/Net/Communication/IPacketQueueRepository.cs index 67a172f01..00ef92cdd 100644 --- a/EOLib/Net/Communication/IPacketQueueRepository.cs +++ b/EOLib/Net/Communication/IPacketQueueRepository.cs @@ -36,4 +36,4 @@ public PacketQueueRepository() HandleOutOfBandPacketQueue = new PacketQueue(); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/IPacketSendService.cs b/EOLib/Net/Communication/IPacketSendService.cs index cb8588548..da0589e13 100644 --- a/EOLib/Net/Communication/IPacketSendService.cs +++ b/EOLib/Net/Communication/IPacketSendService.cs @@ -1,5 +1,5 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Threading.Tasks; +using System.Threading.Tasks; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Communication { @@ -13,4 +13,4 @@ public interface IPacketSendService Task SendEncodedPacketAndWaitAsync(IPacket packet); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/ISafeNetworkOperation.cs b/EOLib/Net/Communication/ISafeNetworkOperation.cs index 5750287cd..4b11e7053 100644 --- a/EOLib/Net/Communication/ISafeNetworkOperation.cs +++ b/EOLib/Net/Communication/ISafeNetworkOperation.cs @@ -11,4 +11,4 @@ public interface ISafeNetworkOperation : ISafeNetworkOperation { T Result { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/IWaitablePacketQueue.cs b/EOLib/Net/Communication/IWaitablePacketQueue.cs index 1977b3a78..887169193 100644 --- a/EOLib/Net/Communication/IWaitablePacketQueue.cs +++ b/EOLib/Net/Communication/IWaitablePacketQueue.cs @@ -1,5 +1,5 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Threading.Tasks; +using System.Threading.Tasks; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Communication { diff --git a/EOLib/Net/Communication/NetworkClient.cs b/EOLib/Net/Communication/NetworkClient.cs index 2c1472bf0..c3a7c88bb 100644 --- a/EOLib/Net/Communication/NetworkClient.cs +++ b/EOLib/Net/Communication/NetworkClient.cs @@ -1,12 +1,12 @@ -using EOLib.IO.Services; -using EOLib.Net.Handlers; -using EOLib.Net.PacketProcessing; -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System; +using System; using System.Net; using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; +using EOLib.IO.Services; +using EOLib.Net.Handlers; +using EOLib.Net.PacketProcessing; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Communication { @@ -17,7 +17,7 @@ public class NetworkClient : INetworkClient private readonly INumberEncoderService _numberEncoderService; private readonly IAsyncSocket _socket; - + public bool Connected => _socket.Connected; public bool Started { get; private set; } @@ -141,4 +141,4 @@ protected virtual void Dispose(bool disposing) } } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/NetworkClientFactory.cs b/EOLib/Net/Communication/NetworkClientFactory.cs index cd8370d92..d252a7485 100644 --- a/EOLib/Net/Communication/NetworkClientFactory.cs +++ b/EOLib/Net/Communication/NetworkClientFactory.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.IO.Services; using EOLib.Logger; using EOLib.Net.Handlers; using EOLib.Net.PacketProcessing; -using System; namespace EOLib.Net.Communication { @@ -28,4 +28,4 @@ public INetworkClient CreateNetworkClient(int timeout = Constants.ResponseTimeou return new NetworkClient(_packetProcessActions, _packetHandlingActions, _numberEncoderService, TimeSpan.FromMilliseconds(timeout)); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/PacketQueue.cs b/EOLib/Net/Communication/PacketQueue.cs index 2c0e59ce6..48e2ed2c1 100644 --- a/EOLib/Net/Communication/PacketQueue.cs +++ b/EOLib/Net/Communication/PacketQueue.cs @@ -1,8 +1,8 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Communication { @@ -96,4 +96,4 @@ private void SetSignalResult(bool result) Task.Run(() => _enqueuedTaskCompletionSource.SetResult(result)); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/SafeAsyncNetworkOperation.cs b/EOLib/Net/Communication/SafeAsyncNetworkOperation.cs index 1cfcff5c6..8e9cb4bf0 100644 --- a/EOLib/Net/Communication/SafeAsyncNetworkOperation.cs +++ b/EOLib/Net/Communication/SafeAsyncNetworkOperation.cs @@ -25,4 +25,4 @@ protected override async Task DoOperation() await _networkOperation(); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/SafeBlockingNetworkOperation.cs b/EOLib/Net/Communication/SafeBlockingNetworkOperation.cs index 2e0799c68..0d284e735 100644 --- a/EOLib/Net/Communication/SafeBlockingNetworkOperation.cs +++ b/EOLib/Net/Communication/SafeBlockingNetworkOperation.cs @@ -55,4 +55,4 @@ protected override async Task DoOperation() Result = await _operation(); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/SafeNetworkOperationBase.cs b/EOLib/Net/Communication/SafeNetworkOperationBase.cs index b71f2ebc7..dafb5dd70 100644 --- a/EOLib/Net/Communication/SafeNetworkOperationBase.cs +++ b/EOLib/Net/Communication/SafeNetworkOperationBase.cs @@ -44,4 +44,4 @@ private void DisconnectAndStopReceiving() _networkConnectionActions.DisconnectFromServer(); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Communication/SafeNetworkOperationFactory.cs b/EOLib/Net/Communication/SafeNetworkOperationFactory.cs index 398877631..0f2c0af82 100644 --- a/EOLib/Net/Communication/SafeNetworkOperationFactory.cs +++ b/EOLib/Net/Communication/SafeNetworkOperationFactory.cs @@ -53,4 +53,4 @@ public ISafeNetworkOperation CreateSafeAsyncOperation(Func networkOperatio sendErrorAction); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Connection/BackgroundReceiveActions.cs b/EOLib/Net/Connection/BackgroundReceiveActions.cs index 40035fc1d..4fbf89f19 100644 --- a/EOLib/Net/Connection/BackgroundReceiveActions.cs +++ b/EOLib/Net/Connection/BackgroundReceiveActions.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; -using EOLib.Net.Communication; using System.Threading; using System.Threading.Tasks; +using AutomaticTypeMapper; +using EOLib.Net.Communication; namespace EOLib.Net.Connection { @@ -41,4 +41,4 @@ private Task RunLoop() return _clientProvider.NetworkClient.RunReceiveLoopAsync(_backgroundReceiveTaskRepository.BackgroundCancellationTokenSource.Token); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Connection/IBackgroundReceiveActions.cs b/EOLib/Net/Connection/IBackgroundReceiveActions.cs index 884aa0256..c26a6b3c9 100644 --- a/EOLib/Net/Connection/IBackgroundReceiveActions.cs +++ b/EOLib/Net/Connection/IBackgroundReceiveActions.cs @@ -6,4 +6,4 @@ public interface IBackgroundReceiveActions void CancelBackgroundReceiveLoop(); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Connection/IBackgroundReceiveTaskRepository.cs b/EOLib/Net/Connection/IBackgroundReceiveTaskRepository.cs index 698958101..cf25158f6 100644 --- a/EOLib/Net/Connection/IBackgroundReceiveTaskRepository.cs +++ b/EOLib/Net/Connection/IBackgroundReceiveTaskRepository.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; -using System.Threading; +using System.Threading; using System.Threading.Tasks; +using AutomaticTypeMapper; namespace EOLib.Net.Connection { @@ -18,4 +18,4 @@ public class BackgroundReceiveThreadRepository : IBackgroundReceiveTaskRepositor public CancellationTokenSource BackgroundCancellationTokenSource { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Connection/INetworkConnectionActions.cs b/EOLib/Net/Connection/INetworkConnectionActions.cs index eb0ffcbe6..c8f5e839a 100644 --- a/EOLib/Net/Connection/INetworkConnectionActions.cs +++ b/EOLib/Net/Connection/INetworkConnectionActions.cs @@ -14,4 +14,4 @@ public interface INetworkConnectionActions void CompleteHandshake(InitInitServerPacket initializationData); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Connection/NetworkConnectionActions.cs b/EOLib/Net/Connection/NetworkConnectionActions.cs index db84e5e71..df193d58b 100644 --- a/EOLib/Net/Connection/NetworkConnectionActions.cs +++ b/EOLib/Net/Connection/NetworkConnectionActions.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EOLib.Config; using EOLib.Domain.Login; using EOLib.Net.Communication; @@ -6,8 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Threading.Tasks; using Version = Moffat.EndlessOnline.SDK.Protocol.Net.Version; namespace EOLib.Net.Connection @@ -116,4 +116,4 @@ private static bool IsInvalidInitPacket(IPacket responsePacket, out InitInitServ private INetworkClient Client => _networkClientRepository.NetworkClient; } -} +} \ No newline at end of file diff --git a/EOLib/Net/EmptyPacketReceivedException.cs b/EOLib/Net/EmptyPacketReceivedException.cs index 2dffd25c4..5b28388d2 100644 --- a/EOLib/Net/EmptyPacketReceivedException.cs +++ b/EOLib/Net/EmptyPacketReceivedException.cs @@ -7,4 +7,4 @@ public class EmptyPacketReceivedException : Exception public EmptyPacketReceivedException() : base("No data was received from the server") { } } -} +} \ No newline at end of file diff --git a/EOLib/Net/FileTransfer/FileRequestActions.cs b/EOLib/Net/FileTransfer/FileRequestActions.cs index 9b127ef51..af8b85beb 100644 --- a/EOLib/Net/FileTransfer/FileRequestActions.cs +++ b/EOLib/Net/FileTransfer/FileRequestActions.cs @@ -1,3 +1,8 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -9,11 +14,6 @@ using EOLib.IO.Services; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Optional; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Threading.Tasks; namespace EOLib.Net.FileTransfer { diff --git a/EOLib/Net/FileTransfer/FileRequestService.cs b/EOLib/Net/FileTransfer/FileRequestService.cs index 017627042..f387d198f 100644 --- a/EOLib/Net/FileTransfer/FileRequestService.cs +++ b/EOLib/Net/FileTransfer/FileRequestService.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EOLib.IO.Map; using EOLib.IO.Pub; using EOLib.IO.Services.Serializers; @@ -6,9 +9,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; namespace EOLib.Net.FileTransfer { @@ -156,7 +156,7 @@ private static WelcomeAgreeClientPacket.IFileTypeData GetPubRequestData(FileType _ => throw new ArgumentOutOfRangeException(nameof(fileType)), }; } - + private static bool PubFileIdMatches(int requestedFileId, InitInitServerPacket.IReplyCodeData replyCodeData, out int responseFileId) { if (replyCodeData is InitInitServerPacket.ReplyCodeDataFileEif eif) diff --git a/EOLib/Net/FileTransfer/LoginFileChecksumRepository.cs b/EOLib/Net/FileTransfer/LoginFileChecksumRepository.cs index c98dd70a5..9a4962315 100644 --- a/EOLib/Net/FileTransfer/LoginFileChecksumRepository.cs +++ b/EOLib/Net/FileTransfer/LoginFileChecksumRepository.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EOLib.Net.FileTransfer { @@ -91,4 +91,4 @@ public class LoginFileChecksumRepository : ILoginFileChecksumRepository, ILoginF IReadOnlyList ILoginFileChecksumProvider.MapChecksum => MapChecksum; } -} +} \ No newline at end of file diff --git a/EOLib/Net/Handlers/DefaultAsyncPacketHandler.cs b/EOLib/Net/Handlers/DefaultAsyncPacketHandler.cs index 26f669da4..b6dc54aaf 100644 --- a/EOLib/Net/Handlers/DefaultAsyncPacketHandler.cs +++ b/EOLib/Net/Handlers/DefaultAsyncPacketHandler.cs @@ -1,10 +1,10 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Threading.Tasks; +using System.Threading.Tasks; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Handlers { public abstract class DefaultAsyncPacketHandler : IPacketHandler - where TPacket: IPacket + where TPacket : IPacket { public abstract PacketFamily Family { get; } @@ -29,4 +29,4 @@ public async Task HandlePacketAsync(TPacket packet) return await Task.Run(() => HandlePacket(packet)); } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Handlers/FamilyActionPair.cs b/EOLib/Net/Handlers/FamilyActionPair.cs index 3ea13eb9e..1666a8fa2 100644 --- a/EOLib/Net/Handlers/FamilyActionPair.cs +++ b/EOLib/Net/Handlers/FamilyActionPair.cs @@ -1,6 +1,6 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System; +using System; using System.Collections; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Handlers { @@ -20,7 +20,7 @@ bool IEqualityComparer.Equals(object obj1, object obj2) if (!(obj1 is FamilyActionPair) || !(obj2 is FamilyActionPair)) return false; - var fap1 = (FamilyActionPair) obj1; + var fap1 = (FamilyActionPair)obj1; var fap2 = (FamilyActionPair)obj2; return fap1.Family == fap2.Family && fap1.Action == fap2.Action; } diff --git a/EOLib/Net/Handlers/IPacketHandler.cs b/EOLib/Net/Handlers/IPacketHandler.cs index 9bffa66e4..eee19d9f7 100644 --- a/EOLib/Net/Handlers/IPacketHandler.cs +++ b/EOLib/Net/Handlers/IPacketHandler.cs @@ -1,5 +1,5 @@ -using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Threading.Tasks; +using System.Threading.Tasks; +using Moffat.EndlessOnline.SDK.Protocol.Net; namespace EOLib.Net.Handlers { @@ -23,4 +23,4 @@ public interface IPacketHandler : IPacketHandler //todo: method to determine whether a packet should be handled asynchronously or not Task HandlePacketAsync(TPacket packet); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Handlers/InGameOnlyPacketHandler.cs b/EOLib/Net/Handlers/InGameOnlyPacketHandler.cs index e691960c4..f6a6da670 100644 --- a/EOLib/Net/Handlers/InGameOnlyPacketHandler.cs +++ b/EOLib/Net/Handlers/InGameOnlyPacketHandler.cs @@ -15,4 +15,4 @@ protected InGameOnlyPacketHandler(IPlayerInfoProvider playerInfoProvider) _playerInfoProvider = playerInfoProvider; } } -} +} \ No newline at end of file diff --git a/EOLib/Net/Handlers/OutOfBandPacketHandler.cs b/EOLib/Net/Handlers/OutOfBandPacketHandler.cs index ce5abab16..c0bdbdfa3 100644 --- a/EOLib/Net/Handlers/OutOfBandPacketHandler.cs +++ b/EOLib/Net/Handlers/OutOfBandPacketHandler.cs @@ -60,4 +60,4 @@ public interface IOutOfBandPacketHandler { void PollForPacketsAndHandle(); } -} +} \ No newline at end of file diff --git a/EOLib/Net/Handlers/PacketHandlerFinder.cs b/EOLib/Net/Handlers/PacketHandlerFinder.cs index 9ade14f55..ddd5660d2 100644 --- a/EOLib/Net/Handlers/PacketHandlerFinder.cs +++ b/EOLib/Net/Handlers/PacketHandlerFinder.cs @@ -9,7 +9,7 @@ namespace EOLib.Net.Handlers public class PacketHandlerFinder : IPacketHandlerFinder { private readonly IReadOnlyDictionary _handlers; - + public PacketHandlerFinder(IPacketHandlerProvider packetHandlerProvider) { _handlers = packetHandlerProvider.PacketHandlers diff --git a/EOLib/Net/Handlers/PacketHandlerProvider.cs b/EOLib/Net/Handlers/PacketHandlerProvider.cs index 1f5111b0e..ff2962343 100644 --- a/EOLib/Net/Handlers/PacketHandlerProvider.cs +++ b/EOLib/Net/Handlers/PacketHandlerProvider.cs @@ -18,4 +18,4 @@ public interface IPacketHandlerProvider { IEnumerable PacketHandlers { get; } } -} +} \ No newline at end of file diff --git a/EOLib/Net/NoDataSentException.cs b/EOLib/Net/NoDataSentException.cs index 491dc0579..2b39b9332 100644 --- a/EOLib/Net/NoDataSentException.cs +++ b/EOLib/Net/NoDataSentException.cs @@ -7,4 +7,4 @@ public class NoDataSentException : Exception public NoDataSentException() : base("No data was sent to the server.") { } } -} +} \ No newline at end of file diff --git a/EOLib/Net/PacketProcessing/HashService.cs b/EOLib/Net/PacketProcessing/HashService.cs index 0c587a5cb..ddf3c1672 100644 --- a/EOLib/Net/PacketProcessing/HashService.cs +++ b/EOLib/Net/PacketProcessing/HashService.cs @@ -13,4 +13,4 @@ public interface IHashService { int StupidHash(int challenge); } -} +} \ No newline at end of file diff --git a/EOLib/Net/PacketProcessing/PacketEncoderRepository.cs b/EOLib/Net/PacketProcessing/PacketEncoderRepository.cs index fb2b500b0..5611138b6 100644 --- a/EOLib/Net/PacketProcessing/PacketEncoderRepository.cs +++ b/EOLib/Net/PacketProcessing/PacketEncoderRepository.cs @@ -14,4 +14,4 @@ public interface IPacketEncoderRepository int ReceiveMultiplier { get; set; } int SendMultiplier { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib/Net/PacketProcessing/PacketEncoderService.cs b/EOLib/Net/PacketProcessing/PacketEncoderService.cs index faf59c731..b31819dbd 100644 --- a/EOLib/Net/PacketProcessing/PacketEncoderService.cs +++ b/EOLib/Net/PacketProcessing/PacketEncoderService.cs @@ -77,4 +77,4 @@ public interface IPacketEncoderService Option Decode(byte[] original, int decodeMultiplier); } -} +} \ No newline at end of file diff --git a/EOLib/Net/PacketProcessing/PacketFactory.cs b/EOLib/Net/PacketProcessing/PacketFactory.cs index cbba7cee7..f5c3aee9e 100644 --- a/EOLib/Net/PacketProcessing/PacketFactory.cs +++ b/EOLib/Net/PacketProcessing/PacketFactory.cs @@ -1,12 +1,12 @@ -using EOLib.Net.Handlers; -using Moffat.EndlessOnline.SDK.Data; -using Moffat.EndlessOnline.SDK.Protocol.Net; -using Optional; -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; +using EOLib.Net.Handlers; +using Moffat.EndlessOnline.SDK.Data; +using Moffat.EndlessOnline.SDK.Protocol.Net; +using Optional; namespace EOLib.Net.PacketProcessing { @@ -68,4 +68,4 @@ public interface IPacketFactory { Option Create(byte[] array); } -} +} \ No newline at end of file diff --git a/EOLib/Net/PacketProcessing/PacketFactoryFactory.cs b/EOLib/Net/PacketProcessing/PacketFactoryFactory.cs index 0423485bd..1eda01c51 100644 --- a/EOLib/Net/PacketProcessing/PacketFactoryFactory.cs +++ b/EOLib/Net/PacketProcessing/PacketFactoryFactory.cs @@ -15,4 +15,4 @@ public interface IPacketFactoryFactory { IPacketFactory Create(string name_space); } -} +} \ No newline at end of file diff --git a/EOLib/Net/PacketProcessing/PacketProcessActions.cs b/EOLib/Net/PacketProcessing/PacketProcessActions.cs index e69f0f2b3..125eb03ca 100644 --- a/EOLib/Net/PacketProcessing/PacketProcessActions.cs +++ b/EOLib/Net/PacketProcessing/PacketProcessActions.cs @@ -1,10 +1,10 @@ using System; +using System.Net.Sockets; using AutomaticTypeMapper; -using Moffat.EndlessOnline.SDK.Data; using EOLib.Logger; +using Moffat.EndlessOnline.SDK.Data; using Moffat.EndlessOnline.SDK.Packet; using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Net.Sockets; using Optional; namespace EOLib.Net.PacketProcessing @@ -89,4 +89,4 @@ public interface IPacketProcessActions Option DecodeData(byte[] rawData); } -} +} \ No newline at end of file diff --git a/EOLib/Net/PacketProcessing/SequenceRepository.cs b/EOLib/Net/PacketProcessing/SequenceRepository.cs index 38fdcbbd6..b341b9d40 100644 --- a/EOLib/Net/PacketProcessing/SequenceRepository.cs +++ b/EOLib/Net/PacketProcessing/SequenceRepository.cs @@ -12,7 +12,7 @@ public class SequenceRepository : ISequenceRepository public void ResetState() { - Sequencer = new PacketSequencer(ZeroSequence.Instance); + Sequencer = new PacketSequencer(ZeroSequence.Instance); } } @@ -20,4 +20,4 @@ public interface ISequenceRepository : IResettable { PacketSequencer Sequencer { get; set; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/AdminInteract/AdminInteractAgree.cs b/EOLib/PacketHandlers/AdminInteract/AdminInteractAgree.cs index 770e00fcc..95b0fab53 100644 --- a/EOLib/PacketHandlers/AdminInteract/AdminInteractAgree.cs +++ b/EOLib/PacketHandlers/AdminInteract/AdminInteractAgree.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -57,4 +58,4 @@ private static Character Shown(Character input) return input.WithRenderProperties(renderProps); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/AdminInteract/AdminInteractList.cs b/EOLib/PacketHandlers/AdminInteract/AdminInteractList.cs index 6d61ef0a0..43cff598a 100644 --- a/EOLib/PacketHandlers/AdminInteract/AdminInteractList.cs +++ b/EOLib/PacketHandlers/AdminInteract/AdminInteractList.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.AdminInteract { @@ -41,4 +41,4 @@ public override bool HandlePacket(AdminInteractListServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/AdminInteract/AdminInteractRemove.cs b/EOLib/PacketHandlers/AdminInteract/AdminInteractRemove.cs index e02ffdb25..357942d3a 100644 --- a/EOLib/PacketHandlers/AdminInteract/AdminInteractRemove.cs +++ b/EOLib/PacketHandlers/AdminInteract/AdminInteractRemove.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -57,4 +58,4 @@ private static Character Hidden(Character input) return input.WithRenderProperties(renderProps); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/AdminInteract/AdminInteractReply.cs b/EOLib/PacketHandlers/AdminInteract/AdminInteractReply.cs index 11e688494..555a9f834 100644 --- a/EOLib/PacketHandlers/AdminInteract/AdminInteractReply.cs +++ b/EOLib/PacketHandlers/AdminInteract/AdminInteractReply.cs @@ -52,4 +52,4 @@ public override bool HandlePacket(AdminInteractReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/AdminInteract/AdminInteractTell.cs b/EOLib/PacketHandlers/AdminInteract/AdminInteractTell.cs index e4d05358c..31e5b30f8 100644 --- a/EOLib/PacketHandlers/AdminInteract/AdminInteractTell.cs +++ b/EOLib/PacketHandlers/AdminInteract/AdminInteractTell.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; -using Moffat.EndlessOnline.SDK.Protocol.Net; using EOLib.Net.Handlers; +using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.AdminInteract { @@ -14,7 +14,7 @@ namespace EOLib.PacketHandlers.AdminInteract /// Response to $info command. /// [AutoMappedType] - public class AdminInteractTell: InGameOnlyPacketHandler + public class AdminInteractTell : InGameOnlyPacketHandler { private readonly IEnumerable _userInterfaceNotifiers; @@ -75,4 +75,4 @@ public override bool HandlePacket(AdminInteractTellServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Arena/ArenaAcceptHandler.cs b/EOLib/PacketHandlers/Arena/ArenaAcceptHandler.cs index 61de6d005..12d46ce92 100644 --- a/EOLib/PacketHandlers/Arena/ArenaAcceptHandler.cs +++ b/EOLib/PacketHandlers/Arena/ArenaAcceptHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Arena { @@ -38,4 +38,4 @@ public override bool HandlePacket(ArenaAcceptServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Arena/ArenaDropHandler.cs b/EOLib/PacketHandlers/Arena/ArenaDropHandler.cs index e74f3bc27..034d4b1fe 100644 --- a/EOLib/PacketHandlers/Arena/ArenaDropHandler.cs +++ b/EOLib/PacketHandlers/Arena/ArenaDropHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Arena { @@ -29,7 +29,7 @@ public ArenaDropHandler(IPlayerInfoProvider playerInfoProvider, public override bool HandlePacket(ArenaDropServerPacket packet) { - foreach (var notifier in _arenaNotifiers) + foreach (var notifier in _arenaNotifiers) { notifier.NotifyArenaBusy(); } @@ -37,4 +37,4 @@ public override bool HandlePacket(ArenaDropServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Arena/ArenaSpecHandler.cs b/EOLib/PacketHandlers/Arena/ArenaSpecHandler.cs index 5985e609f..469321f57 100644 --- a/EOLib/PacketHandlers/Arena/ArenaSpecHandler.cs +++ b/EOLib/PacketHandlers/Arena/ArenaSpecHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Arena { @@ -54,7 +54,7 @@ public override bool HandlePacket(ArenaSpecServerPacket packet) _currentMapStateRepository.UnknownPlayerIDs.Add(packet.PlayerId); } - foreach (var notifier in _arenaNotifiers) + foreach (var notifier in _arenaNotifiers) { notifier.NotifyArenaKill(packet.KillsCount, packet.KillerName, packet.VictimName); } @@ -62,4 +62,4 @@ public override bool HandlePacket(ArenaSpecServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Arena/ArenaUseHandler.cs b/EOLib/PacketHandlers/Arena/ArenaUseHandler.cs index a55ddaae8..e823df3f2 100644 --- a/EOLib/PacketHandlers/Arena/ArenaUseHandler.cs +++ b/EOLib/PacketHandlers/Arena/ArenaUseHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Arena { @@ -29,7 +29,7 @@ public ArenaUseHandler(IPlayerInfoProvider playerInfoProvider, public override bool HandlePacket(ArenaUseServerPacket packet) { - foreach (var notifier in _arenaNotifiers) + foreach (var notifier in _arenaNotifiers) { notifier.NotifyArenaStart(packet.PlayersCount); } @@ -37,4 +37,4 @@ public override bool HandlePacket(ArenaUseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Attack/AttackPlayerHandler.cs b/EOLib/PacketHandlers/Attack/AttackPlayerHandler.cs index 55ab5bf7d..711a94150 100644 --- a/EOLib/PacketHandlers/Attack/AttackPlayerHandler.cs +++ b/EOLib/PacketHandlers/Attack/AttackPlayerHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Attack { @@ -52,4 +52,4 @@ public override bool HandlePacket(AttackPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Avatar/AvatarAdminHandler.cs b/EOLib/PacketHandlers/Avatar/AvatarAdminHandler.cs index aef2c89f9..a618754ef 100644 --- a/EOLib/PacketHandlers/Avatar/AvatarAdminHandler.cs +++ b/EOLib/PacketHandlers/Avatar/AvatarAdminHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Avatar { @@ -93,4 +93,4 @@ public override bool HandlePacket(AvatarAdminServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Avatar/AvatarAgreeHandler.cs b/EOLib/PacketHandlers/Avatar/AvatarAgreeHandler.cs index 29d8a95c3..097a894fc 100644 --- a/EOLib/PacketHandlers/Avatar/AvatarAgreeHandler.cs +++ b/EOLib/PacketHandlers/Avatar/AvatarAgreeHandler.cs @@ -30,4 +30,4 @@ public override bool HandlePacket(AvatarAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Avatar/AvatarChangeHandler.cs b/EOLib/PacketHandlers/Avatar/AvatarChangeHandler.cs index 899e3654b..2047e489e 100644 --- a/EOLib/PacketHandlers/Avatar/AvatarChangeHandler.cs +++ b/EOLib/PacketHandlers/Avatar/AvatarChangeHandler.cs @@ -80,4 +80,4 @@ protected void Handle(AvatarChange change) } } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Avatar/AvatarRemoveHandler.cs b/EOLib/PacketHandlers/Avatar/AvatarRemoveHandler.cs index f95d05552..61bbb5672 100644 --- a/EOLib/PacketHandlers/Avatar/AvatarRemoveHandler.cs +++ b/EOLib/PacketHandlers/Avatar/AvatarRemoveHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Avatar { @@ -55,4 +55,4 @@ public override bool HandlePacket(AvatarRemoveServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Avatar/AvatarReplyHandler.cs b/EOLib/PacketHandlers/Avatar/AvatarReplyHandler.cs index 49777336b..8593ee315 100644 --- a/EOLib/PacketHandlers/Avatar/AvatarReplyHandler.cs +++ b/EOLib/PacketHandlers/Avatar/AvatarReplyHandler.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; @@ -7,7 +8,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Avatar { @@ -21,7 +21,7 @@ public class AvatarReplyHandler : InGameOnlyPacketHandler PacketFamily.Avatar; - + public override PacketAction Action => PacketAction.Reply; public AvatarReplyHandler(IPlayerInfoProvider playerInfoProvider, @@ -87,4 +87,4 @@ public override bool HandlePacket(AvatarReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Bank/BankOpenHandler.cs b/EOLib/PacketHandlers/Bank/BankOpenHandler.cs index c31491d1b..d28096e1e 100644 --- a/EOLib/PacketHandlers/Bank/BankOpenHandler.cs +++ b/EOLib/PacketHandlers/Bank/BankOpenHandler.cs @@ -33,4 +33,4 @@ public override bool HandlePacket(BankOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Bank/BankReplyHandler.cs b/EOLib/PacketHandlers/Bank/BankReplyHandler.cs index bcb761267..e003e266b 100644 --- a/EOLib/PacketHandlers/Bank/BankReplyHandler.cs +++ b/EOLib/PacketHandlers/Bank/BankReplyHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Interact.Bank; using EOLib.Domain.Login; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Bank { @@ -47,4 +47,4 @@ public override bool HandlePacket(BankReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Barber/BarberAgreeHandler.cs b/EOLib/PacketHandlers/Barber/BarberAgreeHandler.cs index 1b4dd2f5c..5eef396aa 100644 --- a/EOLib/PacketHandlers/Barber/BarberAgreeHandler.cs +++ b/EOLib/PacketHandlers/Barber/BarberAgreeHandler.cs @@ -74,4 +74,4 @@ private CharacterRenderProperties UpdateRenderProperties(Character currentCharac return currentRenderProps; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Barber/BarberOpenHandler.cs b/EOLib/PacketHandlers/Barber/BarberOpenHandler.cs index 505e1438d..90b997e8f 100644 --- a/EOLib/PacketHandlers/Barber/BarberOpenHandler.cs +++ b/EOLib/PacketHandlers/Barber/BarberOpenHandler.cs @@ -1,3 +1,4 @@ +using System.Collections.Generic; using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Barber; @@ -5,7 +6,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Barber { @@ -41,4 +41,4 @@ public override bool HandlePacket(BarberOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Board/BoardOpenHandler.cs b/EOLib/PacketHandlers/Board/BoardOpenHandler.cs index 32bf5c0f3..0a1847ca7 100644 --- a/EOLib/PacketHandlers/Board/BoardOpenHandler.cs +++ b/EOLib/PacketHandlers/Board/BoardOpenHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact.Board; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Board { @@ -52,4 +52,4 @@ public override bool HandlePacket(BoardOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Board/BoardPlayerHandler.cs b/EOLib/PacketHandlers/Board/BoardPlayerHandler.cs index e1b771808..aaf6986ff 100644 --- a/EOLib/PacketHandlers/Board/BoardPlayerHandler.cs +++ b/EOLib/PacketHandlers/Board/BoardPlayerHandler.cs @@ -41,4 +41,4 @@ public override bool HandlePacket(BoardPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Book/BookReplyHandler.cs b/EOLib/PacketHandlers/Book/BookReplyHandler.cs index 86c69aade..93f249f49 100644 --- a/EOLib/PacketHandlers/Book/BookReplyHandler.cs +++ b/EOLib/PacketHandlers/Book/BookReplyHandler.cs @@ -51,4 +51,4 @@ public override bool HandlePacket(BookReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Cast/CastAcceptHandler.cs b/EOLib/PacketHandlers/Cast/CastAcceptHandler.cs index a0b6312d8..cb1a4c3f3 100644 --- a/EOLib/PacketHandlers/Cast/CastAcceptHandler.cs +++ b/EOLib/PacketHandlers/Cast/CastAcceptHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -7,7 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Cast { @@ -48,4 +48,4 @@ public override bool HandlePacket(CastAcceptServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Cast/CastReplyHandler.cs b/EOLib/PacketHandlers/Cast/CastReplyHandler.cs index cce7feaea..f906591fd 100644 --- a/EOLib/PacketHandlers/Cast/CastReplyHandler.cs +++ b/EOLib/PacketHandlers/Cast/CastReplyHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,7 +7,6 @@ using EOLib.PacketHandlers.NPC; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Cast { @@ -33,4 +33,4 @@ public override bool HandlePacket(CastReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Cast/CastSpecHandler.cs b/EOLib/PacketHandlers/Cast/CastSpecHandler.cs index c29e5b49a..bb92ad9c5 100644 --- a/EOLib/PacketHandlers/Cast/CastSpecHandler.cs +++ b/EOLib/PacketHandlers/Cast/CastSpecHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -7,7 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Cast { @@ -41,4 +41,4 @@ public override bool HandlePacket(CastSpecServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chair/ChairCloseHandler.cs b/EOLib/PacketHandlers/Chair/ChairCloseHandler.cs index a157f2543..7ff9e68d4 100644 --- a/EOLib/PacketHandlers/Chair/ChairCloseHandler.cs +++ b/EOLib/PacketHandlers/Chair/ChairCloseHandler.cs @@ -29,4 +29,4 @@ public override bool HandlePacket(ChairCloseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chair/ChairPlayerHandler.cs b/EOLib/PacketHandlers/Chair/ChairPlayerHandler.cs index 8434bc759..05706c0c2 100644 --- a/EOLib/PacketHandlers/Chair/ChairPlayerHandler.cs +++ b/EOLib/PacketHandlers/Chair/ChairPlayerHandler.cs @@ -27,4 +27,4 @@ public override bool HandlePacket(ChairPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chair/ChairRemoveHandler.cs b/EOLib/PacketHandlers/Chair/ChairRemoveHandler.cs index 3c1be6003..c0b4a5e91 100644 --- a/EOLib/PacketHandlers/Chair/ChairRemoveHandler.cs +++ b/EOLib/PacketHandlers/Chair/ChairRemoveHandler.cs @@ -29,4 +29,4 @@ public override bool HandlePacket(ChairRemoveServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chair/ChairReplyHandler.cs b/EOLib/PacketHandlers/Chair/ChairReplyHandler.cs index 4b53e494e..8cbed737b 100644 --- a/EOLib/PacketHandlers/Chair/ChairReplyHandler.cs +++ b/EOLib/PacketHandlers/Chair/ChairReplyHandler.cs @@ -29,4 +29,4 @@ public override bool HandlePacket(ChairReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chat/AdminMessageHandler.cs b/EOLib/PacketHandlers/Chat/AdminMessageHandler.cs index 5984ddab7..7385b4b2d 100644 --- a/EOLib/PacketHandlers/Chat/AdminMessageHandler.cs +++ b/EOLib/PacketHandlers/Chat/AdminMessageHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Chat; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { diff --git a/EOLib/PacketHandlers/Chat/AnnounceMessageHandler.cs b/EOLib/PacketHandlers/Chat/AnnounceMessageHandler.cs index d1da864f0..18fd2b84c 100644 --- a/EOLib/PacketHandlers/Chat/AnnounceMessageHandler.cs +++ b/EOLib/PacketHandlers/Chat/AnnounceMessageHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Chat; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { diff --git a/EOLib/PacketHandlers/Chat/GroupChatHandler.cs b/EOLib/PacketHandlers/Chat/GroupChatHandler.cs index aa14e4adb..9e4b4b2cc 100644 --- a/EOLib/PacketHandlers/Chat/GroupChatHandler.cs +++ b/EOLib/PacketHandlers/Chat/GroupChatHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Chat; using EOLib.Domain.Login; @@ -6,7 +7,6 @@ using EOLib.Domain.Notifiers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { @@ -52,4 +52,4 @@ protected override void DoTalk(TalkOpenServerPacket packet, Character character) notifier.NotifyChatReceived(ChatEventType.Group); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chat/MuteHandler.cs b/EOLib/PacketHandlers/Chat/MuteHandler.cs index 4ae521879..6c949c513 100644 --- a/EOLib/PacketHandlers/Chat/MuteHandler.cs +++ b/EOLib/PacketHandlers/Chat/MuteHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { @@ -35,4 +35,4 @@ public override bool HandlePacket(TalkSpecServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chat/PlayerChatByIDHandler.cs b/EOLib/PacketHandlers/Chat/PlayerChatByIDHandler.cs index 6921dbb51..f0330cd26 100644 --- a/EOLib/PacketHandlers/Chat/PlayerChatByIDHandler.cs +++ b/EOLib/PacketHandlers/Chat/PlayerChatByIDHandler.cs @@ -42,4 +42,4 @@ protected bool Handle(TPacket packet, int fromPlayerID) protected abstract void DoTalk(TPacket packet, Character character); } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chat/PlayerChatByNameBase.cs b/EOLib/PacketHandlers/Chat/PlayerChatByNameBase.cs index 3f81df9c4..51dcfc675 100644 --- a/EOLib/PacketHandlers/Chat/PlayerChatByNameBase.cs +++ b/EOLib/PacketHandlers/Chat/PlayerChatByNameBase.cs @@ -22,4 +22,4 @@ protected bool Handle(string name, string message) protected abstract void PostChat(string name, string message); } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chat/PrivateMessageHandler.cs b/EOLib/PacketHandlers/Chat/PrivateMessageHandler.cs index 934bc338a..6d5bd2ea3 100644 --- a/EOLib/PacketHandlers/Chat/PrivateMessageHandler.cs +++ b/EOLib/PacketHandlers/Chat/PrivateMessageHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Chat; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { diff --git a/EOLib/PacketHandlers/Chat/PrivateMessageTargetNotFound.cs b/EOLib/PacketHandlers/Chat/PrivateMessageTargetNotFound.cs index 0b7bc046b..2a8b3831b 100644 --- a/EOLib/PacketHandlers/Chat/PrivateMessageTargetNotFound.cs +++ b/EOLib/PacketHandlers/Chat/PrivateMessageTargetNotFound.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Chat; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { @@ -51,4 +51,4 @@ public override bool HandlePacket(TalkReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chat/PublicChatHandler.cs b/EOLib/PacketHandlers/Chat/PublicChatHandler.cs index 4a22f8746..3792ad4d8 100644 --- a/EOLib/PacketHandlers/Chat/PublicChatHandler.cs +++ b/EOLib/PacketHandlers/Chat/PublicChatHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Chat; using EOLib.Domain.Login; @@ -6,7 +7,6 @@ using EOLib.Domain.Notifiers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { diff --git a/EOLib/PacketHandlers/Chat/TalkServerHandler.cs b/EOLib/PacketHandlers/Chat/TalkServerHandler.cs index 82c871a8c..38ee4f830 100644 --- a/EOLib/PacketHandlers/Chat/TalkServerHandler.cs +++ b/EOLib/PacketHandlers/Chat/TalkServerHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chat { @@ -34,4 +34,4 @@ public override bool HandlePacket(TalkServerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chest/ChestAgreeHandler.cs b/EOLib/PacketHandlers/Chest/ChestAgreeHandler.cs index f6f1fdd72..85aae2e7f 100644 --- a/EOLib/PacketHandlers/Chest/ChestAgreeHandler.cs +++ b/EOLib/PacketHandlers/Chest/ChestAgreeHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Chest { @@ -31,4 +31,4 @@ public override bool HandlePacket(ChestAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chest/ChestCloseHandler.cs b/EOLib/PacketHandlers/Chest/ChestCloseHandler.cs index 75caeae5b..e11ec3afb 100644 --- a/EOLib/PacketHandlers/Chest/ChestCloseHandler.cs +++ b/EOLib/PacketHandlers/Chest/ChestCloseHandler.cs @@ -1,10 +1,10 @@ -using EOLib.Domain.Login; +using System.Collections.Generic; +using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.IO.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Chest { @@ -39,4 +39,4 @@ public override bool HandlePacket(ChestCloseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chest/ChestGetHandler.cs b/EOLib/PacketHandlers/Chest/ChestGetHandler.cs index 4cf31b4a9..3a3905b22 100644 --- a/EOLib/PacketHandlers/Chest/ChestGetHandler.cs +++ b/EOLib/PacketHandlers/Chest/ChestGetHandler.cs @@ -31,4 +31,4 @@ public override bool HandlePacket(ChestGetServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chest/ChestItemUpdateHandler.cs b/EOLib/PacketHandlers/Chest/ChestItemUpdateHandler.cs index a7fe35b4e..adb7b2b6e 100644 --- a/EOLib/PacketHandlers/Chest/ChestItemUpdateHandler.cs +++ b/EOLib/PacketHandlers/Chest/ChestItemUpdateHandler.cs @@ -1,11 +1,11 @@ -using EOLib.Domain.Character; +using System.Collections.Generic; +using System.Linq; +using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Optional.Collections; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Chest { @@ -65,4 +65,4 @@ protected void Handle(List items, ThreeItem item, Weight weight, bool _characterRepository.MainCharacter = _characterRepository.MainCharacter.WithStats(stats); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chest/ChestOpenHandler.cs b/EOLib/PacketHandlers/Chest/ChestOpenHandler.cs index 30841cdc6..c87ee40dd 100644 --- a/EOLib/PacketHandlers/Chest/ChestOpenHandler.cs +++ b/EOLib/PacketHandlers/Chest/ChestOpenHandler.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Chest { @@ -41,4 +41,4 @@ public override bool HandlePacket(ChestOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Chest/ChestReplyHandler.cs b/EOLib/PacketHandlers/Chest/ChestReplyHandler.cs index d3a564f8b..c6e78397d 100644 --- a/EOLib/PacketHandlers/Chest/ChestReplyHandler.cs +++ b/EOLib/PacketHandlers/Chest/ChestReplyHandler.cs @@ -36,4 +36,4 @@ public override bool HandlePacket(ChestReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Citizen/CitizenAcceptHandler.cs b/EOLib/PacketHandlers/Citizen/CitizenAcceptHandler.cs index a17f0da5c..7965079d4 100644 --- a/EOLib/PacketHandlers/Citizen/CitizenAcceptHandler.cs +++ b/EOLib/PacketHandlers/Citizen/CitizenAcceptHandler.cs @@ -48,4 +48,4 @@ public override bool HandlePacket(CitizenAcceptServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Citizen/CitizenOpenHandler.cs b/EOLib/PacketHandlers/Citizen/CitizenOpenHandler.cs index fb90f1a84..fb9513e9d 100644 --- a/EOLib/PacketHandlers/Citizen/CitizenOpenHandler.cs +++ b/EOLib/PacketHandlers/Citizen/CitizenOpenHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Citizen; using EOLib.Domain.Login; @@ -7,7 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Citizen { @@ -50,4 +50,4 @@ public override bool HandlePacket(CitizenOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Citizen/CitizenRemoveHandler.cs b/EOLib/PacketHandlers/Citizen/CitizenRemoveHandler.cs index 731769c67..c78c05431 100644 --- a/EOLib/PacketHandlers/Citizen/CitizenRemoveHandler.cs +++ b/EOLib/PacketHandlers/Citizen/CitizenRemoveHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Citizen; using EOLib.Domain.Login; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Citizen { @@ -43,4 +43,4 @@ public override bool HandlePacket(CitizenRemoveServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Citizen/CitizenReplyHandler.cs b/EOLib/PacketHandlers/Citizen/CitizenReplyHandler.cs index 7aac1825c..40e0484a3 100644 --- a/EOLib/PacketHandlers/Citizen/CitizenReplyHandler.cs +++ b/EOLib/PacketHandlers/Citizen/CitizenReplyHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Citizen { @@ -35,4 +35,4 @@ public override bool HandlePacket(CitizenReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Citizen/CitizenRequestHandler.cs b/EOLib/PacketHandlers/Citizen/CitizenRequestHandler.cs index 7fa284201..b2025db35 100644 --- a/EOLib/PacketHandlers/Citizen/CitizenRequestHandler.cs +++ b/EOLib/PacketHandlers/Citizen/CitizenRequestHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Citizen { @@ -35,4 +35,4 @@ public override bool HandlePacket(CitizenRequestServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Commands/FindCommandHandlerBase.cs b/EOLib/PacketHandlers/Commands/FindCommandHandlerBase.cs index 81c076fc2..978961345 100644 --- a/EOLib/PacketHandlers/Commands/FindCommandHandlerBase.cs +++ b/EOLib/PacketHandlers/Commands/FindCommandHandlerBase.cs @@ -30,4 +30,4 @@ protected void Handle(string playerName, EOResourceID resourceId) _chatRespository.AllChat[ChatTab.Local].Add(chatData); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Commands/FindCommandPlayerDifferentMapHandler.cs b/EOLib/PacketHandlers/Commands/FindCommandPlayerDifferentMapHandler.cs index c61604f80..df72b3462 100644 --- a/EOLib/PacketHandlers/Commands/FindCommandPlayerDifferentMapHandler.cs +++ b/EOLib/PacketHandlers/Commands/FindCommandPlayerDifferentMapHandler.cs @@ -25,4 +25,4 @@ public override bool HandlePacket(PlayersNet242ServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Commands/FindCommandPlayerNotFoundHandler.cs b/EOLib/PacketHandlers/Commands/FindCommandPlayerNotFoundHandler.cs index 4887ed977..256a9332c 100644 --- a/EOLib/PacketHandlers/Commands/FindCommandPlayerNotFoundHandler.cs +++ b/EOLib/PacketHandlers/Commands/FindCommandPlayerNotFoundHandler.cs @@ -25,4 +25,4 @@ public override bool HandlePacket(PlayersPingServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Commands/FindCommandPlayerSameMapHandler.cs b/EOLib/PacketHandlers/Commands/FindCommandPlayerSameMapHandler.cs index e941cffe1..3d59d340b 100644 --- a/EOLib/PacketHandlers/Commands/FindCommandPlayerSameMapHandler.cs +++ b/EOLib/PacketHandlers/Commands/FindCommandPlayerSameMapHandler.cs @@ -25,4 +25,4 @@ public override bool HandlePacket(PlayersPongServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Commands/PingResponseHandler.cs b/EOLib/PacketHandlers/Commands/PingResponseHandler.cs index 53310700b..9983454f9 100644 --- a/EOLib/PacketHandlers/Commands/PingResponseHandler.cs +++ b/EOLib/PacketHandlers/Commands/PingResponseHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Domain.Protocol; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Commands { @@ -42,4 +42,4 @@ public override bool HandlePacket(MessagePongServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Connection/ConnectionPlayerHandler.cs b/EOLib/PacketHandlers/Connection/ConnectionPlayerHandler.cs index 66ab01a83..93ae62f4c 100644 --- a/EOLib/PacketHandlers/Connection/ConnectionPlayerHandler.cs +++ b/EOLib/PacketHandlers/Connection/ConnectionPlayerHandler.cs @@ -48,4 +48,4 @@ public override bool HandlePacket(ConnectionPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Door/DoorOpenHandler.cs b/EOLib/PacketHandlers/Door/DoorOpenHandler.cs index 4a669810f..4b9bf1fa9 100644 --- a/EOLib/PacketHandlers/Door/DoorOpenHandler.cs +++ b/EOLib/PacketHandlers/Door/DoorOpenHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Linq; using DomainWarp = EOLib.Domain.Map.Warp; namespace EOLib.PacketHandlers.Door @@ -56,4 +56,4 @@ public override bool HandlePacket(DoorOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Effects/EffectAgreeHandler.cs b/EOLib/PacketHandlers/Effects/EffectAgreeHandler.cs index 352d45b98..c01d520fb 100644 --- a/EOLib/PacketHandlers/Effects/EffectAgreeHandler.cs +++ b/EOLib/PacketHandlers/Effects/EffectAgreeHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Effects { @@ -35,4 +35,4 @@ public override bool HandlePacket(EffectAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Effects/EffectPotionHandler.cs b/EOLib/PacketHandlers/Effects/EffectPotionHandler.cs index 567481f33..45f043d91 100644 --- a/EOLib/PacketHandlers/Effects/EffectPotionHandler.cs +++ b/EOLib/PacketHandlers/Effects/EffectPotionHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Effects { @@ -34,4 +34,4 @@ public override bool HandlePacket(EffectPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Effects/MapDebuffHandler.cs b/EOLib/PacketHandlers/Effects/MapDebuffHandler.cs index ee386077f..f5c627770 100644 --- a/EOLib/PacketHandlers/Effects/MapDebuffHandler.cs +++ b/EOLib/PacketHandlers/Effects/MapDebuffHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -7,8 +9,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Effects { @@ -87,4 +87,4 @@ public override bool HandlePacket(EffectSpecServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Effects/MapHpDrainHandler.cs b/EOLib/PacketHandlers/Effects/MapHpDrainHandler.cs index 2d6b5cc27..51954dc33 100644 --- a/EOLib/PacketHandlers/Effects/MapHpDrainHandler.cs +++ b/EOLib/PacketHandlers/Effects/MapHpDrainHandler.cs @@ -1,4 +1,6 @@  +using System; +using System.Collections.Generic; using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; @@ -7,8 +9,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Effects { @@ -60,4 +60,4 @@ public override bool HandlePacket(EffectTargetOtherServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Effects/MapQuakeHandler.cs b/EOLib/PacketHandlers/Effects/MapQuakeHandler.cs index ff3a19023..2c4666229 100644 --- a/EOLib/PacketHandlers/Effects/MapQuakeHandler.cs +++ b/EOLib/PacketHandlers/Effects/MapQuakeHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Effects { @@ -34,4 +34,4 @@ public override bool HandlePacket(EffectUseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Effects/PlayerSpikeDamageHandler.cs b/EOLib/PacketHandlers/Effects/PlayerSpikeDamageHandler.cs index f069fb0ac..ba65b04f4 100644 --- a/EOLib/PacketHandlers/Effects/PlayerSpikeDamageHandler.cs +++ b/EOLib/PacketHandlers/Effects/PlayerSpikeDamageHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Extensions; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Effects { @@ -49,4 +49,4 @@ public override bool HandlePacket(EffectAdminServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Effects/TimedSpikeEffectHandler.cs b/EOLib/PacketHandlers/Effects/TimedSpikeEffectHandler.cs index 65fb871b7..7acf0bbcf 100644 --- a/EOLib/PacketHandlers/Effects/TimedSpikeEffectHandler.cs +++ b/EOLib/PacketHandlers/Effects/TimedSpikeEffectHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Login; @@ -9,8 +11,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Effects { @@ -55,4 +55,4 @@ public override bool HandlePacket(EffectReportServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Emote/EmotePlayerHandler.cs b/EOLib/PacketHandlers/Emote/EmotePlayerHandler.cs index a5fdbe1cf..050892d87 100644 --- a/EOLib/PacketHandlers/Emote/EmotePlayerHandler.cs +++ b/EOLib/PacketHandlers/Emote/EmotePlayerHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Emote { @@ -35,4 +35,4 @@ public override bool HandlePacket(EmotePlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Face/FacePlayerHandler.cs b/EOLib/PacketHandlers/Face/FacePlayerHandler.cs index 53b7ee521..750c45f56 100644 --- a/EOLib/PacketHandlers/Face/FacePlayerHandler.cs +++ b/EOLib/PacketHandlers/Face/FacePlayerHandler.cs @@ -44,4 +44,4 @@ public override bool HandlePacket(FacePlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Guild/GuildOpenHandler.cs b/EOLib/PacketHandlers/Guild/GuildOpenHandler.cs index 84c0f23fd..9eb04128e 100644 --- a/EOLib/PacketHandlers/Guild/GuildOpenHandler.cs +++ b/EOLib/PacketHandlers/Guild/GuildOpenHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Guild; using EOLib.Domain.Login; @@ -7,7 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Guild { @@ -42,4 +42,4 @@ public override bool HandlePacket(GuildOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Guild/GuildReplyHandler.cs b/EOLib/PacketHandlers/Guild/GuildReplyHandler.cs index 91a1b5a03..56a700708 100644 --- a/EOLib/PacketHandlers/Guild/GuildReplyHandler.cs +++ b/EOLib/PacketHandlers/Guild/GuildReplyHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Guild { @@ -39,4 +39,4 @@ public override bool HandlePacket(GuildReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Guild/GuildRequestHandler.cs b/EOLib/PacketHandlers/Guild/GuildRequestHandler.cs index 906304b2f..ae36df019 100644 --- a/EOLib/PacketHandlers/Guild/GuildRequestHandler.cs +++ b/EOLib/PacketHandlers/Guild/GuildRequestHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Guild { @@ -27,7 +27,7 @@ public GuildRequestHandler(IPlayerInfoProvider playerInfoProvider, public override bool HandlePacket(GuildRequestServerPacket packet) { - foreach(var notifier in _guildNotifiers) + foreach (var notifier in _guildNotifiers) { notifier.NotifyGuildCreationRequest(packet.PlayerId, packet.GuildIdentity); } @@ -35,4 +35,4 @@ public override bool HandlePacket(GuildRequestServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Init/FriendIgnoreListHandler.cs b/EOLib/PacketHandlers/Init/FriendIgnoreListHandler.cs index a17805da7..961a3c668 100644 --- a/EOLib/PacketHandlers/Init/FriendIgnoreListHandler.cs +++ b/EOLib/PacketHandlers/Init/FriendIgnoreListHandler.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; -using EOLib.Domain.Online; -using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; +using System; using System.Collections.Generic; using System.Linq; +using AutomaticTypeMapper; +using EOLib.Domain.Online; +using Moffat.EndlessOnline.SDK.Protocol.Net.Server; namespace EOLib.PacketHandlers.Init { @@ -27,4 +27,4 @@ public override bool HandleData(InitInitServerPacket.ReplyCodeDataPlayersListFri return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Init/IInitPacketHandler.cs b/EOLib/PacketHandlers/Init/IInitPacketHandler.cs index 42a65f18f..cf3606904 100644 --- a/EOLib/PacketHandlers/Init/IInitPacketHandler.cs +++ b/EOLib/PacketHandlers/Init/IInitPacketHandler.cs @@ -25,4 +25,4 @@ public bool HandleData(InitInitServerPacket.IReplyCodeData data) public abstract bool HandleData(TData data); } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Init/InGameInitPacketHandler.cs b/EOLib/PacketHandlers/Init/InGameInitPacketHandler.cs index 23ee8469d..0b0003b01 100644 --- a/EOLib/PacketHandlers/Init/InGameInitPacketHandler.cs +++ b/EOLib/PacketHandlers/Init/InGameInitPacketHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Init { @@ -30,4 +30,4 @@ public override bool HandlePacket(InitInitServerPacket packet) .Match(x => x.HandleData(packet.ReplyCodeData), () => false); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Init/MapMutationHandler.cs b/EOLib/PacketHandlers/Init/MapMutationHandler.cs index e8832887c..24ccc7cd1 100644 --- a/EOLib/PacketHandlers/Init/MapMutationHandler.cs +++ b/EOLib/PacketHandlers/Init/MapMutationHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Notifiers; using EOLib.IO.Map; @@ -6,7 +7,6 @@ using EOLib.IO.Services; using EOLib.IO.Services.Serializers; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Init { @@ -50,4 +50,4 @@ public override bool HandleData(InitInitServerPacket.ReplyCodeDataMapMutation pa return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Init/MapWarpFileDownloadHandler.cs b/EOLib/PacketHandlers/Init/MapWarpFileDownloadHandler.cs index 0e6d71211..28a05b2d2 100644 --- a/EOLib/PacketHandlers/Init/MapWarpFileDownloadHandler.cs +++ b/EOLib/PacketHandlers/Init/MapWarpFileDownloadHandler.cs @@ -68,4 +68,4 @@ private void SendWarpAcceptToServer(int mapID, int sessionID) }); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Init/OnlinePlayerListHandler.cs b/EOLib/PacketHandlers/Init/OnlinePlayerListHandler.cs index 51567a18b..af9f0c14f 100644 --- a/EOLib/PacketHandlers/Init/OnlinePlayerListHandler.cs +++ b/EOLib/PacketHandlers/Init/OnlinePlayerListHandler.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Online; using EOLib.IO.Repositories; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Init { @@ -46,4 +46,4 @@ public override bool HandleData(InitInitServerPacket.ReplyCodeDataPlayersList pa return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemAcceptHandler.cs b/EOLib/PacketHandlers/Items/ItemAcceptHandler.cs index 92a0cb2d2..cecb68779 100644 --- a/EOLib/PacketHandlers/Items/ItemAcceptHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemAcceptHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Items { @@ -35,4 +35,4 @@ public override bool HandlePacket(ItemAcceptServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemAddHandler.cs b/EOLib/PacketHandlers/Items/ItemAddHandler.cs index 2ae3bf71e..11511c22d 100644 --- a/EOLib/PacketHandlers/Items/ItemAddHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemAddHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; namespace EOLib.PacketHandlers.Items { @@ -37,4 +37,4 @@ public override bool HandlePacket(ItemAddServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemAgreeHandler.cs b/EOLib/PacketHandlers/Items/ItemAgreeHandler.cs index 23589e30d..ab8dd5014 100644 --- a/EOLib/PacketHandlers/Items/ItemAgreeHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemAgreeHandler.cs @@ -29,4 +29,4 @@ public override bool HandlePacket(ItemAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemDropHandler.cs b/EOLib/PacketHandlers/Items/ItemDropHandler.cs index 649daea80..56003a44b 100644 --- a/EOLib/PacketHandlers/Items/ItemDropHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemDropHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -7,8 +9,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Items { @@ -61,4 +61,4 @@ public override bool HandlePacket(ItemDropServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemGetHandler.cs b/EOLib/PacketHandlers/Items/ItemGetHandler.cs index 25e987221..dc681e69d 100644 --- a/EOLib/PacketHandlers/Items/ItemGetHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemGetHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -7,7 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Items { @@ -65,4 +65,4 @@ public override bool HandlePacket(ItemGetServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemJunkHandler.cs b/EOLib/PacketHandlers/Items/ItemJunkHandler.cs index c2947e7d3..2df222f90 100644 --- a/EOLib/PacketHandlers/Items/ItemJunkHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemJunkHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Items { @@ -58,4 +58,4 @@ public override bool HandlePacket(ItemJunkServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemKickHandler.cs b/EOLib/PacketHandlers/Items/ItemKickHandler.cs index 6622d1ac8..aac48dc86 100644 --- a/EOLib/PacketHandlers/Items/ItemKickHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemKickHandler.cs @@ -27,4 +27,4 @@ public override bool HandlePacket(ItemKickServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemObtainHandler.cs b/EOLib/PacketHandlers/Items/ItemObtainHandler.cs index 2823250e5..ce2c85275 100644 --- a/EOLib/PacketHandlers/Items/ItemObtainHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemObtainHandler.cs @@ -27,4 +27,4 @@ public override bool HandlePacket(ItemObtainServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemRemoveHandler.cs b/EOLib/PacketHandlers/Items/ItemRemoveHandler.cs index a335d0c39..27c8b165f 100644 --- a/EOLib/PacketHandlers/Items/ItemRemoveHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemRemoveHandler.cs @@ -33,4 +33,4 @@ public override bool HandlePacket(ItemRemoveServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/ItemReplyHandler.cs b/EOLib/PacketHandlers/Items/ItemReplyHandler.cs index 2175f08c0..3407f1094 100644 --- a/EOLib/PacketHandlers/Items/ItemReplyHandler.cs +++ b/EOLib/PacketHandlers/Items/ItemReplyHandler.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -8,9 +11,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Moffat.EndlessOnline.SDK.Protocol.Pub; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Items { @@ -174,4 +174,4 @@ public override bool HandlePacket(ItemReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Items/QuestItemChangeHandler.cs b/EOLib/PacketHandlers/Items/QuestItemChangeHandler.cs index 129aa409a..d573db1db 100644 --- a/EOLib/PacketHandlers/Items/QuestItemChangeHandler.cs +++ b/EOLib/PacketHandlers/Items/QuestItemChangeHandler.cs @@ -1,9 +1,9 @@ -using EOLib.Domain.Character; +using System; +using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Optional.Collections; -using System; namespace EOLib.PacketHandlers.Items { @@ -45,4 +45,4 @@ protected void Handle(int id, int amount, int weight) _characterRepository.MainCharacter = _characterRepository.MainCharacter.WithStats(stats); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Jukebox/JukeboxAgreeHandler.cs b/EOLib/PacketHandlers/Jukebox/JukeboxAgreeHandler.cs index c2da3b1c9..0530d9d01 100644 --- a/EOLib/PacketHandlers/Jukebox/JukeboxAgreeHandler.cs +++ b/EOLib/PacketHandlers/Jukebox/JukeboxAgreeHandler.cs @@ -35,4 +35,4 @@ public override bool HandlePacket(JukeboxAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Jukebox/JukeboxMessageHandler.cs b/EOLib/PacketHandlers/Jukebox/JukeboxMessageHandler.cs index dcc101c58..bf3d0f7ec 100644 --- a/EOLib/PacketHandlers/Jukebox/JukeboxMessageHandler.cs +++ b/EOLib/PacketHandlers/Jukebox/JukeboxMessageHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Jukebox { @@ -49,4 +49,4 @@ public override bool HandlePacket(JukeboxMsgServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Jukebox/JukeboxOpenHandler.cs b/EOLib/PacketHandlers/Jukebox/JukeboxOpenHandler.cs index 70d270898..0a74fa467 100644 --- a/EOLib/PacketHandlers/Jukebox/JukeboxOpenHandler.cs +++ b/EOLib/PacketHandlers/Jukebox/JukeboxOpenHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact.Jukebox; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Jukebox { @@ -39,4 +39,4 @@ public override bool HandlePacket(JukeboxOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Jukebox/JukeboxPlayerHandler.cs b/EOLib/PacketHandlers/Jukebox/JukeboxPlayerHandler.cs index 6feb8f16f..3d80ea9a7 100644 --- a/EOLib/PacketHandlers/Jukebox/JukeboxPlayerHandler.cs +++ b/EOLib/PacketHandlers/Jukebox/JukeboxPlayerHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Jukebox { @@ -34,4 +34,4 @@ public override bool HandlePacket(JukeboxPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Jukebox/JukeboxReplyHandler.cs b/EOLib/PacketHandlers/Jukebox/JukeboxReplyHandler.cs index 76dbb3bd5..92f3efd76 100644 --- a/EOLib/PacketHandlers/Jukebox/JukeboxReplyHandler.cs +++ b/EOLib/PacketHandlers/Jukebox/JukeboxReplyHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Jukebox { @@ -31,4 +31,4 @@ public override bool HandlePacket(JukeboxReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Jukebox/JukeboxUseHandler.cs b/EOLib/PacketHandlers/Jukebox/JukeboxUseHandler.cs index ac6147b05..586f3a2cf 100644 --- a/EOLib/PacketHandlers/Jukebox/JukeboxUseHandler.cs +++ b/EOLib/PacketHandlers/Jukebox/JukeboxUseHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact.Jukebox; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Jukebox { @@ -42,4 +42,4 @@ public override bool HandlePacket(JukeboxUseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Locker/LockerBuyHandler.cs b/EOLib/PacketHandlers/Locker/LockerBuyHandler.cs index 441290903..9ec4f4acc 100644 --- a/EOLib/PacketHandlers/Locker/LockerBuyHandler.cs +++ b/EOLib/PacketHandlers/Locker/LockerBuyHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Interact.Bank; using EOLib.Domain.Login; @@ -7,7 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Locker { @@ -48,4 +48,4 @@ public override bool HandlePacket(LockerBuyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Locker/LockerGetHandler.cs b/EOLib/PacketHandlers/Locker/LockerGetHandler.cs index c6c0aa019..d1bca1aa3 100644 --- a/EOLib/PacketHandlers/Locker/LockerGetHandler.cs +++ b/EOLib/PacketHandlers/Locker/LockerGetHandler.cs @@ -30,4 +30,4 @@ public override bool HandlePacket(LockerGetServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Locker/LockerModifyHandler.cs b/EOLib/PacketHandlers/Locker/LockerModifyHandler.cs index 3e0c48fc8..f462d2582 100644 --- a/EOLib/PacketHandlers/Locker/LockerModifyHandler.cs +++ b/EOLib/PacketHandlers/Locker/LockerModifyHandler.cs @@ -1,10 +1,10 @@ -using EOLib.Domain.Character; +using System.Collections.Generic; +using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Locker { @@ -57,4 +57,4 @@ protected void Handle(int itemId, int amount, Weight weight, IReadOnlyList + /// Shows the server reboot message + /// + [AutoMappedType] + public class MessageCloseHandler : InGameOnlyPacketHandler + { + private readonly IEnumerable _serverRebootNotifiers; + + public override PacketFamily Family => PacketFamily.Message; + + public override PacketAction Action => PacketAction.Close; + + public MessageCloseHandler(IPlayerInfoProvider playerInfoProvider, + IEnumerable serverRebootNotifiers) + : base(playerInfoProvider) + { + _serverRebootNotifiers = serverRebootNotifiers; + } + + + public override bool HandlePacket(MessageCloseServerPacket packet) + { + foreach (var notifier in _serverRebootNotifiers) + notifier.NotifyServerReboot(); + + return true; + } + } +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Music/MusicPlayerHandler.cs b/EOLib/PacketHandlers/Music/MusicPlayerHandler.cs index f8bc48cdd..186f2cd8c 100644 --- a/EOLib/PacketHandlers/Music/MusicPlayerHandler.cs +++ b/EOLib/PacketHandlers/Music/MusicPlayerHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Music { @@ -34,4 +34,4 @@ public override bool HandlePacket(MusicPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCAcceptHandler.cs b/EOLib/PacketHandlers/NPC/NPCAcceptHandler.cs index dd2ac0343..93e2070ef 100644 --- a/EOLib/PacketHandlers/NPC/NPCAcceptHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCAcceptHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.NPC { @@ -46,4 +46,4 @@ public override bool HandlePacket(NpcAcceptServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCAgreeHandler.cs b/EOLib/PacketHandlers/NPC/NPCAgreeHandler.cs index 2b6429694..495e09d3d 100644 --- a/EOLib/PacketHandlers/NPC/NPCAgreeHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCAgreeHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Linq; namespace EOLib.PacketHandlers.NPC { @@ -44,4 +44,4 @@ public override bool HandlePacket(NpcAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCDeathHandler.cs b/EOLib/PacketHandlers/NPC/NPCDeathHandler.cs index 7ec8ae91e..a859d52a9 100644 --- a/EOLib/PacketHandlers/NPC/NPCDeathHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCDeathHandler.cs @@ -1,14 +1,14 @@ -using EOLib.Domain.Character; +using System; +using System.Collections.Generic; +using EOLib.Domain.Character; +using EOLib.Domain.Interact.Skill; using EOLib.Domain.Login; +using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using EOLib.Domain.Map; -using System.Collections.Generic; -using EOLib.Domain.Interact.Skill; namespace EOLib.PacketHandlers.NPC { @@ -164,4 +164,4 @@ protected void NotifySpellCast(int playerID) notifier.NotifyTargetNpcSpellCast(playerID); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCDialogHandler.cs b/EOLib/PacketHandlers/NPC/NPCDialogHandler.cs index 3770ca8d8..07f295467 100644 --- a/EOLib/PacketHandlers/NPC/NPCDialogHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCDialogHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Chat; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -8,7 +9,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.NPC { @@ -61,4 +61,4 @@ public override bool HandlePacket(NpcDialogServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCJunkHandler.cs b/EOLib/PacketHandlers/NPC/NPCJunkHandler.cs index c387ddeed..209787dc5 100644 --- a/EOLib/PacketHandlers/NPC/NPCJunkHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCJunkHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -7,8 +9,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.NPC { @@ -59,4 +59,4 @@ public override bool HandlePacket(NpcJunkServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCPlayerHandler.cs b/EOLib/PacketHandlers/NPC/NPCPlayerHandler.cs index b3172a5d9..aa2629d1c 100644 --- a/EOLib/PacketHandlers/NPC/NPCPlayerHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCPlayerHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Chat; using EOLib.Domain.Extensions; @@ -11,9 +13,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; - using DomainNPC = EOLib.Domain.NPC.NPC; namespace EOLib.PacketHandlers.NPC @@ -182,4 +181,4 @@ private static DomainNPC EnsureCorrectXAndY(DomainNPC npc, int destinationX, int .WithY(tempNPC.GetDestinationY()); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCReplyHandler.cs b/EOLib/PacketHandlers/NPC/NPCReplyHandler.cs index 402e113fc..546429d39 100644 --- a/EOLib/PacketHandlers/NPC/NPCReplyHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCReplyHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.NPC { @@ -32,4 +32,4 @@ public override bool HandlePacket(NpcReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCSpecHandler.cs b/EOLib/PacketHandlers/NPC/NPCSpecHandler.cs index ed8949044..69e52caa4 100644 --- a/EOLib/PacketHandlers/NPC/NPCSpecHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCSpecHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,8 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using System.Collections.Generic; namespace EOLib.PacketHandlers.NPC { @@ -29,7 +29,8 @@ public NPCSpecHandler(IPlayerInfoProvider playerInfoProvider, IEnumerable mainCharacterEventNotifiers, IEnumerable otherCharacterAnimationNotifiers) : base(playerInfoProvider, characterRepository, currentMapStateRepository, characterSessionRepository, - npcActionNotifiers, mainCharacterEventNotifiers, otherCharacterAnimationNotifiers) { } + npcActionNotifiers, mainCharacterEventNotifiers, otherCharacterAnimationNotifiers) + { } public override bool HandlePacket(NpcSpecServerPacket packet) { @@ -37,4 +38,4 @@ public override bool HandlePacket(NpcSpecServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/NPC/NPCTakeDamageHandler.cs b/EOLib/PacketHandlers/NPC/NPCTakeDamageHandler.cs index aadcbe2f7..82b781f33 100644 --- a/EOLib/PacketHandlers/NPC/NPCTakeDamageHandler.cs +++ b/EOLib/PacketHandlers/NPC/NPCTakeDamageHandler.cs @@ -1,4 +1,5 @@ -using EOLib.Domain.Character; +using System.Collections.Generic; +using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; namespace EOLib.PacketHandlers.NPC { @@ -89,4 +89,4 @@ protected void Handle(int fromPlayerId, EODirection fromDirection, }); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Paperdoll/ItemEquipHandler.cs b/EOLib/PacketHandlers/Paperdoll/ItemEquipHandler.cs index 63ae34d9d..13fbe0922 100644 --- a/EOLib/PacketHandlers/Paperdoll/ItemEquipHandler.cs +++ b/EOLib/PacketHandlers/Paperdoll/ItemEquipHandler.cs @@ -1,4 +1,5 @@ -using EOLib.Domain.Character; +using System.Linq; +using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.IO.Extensions; @@ -8,7 +9,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; using Optional.Collections; -using System.Linq; namespace EOLib.PacketHandlers.Paperdoll { @@ -105,4 +105,4 @@ protected bool HandlePaperdollPacket(AvatarChange change, int itemId, int amount return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Paperdoll/PaperdollAgreeHandler.cs b/EOLib/PacketHandlers/Paperdoll/PaperdollAgreeHandler.cs index 0378152a8..e37a1ffd9 100644 --- a/EOLib/PacketHandlers/Paperdoll/PaperdollAgreeHandler.cs +++ b/EOLib/PacketHandlers/Paperdoll/PaperdollAgreeHandler.cs @@ -33,4 +33,4 @@ public override bool HandlePacket(PaperdollAgreeServerPacket packet) return HandlePaperdollPacket(packet.Change, packet.ItemId, packet.RemainingAmount, packet.SubLoc, packet.Stats); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Paperdoll/PaperdollRemoveHandler.cs b/EOLib/PacketHandlers/Paperdoll/PaperdollRemoveHandler.cs index 30089fce3..92debdbcf 100644 --- a/EOLib/PacketHandlers/Paperdoll/PaperdollRemoveHandler.cs +++ b/EOLib/PacketHandlers/Paperdoll/PaperdollRemoveHandler.cs @@ -33,4 +33,4 @@ public override bool HandlePacket(PaperdollRemoveServerPacket packet) return HandlePaperdollPacket(packet.Change, packet.ItemId, 1, packet.SubLoc, packet.Stats); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Paperdoll/PaperdollReplyHandler.cs b/EOLib/PacketHandlers/Paperdoll/PaperdollReplyHandler.cs index c4d2650bf..b72fd9687 100644 --- a/EOLib/PacketHandlers/Paperdoll/PaperdollReplyHandler.cs +++ b/EOLib/PacketHandlers/Paperdoll/PaperdollReplyHandler.cs @@ -69,4 +69,4 @@ public override bool HandlePacket(PaperdollReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Party/PartyAddHandler.cs b/EOLib/PacketHandlers/Party/PartyAddHandler.cs index 06297ac57..816192e6e 100644 --- a/EOLib/PacketHandlers/Party/PartyAddHandler.cs +++ b/EOLib/PacketHandlers/Party/PartyAddHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Domain.Party; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Party { @@ -50,4 +50,4 @@ public override bool HandlePacket(PartyAddServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Party/PartyAgreeHandler.cs b/EOLib/PacketHandlers/Party/PartyAgreeHandler.cs index 8305bee4d..ed978a2aa 100644 --- a/EOLib/PacketHandlers/Party/PartyAgreeHandler.cs +++ b/EOLib/PacketHandlers/Party/PartyAgreeHandler.cs @@ -45,4 +45,4 @@ public override bool HandlePacket(PartyAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Party/PartyCloseHandler.cs b/EOLib/PacketHandlers/Party/PartyCloseHandler.cs index 52f284bbd..a15da9d3f 100644 --- a/EOLib/PacketHandlers/Party/PartyCloseHandler.cs +++ b/EOLib/PacketHandlers/Party/PartyCloseHandler.cs @@ -32,4 +32,4 @@ public override bool HandlePacket(PartyCloseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Party/PartyCreateHandler.cs b/EOLib/PacketHandlers/Party/PartyCreateHandler.cs index 67f1c3b23..8f49b6d3e 100644 --- a/EOLib/PacketHandlers/Party/PartyCreateHandler.cs +++ b/EOLib/PacketHandlers/Party/PartyCreateHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Domain.Party; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Party { @@ -53,4 +53,4 @@ public override bool HandlePacket(PartyCreateServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Party/PartyListHandler.cs b/EOLib/PacketHandlers/Party/PartyListHandler.cs index 392866582..2bafd4947 100644 --- a/EOLib/PacketHandlers/Party/PartyListHandler.cs +++ b/EOLib/PacketHandlers/Party/PartyListHandler.cs @@ -45,4 +45,4 @@ public override bool HandlePacket(PartyListServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Party/PartyRemoveHandler.cs b/EOLib/PacketHandlers/Party/PartyRemoveHandler.cs index 5ae585670..38558d95c 100644 --- a/EOLib/PacketHandlers/Party/PartyRemoveHandler.cs +++ b/EOLib/PacketHandlers/Party/PartyRemoveHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Domain.Party; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Party { @@ -45,4 +45,4 @@ public override bool HandlePacket(PartyRemoveServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Party/PartyRequestHandler.cs b/EOLib/PacketHandlers/Party/PartyRequestHandler.cs index 539cb3787..5600c380b 100644 --- a/EOLib/PacketHandlers/Party/PartyRequestHandler.cs +++ b/EOLib/PacketHandlers/Party/PartyRequestHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Party { @@ -35,4 +35,4 @@ public override bool HandlePacket(PartyRequestServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Players/PlayersAgreeHandler.cs b/EOLib/PacketHandlers/Players/PlayersAgreeHandler.cs index 8e88df0e6..8a773bd8d 100644 --- a/EOLib/PacketHandlers/Players/PlayersAgreeHandler.cs +++ b/EOLib/PacketHandlers/Players/PlayersAgreeHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Login; @@ -7,8 +9,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Players { @@ -92,4 +92,4 @@ public override bool HandlePacket(PlayersAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Priest/PriestOpenHandler.cs b/EOLib/PacketHandlers/Priest/PriestOpenHandler.cs index a787b8e93..563aed1b2 100644 --- a/EOLib/PacketHandlers/Priest/PriestOpenHandler.cs +++ b/EOLib/PacketHandlers/Priest/PriestOpenHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Priest; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Priest { @@ -38,4 +38,4 @@ public override bool HandlePacket(PriestOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Priest/PriestReplyHandler.cs b/EOLib/PacketHandlers/Priest/PriestReplyHandler.cs index c1241ab36..e7aa930a9 100644 --- a/EOLib/PacketHandlers/Priest/PriestReplyHandler.cs +++ b/EOLib/PacketHandlers/Priest/PriestReplyHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Priest { @@ -32,4 +32,4 @@ public override bool HandlePacket(PriestReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Priest/PriestRequestHandler.cs b/EOLib/PacketHandlers/Priest/PriestRequestHandler.cs index 4db7646a8..599babdce 100644 --- a/EOLib/PacketHandlers/Priest/PriestRequestHandler.cs +++ b/EOLib/PacketHandlers/Priest/PriestRequestHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Priest; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Priest { @@ -38,4 +38,4 @@ public override bool HandlePacket(PriestRequestServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Quest/QuestDialogHandler.cs b/EOLib/PacketHandlers/Quest/QuestDialogHandler.cs index c4f1c368c..4d47626f8 100644 --- a/EOLib/PacketHandlers/Quest/QuestDialogHandler.cs +++ b/EOLib/PacketHandlers/Quest/QuestDialogHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Quest; using EOLib.Domain.Login; @@ -6,8 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Quest { @@ -66,4 +66,4 @@ public override bool HandlePacket(QuestDialogServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Quest/QuestListHandler.cs b/EOLib/PacketHandlers/Quest/QuestListHandler.cs index 509492d59..47e038c6b 100644 --- a/EOLib/PacketHandlers/Quest/QuestListHandler.cs +++ b/EOLib/PacketHandlers/Quest/QuestListHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Interact.Quest; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Linq; namespace EOLib.PacketHandlers.Quest { @@ -32,13 +32,13 @@ public override bool HandlePacket(QuestListServerPacket packet) _questDataRepository.QuestProgress = ((QuestListServerPacket.PageDataProgress)packet.PageData) .QuestProgressEntries .Select(x => new QuestProgressData.Builder - { - Name = x.Name, - Description = x.Description, - Icon = x.Icon, - Progress = x.Progress, - Target = x.Target, - }.ToImmutable()) + { + Name = x.Name, + Description = x.Description, + Icon = x.Icon, + Progress = x.Progress, + Target = x.Target, + }.ToImmutable()) .ToList(); break; case QuestPage.History: @@ -49,4 +49,4 @@ public override bool HandlePacket(QuestListServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Quest/QuestStatusMessageHandler.cs b/EOLib/PacketHandlers/Quest/QuestStatusMessageHandler.cs index eaa05780b..fcacca2a2 100644 --- a/EOLib/PacketHandlers/Quest/QuestStatusMessageHandler.cs +++ b/EOLib/PacketHandlers/Quest/QuestStatusMessageHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Chat; using EOLib.Domain.Interact.Quest; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Quest { @@ -39,4 +39,4 @@ public override bool HandlePacket(MessageOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Recover/RecoverAgreeHandler.cs b/EOLib/PacketHandlers/Recover/RecoverAgreeHandler.cs index 3cb204f9b..bf2a91c70 100644 --- a/EOLib/PacketHandlers/Recover/RecoverAgreeHandler.cs +++ b/EOLib/PacketHandlers/Recover/RecoverAgreeHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,8 +8,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Recover { @@ -64,4 +64,4 @@ public override bool HandlePacket(RecoverAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Recover/RecoverListHandler.cs b/EOLib/PacketHandlers/Recover/RecoverListHandler.cs index 20c346c69..ad3ef341a 100644 --- a/EOLib/PacketHandlers/Recover/RecoverListHandler.cs +++ b/EOLib/PacketHandlers/Recover/RecoverListHandler.cs @@ -37,4 +37,4 @@ public override bool HandlePacket(RecoverListServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Recover/RecoverPlayerHandler.cs b/EOLib/PacketHandlers/Recover/RecoverPlayerHandler.cs index 7f9f7d380..fd0e14fa0 100644 --- a/EOLib/PacketHandlers/Recover/RecoverPlayerHandler.cs +++ b/EOLib/PacketHandlers/Recover/RecoverPlayerHandler.cs @@ -36,4 +36,4 @@ public override bool HandlePacket(RecoverPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Recover/RecoverReplyHandler.cs b/EOLib/PacketHandlers/Recover/RecoverReplyHandler.cs index ed6be1d5e..23a917d67 100644 --- a/EOLib/PacketHandlers/Recover/RecoverReplyHandler.cs +++ b/EOLib/PacketHandlers/Recover/RecoverReplyHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Recover { @@ -59,4 +59,4 @@ public override bool HandlePacket(RecoverReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Refresh/RefreshReplyHandler.cs b/EOLib/PacketHandlers/Refresh/RefreshReplyHandler.cs index 482a1018f..72bec5de9 100644 --- a/EOLib/PacketHandlers/Refresh/RefreshReplyHandler.cs +++ b/EOLib/PacketHandlers/Refresh/RefreshReplyHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,9 +8,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; - using DomainNPC = EOLib.Domain.NPC.NPC; namespace EOLib.PacketHandlers.Refresh @@ -53,7 +52,7 @@ public override bool HandlePacket(RefreshReplyServerPacket packet) .WithRenderProperties(updatedRenderProperties); var withoutMainCharacter = characters.Where(x => !MainCharacterIDMatches(x)); - _currentMapStateRepository.Characters = new MapEntityCollectionHashSet(c => c.ID, c => new MapCoordinate(c.X, c.Y), withoutMainCharacter); + _currentMapStateRepository.Characters = new MapEntityCollectionHashSet(c => c.ID, c => new MapCoordinate(c.X, c.Y), withoutMainCharacter); _currentMapStateRepository.NPCs = new MapEntityCollectionHashSet(n => n.Index, n => new MapCoordinate(n.X, n.Y), packet.Nearby.Npcs.Select(DomainNPC.FromNearby)); _currentMapStateRepository.MapItems = new MapEntityCollectionHashSet(item => item.UniqueID, item => new MapCoordinate(item.X, item.Y), packet.Nearby.Items.Select(MapItem.FromNearby)); @@ -73,4 +72,4 @@ private bool MainCharacterIDMatches(Character x) return x.ID == _characterRepository.MainCharacter.ID; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Shop/ShopCraftHandler.cs b/EOLib/PacketHandlers/Shop/ShopCraftHandler.cs index 1fe6b2b74..e4cfc4d42 100644 --- a/EOLib/PacketHandlers/Shop/ShopCraftHandler.cs +++ b/EOLib/PacketHandlers/Shop/ShopCraftHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Shop { @@ -77,4 +77,4 @@ public override bool HandlePacket(ShopCreateServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Shop/ShopOpenHandler.cs b/EOLib/PacketHandlers/Shop/ShopOpenHandler.cs index d44740a35..5d45ae575 100644 --- a/EOLib/PacketHandlers/Shop/ShopOpenHandler.cs +++ b/EOLib/PacketHandlers/Shop/ShopOpenHandler.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Shop; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Shop { @@ -52,4 +52,4 @@ public override bool HandlePacket(ShopOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Shop/ShopTradeHandler.cs b/EOLib/PacketHandlers/Shop/ShopTradeHandler.cs index 17ac815fd..b99c431bf 100644 --- a/EOLib/PacketHandlers/Shop/ShopTradeHandler.cs +++ b/EOLib/PacketHandlers/Shop/ShopTradeHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -7,7 +8,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Shop { @@ -116,4 +116,4 @@ public override bool HandlePacket(ShopSellServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Sit/PlayerSitHandlerBase.cs b/EOLib/PacketHandlers/Sit/PlayerSitHandlerBase.cs index 4a8347427..cca851d87 100644 --- a/EOLib/PacketHandlers/Sit/PlayerSitHandlerBase.cs +++ b/EOLib/PacketHandlers/Sit/PlayerSitHandlerBase.cs @@ -56,4 +56,4 @@ protected void Handle(int playerId, int x, int y, EODirection direction) } } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Sit/PlayerStandHandlerBase.cs b/EOLib/PacketHandlers/Sit/PlayerStandHandlerBase.cs index ca14b8a93..d961a4f5c 100644 --- a/EOLib/PacketHandlers/Sit/PlayerStandHandlerBase.cs +++ b/EOLib/PacketHandlers/Sit/PlayerStandHandlerBase.cs @@ -52,4 +52,4 @@ protected void Handle(int playerId, int x, int y) } } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Sit/SitCloseHandler.cs b/EOLib/PacketHandlers/Sit/SitCloseHandler.cs index 58b5643da..0ddc86913 100644 --- a/EOLib/PacketHandlers/Sit/SitCloseHandler.cs +++ b/EOLib/PacketHandlers/Sit/SitCloseHandler.cs @@ -26,4 +26,4 @@ public override bool HandlePacket(SitCloseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Sit/SitPlayerHandler.cs b/EOLib/PacketHandlers/Sit/SitPlayerHandler.cs index f4dbd5cda..27a823c39 100644 --- a/EOLib/PacketHandlers/Sit/SitPlayerHandler.cs +++ b/EOLib/PacketHandlers/Sit/SitPlayerHandler.cs @@ -26,4 +26,4 @@ public override bool HandlePacket(SitPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Sit/SitRemoveHandler.cs b/EOLib/PacketHandlers/Sit/SitRemoveHandler.cs index f9e652e45..934e9aa49 100644 --- a/EOLib/PacketHandlers/Sit/SitRemoveHandler.cs +++ b/EOLib/PacketHandlers/Sit/SitRemoveHandler.cs @@ -26,4 +26,4 @@ public override bool HandlePacket(SitRemoveServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Sit/SitReplyHandler.cs b/EOLib/PacketHandlers/Sit/SitReplyHandler.cs index d4e532bf2..e4569e998 100644 --- a/EOLib/PacketHandlers/Sit/SitReplyHandler.cs +++ b/EOLib/PacketHandlers/Sit/SitReplyHandler.cs @@ -28,4 +28,4 @@ public override bool HandlePacket(SitReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Spell/SpellRequestHandler.cs b/EOLib/PacketHandlers/Spell/SpellRequestHandler.cs index 7c102a36e..ea410ba8b 100644 --- a/EOLib/PacketHandlers/Spell/SpellRequestHandler.cs +++ b/EOLib/PacketHandlers/Spell/SpellRequestHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Spell { @@ -34,4 +34,4 @@ public override bool HandlePacket(SpellRequestServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Spell/SpellTargetGroupHandler.cs b/EOLib/PacketHandlers/Spell/SpellTargetGroupHandler.cs index 79525bea7..512657336 100644 --- a/EOLib/PacketHandlers/Spell/SpellTargetGroupHandler.cs +++ b/EOLib/PacketHandlers/Spell/SpellTargetGroupHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -8,8 +10,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional.Collections; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.Spell { @@ -48,11 +48,11 @@ public override bool HandlePacket(SpellTargetGroupServerPacket packet) var spellTargets = packet.Players .Select(x => new GroupSpellTarget.Builder - { - TargetId = x.PlayerId, - TargetHp = x.Hp, - PercentHealth = x.HpPercentage, - }.ToImmutable()) + { + TargetId = x.PlayerId, + TargetHp = x.Hp, + PercentHealth = x.HpPercentage, + }.ToImmutable()) .ToList(); // todo: eoserv potentially sends garbage 255 bytes in packet.Players @@ -80,4 +80,4 @@ public override bool HandlePacket(SpellTargetGroupServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Spell/SpellTargetOtherHandler.cs b/EOLib/PacketHandlers/Spell/SpellTargetOtherHandler.cs index eda20f4b9..4042ef67f 100644 --- a/EOLib/PacketHandlers/Spell/SpellTargetOtherHandler.cs +++ b/EOLib/PacketHandlers/Spell/SpellTargetOtherHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Map; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Spell { @@ -64,4 +64,4 @@ public override bool HandlePacket(SpellTargetOtherServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Spell/SpellTargetSelfHandler.cs b/EOLib/PacketHandlers/Spell/SpellTargetSelfHandler.cs index 060b71c65..13934fb8d 100644 --- a/EOLib/PacketHandlers/Spell/SpellTargetSelfHandler.cs +++ b/EOLib/PacketHandlers/Spell/SpellTargetSelfHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Spell { @@ -52,4 +52,4 @@ public override bool HandlePacket(SpellTargetSelfServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/StatSkill/StatskillAcceptHandler.cs b/EOLib/PacketHandlers/StatSkill/StatskillAcceptHandler.cs index de80c6c61..d2a9a3d4a 100644 --- a/EOLib/PacketHandlers/StatSkill/StatskillAcceptHandler.cs +++ b/EOLib/PacketHandlers/StatSkill/StatskillAcceptHandler.cs @@ -43,4 +43,4 @@ public override bool HandlePacket(StatSkillAcceptServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/StatSkill/StatskillJunkHandler.cs b/EOLib/PacketHandlers/StatSkill/StatskillJunkHandler.cs index 7108a2924..c4d4fb306 100644 --- a/EOLib/PacketHandlers/StatSkill/StatskillJunkHandler.cs +++ b/EOLib/PacketHandlers/StatSkill/StatskillJunkHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Interact; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.StatSkill { @@ -47,4 +47,4 @@ public override bool HandlePacket(StatSkillJunkServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/StatSkill/StatskillOpenHandler.cs b/EOLib/PacketHandlers/StatSkill/StatskillOpenHandler.cs index 52dcf4f6b..9a2404d46 100644 --- a/EOLib/PacketHandlers/StatSkill/StatskillOpenHandler.cs +++ b/EOLib/PacketHandlers/StatSkill/StatskillOpenHandler.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Skill; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.StatSkill { @@ -58,4 +58,4 @@ public override bool HandlePacket(StatSkillOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/StatSkill/StatskillPlayerHandler.cs b/EOLib/PacketHandlers/StatSkill/StatskillPlayerHandler.cs index 150fed9ef..8f79a0a98 100644 --- a/EOLib/PacketHandlers/StatSkill/StatskillPlayerHandler.cs +++ b/EOLib/PacketHandlers/StatSkill/StatskillPlayerHandler.cs @@ -36,4 +36,4 @@ public override bool HandlePacket(StatSkillPlayerServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/StatSkill/StatskillRemoveHandler.cs b/EOLib/PacketHandlers/StatSkill/StatskillRemoveHandler.cs index aeb7b1964..ecbd3488d 100644 --- a/EOLib/PacketHandlers/StatSkill/StatskillRemoveHandler.cs +++ b/EOLib/PacketHandlers/StatSkill/StatskillRemoveHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Interact; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.StatSkill { @@ -41,4 +41,4 @@ public override bool HandlePacket(StatSkillRemoveServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/StatSkill/StatskillReplyHandler.cs b/EOLib/PacketHandlers/StatSkill/StatskillReplyHandler.cs index d60fdb338..85fb1d258 100644 --- a/EOLib/PacketHandlers/StatSkill/StatskillReplyHandler.cs +++ b/EOLib/PacketHandlers/StatSkill/StatskillReplyHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Interact; using EOLib.Domain.Interact.Skill; using EOLib.Domain.Login; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.StatSkill { @@ -41,4 +41,4 @@ public override bool HandlePacket(StatSkillReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/StatSkill/StatskillTakeHandler.cs b/EOLib/PacketHandlers/StatSkill/StatskillTakeHandler.cs index 7c7aab8f6..c84d28d02 100644 --- a/EOLib/PacketHandlers/StatSkill/StatskillTakeHandler.cs +++ b/EOLib/PacketHandlers/StatSkill/StatskillTakeHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Interact; using EOLib.Domain.Login; @@ -6,8 +8,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; -using System.Linq; namespace EOLib.PacketHandlers.StatSkill { @@ -49,4 +49,4 @@ public override bool HandlePacket(StatSkillTakeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeAdminHandler.cs b/EOLib/PacketHandlers/Trade/TradeAdminHandler.cs index 90df7e008..809a84e0b 100644 --- a/EOLib/PacketHandlers/Trade/TradeAdminHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeAdminHandler.cs @@ -25,4 +25,4 @@ public override bool HandlePacket(TradeAdminServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeAgreeHandler.cs b/EOLib/PacketHandlers/Trade/TradeAgreeHandler.cs index 6ac83c4ca..60a67910f 100644 --- a/EOLib/PacketHandlers/Trade/TradeAgreeHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeAgreeHandler.cs @@ -37,4 +37,4 @@ public override bool HandlePacket(TradeAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeCloseHandler.cs b/EOLib/PacketHandlers/Trade/TradeCloseHandler.cs index e0824090a..04e378f1a 100644 --- a/EOLib/PacketHandlers/Trade/TradeCloseHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeCloseHandler.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Domain.Trade; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Trade { @@ -41,4 +41,4 @@ public override bool HandlePacket(TradeCloseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeOfferUpdateHandler.cs b/EOLib/PacketHandlers/Trade/TradeOfferUpdateHandler.cs index fb9d0495d..75a31fef2 100644 --- a/EOLib/PacketHandlers/Trade/TradeOfferUpdateHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeOfferUpdateHandler.cs @@ -1,11 +1,11 @@ -using EOLib.Domain.Character; +using System.Linq; +using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Trade; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Linq; namespace EOLib.PacketHandlers.Trade { @@ -48,4 +48,4 @@ protected void Handle(TradeItemData data) _tradeRepository.PlayerTwoOffer = _tradeRepository.PlayerTwoOffer.WithAgrees(false); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeOpenHandler.cs b/EOLib/PacketHandlers/Trade/TradeOpenHandler.cs index 798a2a230..3553725b9 100644 --- a/EOLib/PacketHandlers/Trade/TradeOpenHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeOpenHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -6,7 +7,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Trade { @@ -52,4 +52,4 @@ public override bool HandlePacket(TradeOpenServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeReplyHandler.cs b/EOLib/PacketHandlers/Trade/TradeReplyHandler.cs index 1f9ef1b94..d7154fc65 100644 --- a/EOLib/PacketHandlers/Trade/TradeReplyHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeReplyHandler.cs @@ -26,4 +26,4 @@ public override bool HandlePacket(TradeReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeRequestHandler.cs b/EOLib/PacketHandlers/Trade/TradeRequestHandler.cs index 363a4912d..dab86e4e7 100644 --- a/EOLib/PacketHandlers/Trade/TradeRequestHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeRequestHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Trade { @@ -35,4 +35,4 @@ public override bool HandlePacket(TradeRequestServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeSpecHandler.cs b/EOLib/PacketHandlers/Trade/TradeSpecHandler.cs index 7fb3fbb01..5b99d1c22 100644 --- a/EOLib/PacketHandlers/Trade/TradeSpecHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeSpecHandler.cs @@ -38,4 +38,4 @@ public override bool HandlePacket(TradeSpecServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Trade/TradeUseHandler.cs b/EOLib/PacketHandlers/Trade/TradeUseHandler.cs index f7212b673..a20ea5180 100644 --- a/EOLib/PacketHandlers/Trade/TradeUseHandler.cs +++ b/EOLib/PacketHandlers/Trade/TradeUseHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Login; using EOLib.Domain.Notifiers; @@ -8,7 +9,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; using Optional.Collections; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Trade { @@ -91,4 +91,4 @@ public override bool HandlePacket(TradeUseServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Walk/WalkPlayerHandler.cs b/EOLib/PacketHandlers/Walk/WalkPlayerHandler.cs index c8f4cc7cd..adfccc96c 100644 --- a/EOLib/PacketHandlers/Walk/WalkPlayerHandler.cs +++ b/EOLib/PacketHandlers/Walk/WalkPlayerHandler.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Login; @@ -7,7 +8,6 @@ using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Collections.Generic; namespace EOLib.PacketHandlers.Walk { @@ -70,4 +70,4 @@ private static CharacterRenderProperties EnsureCorrectXAndY(CharacterRenderPrope .WithMapY(tempRenderProperties.GetDestinationY()); } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Walk/WalkReplyHandler.cs b/EOLib/PacketHandlers/Walk/WalkReplyHandler.cs index e2d7e8db1..e5254841d 100644 --- a/EOLib/PacketHandlers/Walk/WalkReplyHandler.cs +++ b/EOLib/PacketHandlers/Walk/WalkReplyHandler.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.Net.Handlers; using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Linq; namespace EOLib.PacketHandlers.Walk { @@ -48,4 +48,4 @@ public override bool HandlePacket(WalkReplyServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Warp/WarpAgreeHandler.cs b/EOLib/PacketHandlers/Warp/WarpAgreeHandler.cs index b17d758b0..c756385ed 100644 --- a/EOLib/PacketHandlers/Warp/WarpAgreeHandler.cs +++ b/EOLib/PacketHandlers/Warp/WarpAgreeHandler.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Login; @@ -9,10 +12,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; - using DomainNPC = EOLib.Domain.NPC.NPC; namespace EOLib.PacketHandlers.Warp @@ -93,4 +92,4 @@ public override bool HandlePacket(WarpAgreeServerPacket packet) return true; } } -} +} \ No newline at end of file diff --git a/EOLib/PacketHandlers/Warp/WarpRequestHandler.cs b/EOLib/PacketHandlers/Warp/WarpRequestHandler.cs index 92d0c9657..318e162fb 100644 --- a/EOLib/PacketHandlers/Warp/WarpRequestHandler.cs +++ b/EOLib/PacketHandlers/Warp/WarpRequestHandler.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.IO; +using AutomaticTypeMapper; using EOLib.Domain.Login; using EOLib.Domain.Map; using EOLib.IO.Actions; @@ -9,8 +11,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.IO; namespace EOLib.PacketHandlers.Warp { @@ -99,4 +99,4 @@ private void SendWarpAcceptToServer(int mapID, int sessionID) }); } } -} +} \ No newline at end of file diff --git a/EOLib/Win32.cs b/EOLib/Win32.cs index 0b1dd7141..60cf2e1d3 100644 --- a/EOLib/Win32.cs +++ b/EOLib/Win32.cs @@ -16,4 +16,4 @@ internal static extern int GetVolumeInformation(string PathName, StringBuilder FileSystemNameBuffer, UInt32 FileSystemNameSize); } -} +} \ No newline at end of file diff --git a/EOLib/misc.cs b/EOLib/misc.cs index 8f975832d..6f242f2d1 100644 --- a/EOLib/misc.cs +++ b/EOLib/misc.cs @@ -64,4 +64,4 @@ Copyright Vult-R public const string VersionInfoFormat = "{0}.{1:000}.{2:000} - {3}:{4}"; } -} +} \ No newline at end of file diff --git a/EndlessClient/Audio/AudioActions.cs b/EndlessClient/Audio/AudioActions.cs index b67791c13..17ead27e8 100644 --- a/EndlessClient/Audio/AudioActions.cs +++ b/EndlessClient/Audio/AudioActions.cs @@ -73,4 +73,4 @@ public interface IAudioActions void ToggleSound(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Audio/MfxPlayer.cs b/EndlessClient/Audio/MfxPlayer.cs index c6ef520db..8cfe0c4d4 100644 --- a/EndlessClient/Audio/MfxPlayer.cs +++ b/EndlessClient/Audio/MfxPlayer.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System; +using System.IO; +using System.Linq; +using AutomaticTypeMapper; using Commons.Music.Midi; using EOLib; using EOLib.Config; using EOLib.IO.Map; -using System; -using System.IO; -using System.Linq; namespace EndlessClient.Audio { @@ -135,4 +135,4 @@ public interface IMfxPlayer : IDisposable void StopBackgroundMusic(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Audio/SfxPlayer.cs b/EndlessClient/Audio/SfxPlayer.cs index fb7fd0362..1b22031a9 100644 --- a/EndlessClient/Audio/SfxPlayer.cs +++ b/EndlessClient/Audio/SfxPlayer.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EndlessClient.Content; using EOLib.Config; using Microsoft.Xna.Framework.Audio; -using System; namespace EndlessClient.Audio { @@ -93,4 +93,4 @@ public interface ISfxPlayer : IDisposable void StopLoopingSfx(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Audio/SoundEffectID.cs b/EndlessClient/Audio/SoundEffectID.cs index c0275e276..366e175f5 100644 --- a/EndlessClient/Audio/SoundEffectID.cs +++ b/EndlessClient/Audio/SoundEffectID.cs @@ -100,4 +100,4 @@ public enum SoundEffectID FireBlastSpell = 80, MapAmbientNoiseLavaBubbles2, } -} +} \ No newline at end of file diff --git a/EndlessClient/Audio/WAVFileValidator.cs b/EndlessClient/Audio/WAVFileValidator.cs index caee40ade..23a3ad59a 100644 --- a/EndlessClient/Audio/WAVFileValidator.cs +++ b/EndlessClient/Audio/WAVFileValidator.cs @@ -30,4 +30,4 @@ public static Stream GetStreamWithCorrectLengthHeader(string filename) return new MemoryStream(wavBuffer); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Content/ContentProvider.cs b/EndlessClient/Content/ContentProvider.cs index 8f4827b6c..98999483c 100644 --- a/EndlessClient/Content/ContentProvider.cs +++ b/EndlessClient/Content/ContentProvider.cs @@ -1,13 +1,13 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EOLib; using Microsoft.Xna.Framework.Audio; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.BitmapFonts; -using System.Collections.Generic; -using System.IO; -using System.Linq; namespace EndlessClient.Content { @@ -164,4 +164,4 @@ private static IEnumerable GetSoundEffects(string filter) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/BackButtonControlSet.cs b/EndlessClient/ControlSets/BackButtonControlSet.cs index 640982d81..4c369ead1 100644 --- a/EndlessClient/ControlSets/BackButtonControlSet.cs +++ b/EndlessClient/ControlSets/BackButtonControlSet.cs @@ -65,4 +65,4 @@ protected virtual void DoBackButtonClick(object sender, EventArgs e) _mainButtonController.GoToInitialState(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/BaseControlSet.cs b/EndlessClient/ControlSets/BaseControlSet.cs index f8efc399e..a623779cd 100644 --- a/EndlessClient/ControlSets/BaseControlSet.cs +++ b/EndlessClient/ControlSets/BaseControlSet.cs @@ -124,4 +124,4 @@ public void Dispose() protected virtual void Dispose(bool disposing) { } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/ControlSetFactory.cs b/EndlessClient/ControlSets/ControlSetFactory.cs index 4e5bf2dfb..53b831449 100644 --- a/EndlessClient/ControlSets/ControlSetFactory.cs +++ b/EndlessClient/ControlSets/ControlSetFactory.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.Dialogs; @@ -11,7 +12,6 @@ using EOLib.Config; using EOLib.Domain.Login; using EOLib.Graphics; -using System; namespace EndlessClient.ControlSets { @@ -109,4 +109,4 @@ private IControlSet GetSetBasedOnState(GameStates newState) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/CreateAccountControlSet.cs b/EndlessClient/ControlSets/CreateAccountControlSet.cs index 8a1bf3fec..e463c6abc 100644 --- a/EndlessClient/ControlSets/CreateAccountControlSet.cs +++ b/EndlessClient/ControlSets/CreateAccountControlSet.cs @@ -1,4 +1,7 @@ -using EndlessClient.Content; +using System; +using System.Linq; +using System.Threading.Tasks; +using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.GameExecution; using EndlessClient.Input; @@ -8,9 +11,6 @@ using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; -using System.Linq; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.ControlSets @@ -211,4 +211,4 @@ private void DoCreateAccount(object sender, EventArgs e) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/EmptyControlSet.cs b/EndlessClient/ControlSets/EmptyControlSet.cs index 2318b7edb..36ae45450 100644 --- a/EndlessClient/ControlSets/EmptyControlSet.cs +++ b/EndlessClient/ControlSets/EmptyControlSet.cs @@ -36,4 +36,4 @@ public void Dispose() { } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/GameControlIdentifier.cs b/EndlessClient/ControlSets/GameControlIdentifier.cs index b4bcbf5c2..19f429449 100644 --- a/EndlessClient/ControlSets/GameControlIdentifier.cs +++ b/EndlessClient/ControlSets/GameControlIdentifier.cs @@ -38,4 +38,4 @@ public enum GameControlIdentifier Character2Panel, Character3Panel } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/IControlSet.cs b/EndlessClient/ControlSets/IControlSet.cs index 59e344c63..ea2c6c298 100644 --- a/EndlessClient/ControlSets/IControlSet.cs +++ b/EndlessClient/ControlSets/IControlSet.cs @@ -45,4 +45,4 @@ public interface IControlSet : IDisposable /// The matching control IGameComponent FindComponentByControlIdentifier(GameControlIdentifier control); } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/IControlSetFactory.cs b/EndlessClient/ControlSets/IControlSetFactory.cs index 8f4b5b1ee..7117fc67f 100644 --- a/EndlessClient/ControlSets/IControlSetFactory.cs +++ b/EndlessClient/ControlSets/IControlSetFactory.cs @@ -12,4 +12,4 @@ void InjectControllers(IMainButtonController mainButtonController, ILoginController loginController, ICharacterManagementController characterManagementController); } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/IControlSetRepository.cs b/EndlessClient/ControlSets/IControlSetRepository.cs index 2ac6fe6cc..efddacb41 100644 --- a/EndlessClient/ControlSets/IControlSetRepository.cs +++ b/EndlessClient/ControlSets/IControlSetRepository.cs @@ -23,4 +23,4 @@ public ControlSetRepository() CurrentControlSet = new EmptyControlSet(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/IHudControlProvider.cs b/EndlessClient/ControlSets/IHudControlProvider.cs index 5e84d7f6e..5afacd65c 100644 --- a/EndlessClient/ControlSets/IHudControlProvider.cs +++ b/EndlessClient/ControlSets/IHudControlProvider.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.GameExecution; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; namespace EndlessClient.ControlSets { @@ -33,7 +33,7 @@ public InGameControlSet ControlSet { get { - if(!IsInGame) + if (!IsInGame) throw new InvalidOperationException("Not currently in game, in game control set does not exist"); return (InGameControlSet)_controlSetProvider.CurrentControlSet; @@ -67,4 +67,4 @@ public T GetComponent(HudControlIdentifier identifier) where T : IGameCompone return ControlSet.GetHudComponent(identifier); } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/InGameControlSet.cs b/EndlessClient/ControlSets/InGameControlSet.cs index 7d0c33e3b..a31fd2fc8 100644 --- a/EndlessClient/ControlSets/InGameControlSet.cs +++ b/EndlessClient/ControlSets/InGameControlSet.cs @@ -1,4 +1,7 @@ -using EndlessClient.Controllers; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Controllers; using EndlessClient.Dialogs; using EndlessClient.Dialogs.Factories; using EndlessClient.GameExecution; @@ -6,9 +9,6 @@ using EndlessClient.Rendering; using EOLib.Localization; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.ControlSets @@ -70,4 +70,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/InitialControlSet.cs b/EndlessClient/ControlSets/InitialControlSet.cs index ce093267c..ef1290530 100644 --- a/EndlessClient/ControlSets/InitialControlSet.cs +++ b/EndlessClient/ControlSets/InitialControlSet.cs @@ -1,4 +1,6 @@ -using EndlessClient.Content; +using System; +using System.Threading.Tasks; +using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.GameExecution; using EOLib; @@ -6,8 +8,6 @@ using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.ControlSets @@ -172,4 +172,4 @@ protected void ExcludePersonPicture1() _allComponents.Remove(_personPicture); } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/IntermediateControlSet.cs b/EndlessClient/ControlSets/IntermediateControlSet.cs index e553e2780..40cdd9fd2 100644 --- a/EndlessClient/ControlSets/IntermediateControlSet.cs +++ b/EndlessClient/ControlSets/IntermediateControlSet.cs @@ -36,7 +36,7 @@ public override void InitializeResources(INativeGraphicsManager gfxManager, ICon protected override void InitializeControlsHelper(IControlSet currentControlSet) { - _btnCreate = GetControl(currentControlSet, + _btnCreate = GetControl(currentControlSet, GameState == GameStates.LoggedIn ? GameControlIdentifier.CreateCharacterButton : GameControlIdentifier.CreateAccountButton, GetCreateButton); _person2Picture = GetControl(currentControlSet, GameControlIdentifier.PersonDisplay2, GetPerson2Picture); diff --git a/EndlessClient/ControlSets/LoggedInControlSet.cs b/EndlessClient/ControlSets/LoggedInControlSet.cs index 1a6cd2dd4..86bfad51e 100644 --- a/EndlessClient/ControlSets/LoggedInControlSet.cs +++ b/EndlessClient/ControlSets/LoggedInControlSet.cs @@ -1,13 +1,13 @@ -using EndlessClient.Controllers; +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using EndlessClient.Controllers; using EndlessClient.GameExecution; using EndlessClient.Input; using EndlessClient.Rendering; using EndlessClient.UIControls; using EOLib.Domain.Login; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.ControlSets @@ -103,4 +103,4 @@ private void AsyncButtonAction(Func clickHandler) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/LoginPromptControlSet.cs b/EndlessClient/ControlSets/LoginPromptControlSet.cs index 643a067e9..6721730c2 100644 --- a/EndlessClient/ControlSets/LoginPromptControlSet.cs +++ b/EndlessClient/ControlSets/LoginPromptControlSet.cs @@ -1,4 +1,7 @@ -using EndlessClient.Content; +using System; +using System.Linq; +using System.Threading.Tasks; +using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.GameExecution; using EndlessClient.Input; @@ -8,9 +11,6 @@ using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; -using System.Linq; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.ControlSets @@ -163,4 +163,4 @@ private XNAButton GetLoginCancelButton() return button; } } -} +} \ No newline at end of file diff --git a/EndlessClient/ControlSets/ViewCreditsControlSet.cs b/EndlessClient/ControlSets/ViewCreditsControlSet.cs index ff814bce3..e6b37e55a 100644 --- a/EndlessClient/ControlSets/ViewCreditsControlSet.cs +++ b/EndlessClient/ControlSets/ViewCreditsControlSet.cs @@ -45,4 +45,4 @@ private XNALabel GetCreditsLabel() }; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/AccountController.cs b/EndlessClient/Controllers/AccountController.cs index 79394a599..6db21f0a3 100644 --- a/EndlessClient/Controllers/AccountController.cs +++ b/EndlessClient/Controllers/AccountController.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EndlessClient.Dialogs.Actions; using EndlessClient.GameExecution; using EOLib.Domain.Account; using EOLib.Net; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.Controllers diff --git a/EndlessClient/Controllers/ArrowKeyController.cs b/EndlessClient/Controllers/ArrowKeyController.cs index 29eff85c4..1c9e8fce4 100644 --- a/EndlessClient/Controllers/ArrowKeyController.cs +++ b/EndlessClient/Controllers/ArrowKeyController.cs @@ -147,4 +147,4 @@ public interface IArrowKeyController void KeysUp(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/BardController.cs b/EndlessClient/Controllers/BardController.cs index c7796dbfa..6cf4c2e8e 100644 --- a/EndlessClient/Controllers/BardController.cs +++ b/EndlessClient/Controllers/BardController.cs @@ -40,4 +40,4 @@ public interface IBardController { void PlayInstrumentNote(int noteIndex); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/CharacterManagementController.cs b/EndlessClient/Controllers/CharacterManagementController.cs index 90eb67e2a..cce7bdc6a 100644 --- a/EndlessClient/Controllers/CharacterManagementController.cs +++ b/EndlessClient/Controllers/CharacterManagementController.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Dialogs.Actions; using EndlessClient.GameExecution; @@ -9,7 +10,6 @@ using EOLib.Net.Connection; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.Controllers diff --git a/EndlessClient/Controllers/ChatController.cs b/EndlessClient/Controllers/ChatController.cs index 2e9b94b05..10b6a0204 100644 --- a/EndlessClient/Controllers/ChatController.cs +++ b/EndlessClient/Controllers/ChatController.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.HUD; @@ -9,7 +10,6 @@ using EOLib.Domain.Chat.Commands; using EOLib.Domain.Map; using EOLib.Localization; -using System; namespace EndlessClient.Controllers { @@ -109,4 +109,4 @@ public interface IChatController void ClearAndWarnIfJailAndGlobal(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/ControlKeyController.cs b/EndlessClient/Controllers/ControlKeyController.cs index 6c4e3878f..6b8c06ff8 100644 --- a/EndlessClient/Controllers/ControlKeyController.cs +++ b/EndlessClient/Controllers/ControlKeyController.cs @@ -94,4 +94,4 @@ public interface IControlKeyController { bool Attack(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/FunctionKeyController.cs b/EndlessClient/Controllers/FunctionKeyController.cs index 8a1f5d7fc..ffc5ed050 100644 --- a/EndlessClient/Controllers/FunctionKeyController.cs +++ b/EndlessClient/Controllers/FunctionKeyController.cs @@ -124,4 +124,4 @@ public interface IFunctionKeyController bool RefreshMapState(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/InventoryController.cs b/EndlessClient/Controllers/InventoryController.cs index 94a9b1730..fab2f4fe8 100644 --- a/EndlessClient/Controllers/InventoryController.cs +++ b/EndlessClient/Controllers/InventoryController.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.Dialogs; @@ -20,8 +22,6 @@ using EOLib.IO.Pub; using EOLib.IO.Repositories; using EOLib.Localization; -using System; -using System.Linq; using XNAControls; namespace EndlessClient.Controllers @@ -348,7 +348,7 @@ public void TradeItem(EIFRecord itemData, InventoryItem inventoryItem) EOResourceID.DIALOG_TRANSFER_OFFER); } } - + private void DoItemDrop(EIFRecord itemData, InventoryItem inventoryItem, Action dropAction, ItemTransferDialog.TransferType transferType = ItemTransferDialog.TransferType.DropItems, EOResourceID message = EOResourceID.DIALOG_TRANSFER_DROP) @@ -360,7 +360,7 @@ private void DoItemDrop(EIFRecord itemData, InventoryItem inventoryItem, Action< transferType, inventoryItem.Amount, message); - + transferDialog.DialogClosing += (sender, e) => { if (e.Result == XNADialogResult.OK) diff --git a/EndlessClient/Controllers/LoginController.cs b/EndlessClient/Controllers/LoginController.cs index d46fcc03f..00a9f75e3 100644 --- a/EndlessClient/Controllers/LoginController.cs +++ b/EndlessClient/Controllers/LoginController.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.IO; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EndlessClient.Dialogs; using EndlessClient.Dialogs.Actions; using EndlessClient.Dialogs.Factories; @@ -21,9 +24,6 @@ using EOLib.Net.FileTransfer; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.IO; -using System.Threading.Tasks; namespace EndlessClient.Controllers { @@ -286,7 +286,7 @@ private async Task SafeGetFile(Func operation) private void ClearChat() { - foreach(var chat in _chatRepository.AllChat.Values) + foreach (var chat in _chatRepository.AllChat.Values) { chat.Clear(); } diff --git a/EndlessClient/Controllers/MainButtonController.cs b/EndlessClient/Controllers/MainButtonController.cs index 1ac85b5f1..30b4edf6d 100644 --- a/EndlessClient/Controllers/MainButtonController.cs +++ b/EndlessClient/Controllers/MainButtonController.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Threading; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EndlessClient.Dialogs.Actions; using EndlessClient.GameExecution; using EndlessClient.Rendering; @@ -9,9 +12,6 @@ using EOLib.Net.PacketProcessing; using Moffat.EndlessOnline.SDK.Packet; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Threading; -using System.Threading.Tasks; namespace EndlessClient.Controllers { @@ -177,4 +177,4 @@ public interface IMainButtonController void ClickExit(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/MapInteractionController.cs b/EndlessClient/Controllers/MapInteractionController.cs index 4e1fc6c71..c36a9898a 100644 --- a/EndlessClient/Controllers/MapInteractionController.cs +++ b/EndlessClient/Controllers/MapInteractionController.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.Dialogs; @@ -25,8 +27,6 @@ using EOLib.Localization; using Optional; using Optional.Collections; -using System; -using System.Linq; namespace EndlessClient.Controllers { @@ -315,4 +315,4 @@ public interface IMapInteractionController void RightClick(ISpellTargetable target); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/NPCInteractionController.cs b/EndlessClient/Controllers/NPCInteractionController.cs index 031e895f5..3af418529 100644 --- a/EndlessClient/Controllers/NPCInteractionController.cs +++ b/EndlessClient/Controllers/NPCInteractionController.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Dialogs; using EndlessClient.Dialogs.Actions; using EndlessClient.HUD; @@ -7,7 +8,6 @@ using EOLib.Domain.NPC; using EOLib.IO.Repositories; using EOLib.Localization; -using System.Linq; namespace EndlessClient.Controllers { @@ -43,7 +43,7 @@ public void ShowNPCDialog(NPC npc) // there is no "NPC" text in the localized files _statusLabelSetter.SetStatusLabel($"[ NPC ] {data.Name}"); - switch(data.Type) + switch (data.Type) { case EOLib.IO.NPCType.Shop: _mapNpcActions.RequestShop(npc); @@ -84,4 +84,4 @@ public interface INPCInteractionController { void ShowNPCDialog(NPC npc); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/NumPadController.cs b/EndlessClient/Controllers/NumPadController.cs index a2c390b11..5661d14a2 100644 --- a/EndlessClient/Controllers/NumPadController.cs +++ b/EndlessClient/Controllers/NumPadController.cs @@ -35,4 +35,4 @@ public interface INumPadController { void Emote(Emote whichEmote); } -} +} \ No newline at end of file diff --git a/EndlessClient/Controllers/TrainingController.cs b/EndlessClient/Controllers/TrainingController.cs index e8034da11..4968f9f29 100644 --- a/EndlessClient/Controllers/TrainingController.cs +++ b/EndlessClient/Controllers/TrainingController.cs @@ -53,4 +53,4 @@ public interface ITrainingController void AddSkillPoint(int spellId); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/AccountDialogDisplayActions.cs b/EndlessClient/Dialogs/Actions/AccountDialogDisplayActions.cs index 6a7fa651b..30652d864 100644 --- a/EndlessClient/Dialogs/Actions/AccountDialogDisplayActions.cs +++ b/EndlessClient/Dialogs/Actions/AccountDialogDisplayActions.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EndlessClient.Dialogs.Factories; using EOLib.Domain.Account; using EOLib.Localization; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.Dialogs.Actions diff --git a/EndlessClient/Dialogs/Actions/CharacterDialogActions.cs b/EndlessClient/Dialogs/Actions/CharacterDialogActions.cs index b56924c36..d25fc5859 100644 --- a/EndlessClient/Dialogs/Actions/CharacterDialogActions.cs +++ b/EndlessClient/Dialogs/Actions/CharacterDialogActions.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System; +using System.Threading.Tasks; +using AutomaticTypeMapper; using EndlessClient.Dialogs.Factories; using EOLib.Domain.Character; using EOLib.Localization; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.Dialogs.Actions @@ -79,4 +79,4 @@ public void ShowCharacterDeleteError() messageBox.ShowDialog(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/ErrorDialogDisplayAction.cs b/EndlessClient/Dialogs/Actions/ErrorDialogDisplayAction.cs index 2cc8d2c64..514c789ee 100644 --- a/EndlessClient/Dialogs/Actions/ErrorDialogDisplayAction.cs +++ b/EndlessClient/Dialogs/Actions/ErrorDialogDisplayAction.cs @@ -1,13 +1,13 @@ -using AutomaticTypeMapper; +using System; +using System.Net.Sockets; +using System.Runtime.InteropServices; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Dialogs.Factories; using EOLib.Localization; using EOLib.Net; using EOLib.Net.Communication; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; -using System.Net.Sockets; -using System.Runtime.InteropServices; namespace EndlessClient.Dialogs.Actions { @@ -171,4 +171,4 @@ public void ShowConnectionLost(bool isInGame) messageBox.ShowDialog(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/FirstTimePlayerActions.cs b/EndlessClient/Dialogs/Actions/FirstTimePlayerActions.cs index d11226e1c..162da9453 100644 --- a/EndlessClient/Dialogs/Actions/FirstTimePlayerActions.cs +++ b/EndlessClient/Dialogs/Actions/FirstTimePlayerActions.cs @@ -32,4 +32,4 @@ public interface IFirstTimePlayerActions { void WarnFirstTimePlayers(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/HelpActions.cs b/EndlessClient/Dialogs/Actions/HelpActions.cs index b56c3eca5..c325ea77d 100644 --- a/EndlessClient/Dialogs/Actions/HelpActions.cs +++ b/EndlessClient/Dialogs/Actions/HelpActions.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Dialogs.Factories; using EOLib.Domain.Report; using EOLib.Localization; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs.Actions @@ -106,4 +106,4 @@ public interface IHelpActions void SpeakToAdmin(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/IAccountDialogDisplayActions.cs b/EndlessClient/Dialogs/Actions/IAccountDialogDisplayActions.cs index 141c30b39..93b2d41f0 100644 --- a/EndlessClient/Dialogs/Actions/IAccountDialogDisplayActions.cs +++ b/EndlessClient/Dialogs/Actions/IAccountDialogDisplayActions.cs @@ -1,7 +1,7 @@ -using EOLib.Domain.Account; +using System.Threading.Tasks; +using EOLib.Domain.Account; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.Dialogs.Actions @@ -15,9 +15,9 @@ public interface IAccountDialogDisplayActions Task> ShowChangePasswordDialog(); void ShowCreateParameterValidationError(CreateAccountParameterResult validationResult); - + void ShowCreateAccountServerError(AccountReply serverError); - + void ShowSuccessMessage(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/ICharacterDialogActions.cs b/EndlessClient/Dialogs/Actions/ICharacterDialogActions.cs index d09480307..97ee3d0da 100644 --- a/EndlessClient/Dialogs/Actions/ICharacterDialogActions.cs +++ b/EndlessClient/Dialogs/Actions/ICharacterDialogActions.cs @@ -1,7 +1,7 @@ -using EOLib.Domain.Character; +using System.Threading.Tasks; +using EOLib.Domain.Character; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.Dialogs.Actions @@ -18,4 +18,4 @@ public interface ICharacterDialogActions void ShowCharacterDeleteError(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/IErrorDialogDisplayAction.cs b/EndlessClient/Dialogs/Actions/IErrorDialogDisplayAction.cs index 9022280ce..49707b8a1 100644 --- a/EndlessClient/Dialogs/Actions/IErrorDialogDisplayAction.cs +++ b/EndlessClient/Dialogs/Actions/IErrorDialogDisplayAction.cs @@ -18,4 +18,4 @@ public interface IErrorDialogDisplayAction void ShowConnectionLost(bool isIngame); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/InGameDialogActions.cs b/EndlessClient/Dialogs/Actions/InGameDialogActions.cs index b1db9209e..f2b11be40 100644 --- a/EndlessClient/Dialogs/Actions/InGameDialogActions.cs +++ b/EndlessClient/Dialogs/Actions/InGameDialogActions.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Dialogs.Factories; using EndlessClient.HUD; @@ -8,9 +11,6 @@ using EOLib.Domain.Interact.Skill; using EOLib.Localization; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs.Actions @@ -72,7 +72,7 @@ public InGameDialogActions(IFriendIgnoreListDialogFactory friendIgnoreListDialog IHelpDialogFactory helpDialogFactory, ISfxPlayer sfxPlayer, IStatusLabelSetter statusLabelSetter, - IBarberDialogFactory barberDialogFactory) + IBarberDialogFactory barberDialogFactory) { _friendIgnoreListDialogFactory = friendIgnoreListDialogFactory; _paperdollDialogFactory = paperdollDialogFactory; @@ -468,7 +468,7 @@ public void ShowHelpDialog() UseDefaultDialogSounds(dlg); }); } - + public void ShowBarberDialog() { _activeDialogRepository.BarberDialog.MatchNone(() => @@ -563,4 +563,4 @@ public interface IInGameDialogActions void ShowBarberDialog(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/NpcInteractionActions.cs b/EndlessClient/Dialogs/Actions/NpcInteractionActions.cs index f8e5b9d83..1aabb365c 100644 --- a/EndlessClient/Dialogs/Actions/NpcInteractionActions.cs +++ b/EndlessClient/Dialogs/Actions/NpcInteractionActions.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Dialogs.Factories; using EOLib.Domain.Interact; @@ -9,7 +10,6 @@ using EOLib.IO.Repositories; using EOLib.Localization; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System; using XNAControls; @@ -231,4 +231,4 @@ private void ShowPriestDialog() dlg.ShowDialog(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/PartyDialogActions.cs b/EndlessClient/Dialogs/Actions/PartyDialogActions.cs index ece65ae9e..5c911ccf6 100644 --- a/EndlessClient/Dialogs/Actions/PartyDialogActions.cs +++ b/EndlessClient/Dialogs/Actions/PartyDialogActions.cs @@ -83,4 +83,4 @@ public void NotifyPartyMemberRemove(string name) _chatRepository.AllChat[ChatTab.System].Add(new ChatData(ChatTab.System, string.Empty, _localizedStringFinder.GetString(EOResourceID.STATUS_LABEL_PARTY_LEFT_YOUR), ChatIcon.PlayerPartyDark, ChatColor.PM)); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Actions/TradeDialogActions.cs b/EndlessClient/Dialogs/Actions/TradeDialogActions.cs index ca1d0b284..c1be94edf 100644 --- a/EndlessClient/Dialogs/Actions/TradeDialogActions.cs +++ b/EndlessClient/Dialogs/Actions/TradeDialogActions.cs @@ -85,4 +85,4 @@ public void NotifyTradeClose(bool cancel) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ActiveDialogRepository.cs b/EndlessClient/Dialogs/ActiveDialogRepository.cs index 3baf2dc77..e06865968 100644 --- a/EndlessClient/Dialogs/ActiveDialogRepository.cs +++ b/EndlessClient/Dialogs/ActiveDialogRepository.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; -using Optional; -using System; +using System; using System.Collections.Generic; using System.Linq; +using AutomaticTypeMapper; +using Optional; using XNAControls; namespace EndlessClient.Dialogs @@ -58,9 +58,9 @@ public interface IActiveDialogRepository : IDisposable { Option FriendIgnoreDialog { get; set; } - Option SessionExpDialog { get; set; } + Option SessionExpDialog { get; set; } - Option QuestStatusDialog { get; set; } + Option QuestStatusDialog { get; set; } Option PaperdollDialog { get; set; } @@ -72,7 +72,7 @@ public interface IActiveDialogRepository : IDisposable Option ChestDialog { get; set; } - Option LockerDialog { get; set; } + Option LockerDialog { get; set; } Option BankAccountDialog { get; set; } @@ -95,7 +95,7 @@ public interface IActiveDialogRepository : IDisposable Option LawDialog { get; set; } Option BarberDialog { get; set; } - + Option GuildDialog { get; set; } Option HelpDialog { get; set; } @@ -145,10 +145,10 @@ public class ActiveDialogRepository : IActiveDialogRepository, IActiveDialogProv public Option LawDialog { get; set; } public Option BarberDialog { get; set; } - + public Option GuildDialog { get; set; } - public Option HelpDialog { get; set; } + public Option HelpDialog { get; set; } IReadOnlyList> ActiveDialogs { @@ -220,4 +220,4 @@ public void Dispose() HelpDialog = Option.None(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/BankAccountDialog.cs b/EndlessClient/Dialogs/BankAccountDialog.cs index eceeee19c..740a86eae 100644 --- a/EndlessClient/Dialogs/BankAccountDialog.cs +++ b/EndlessClient/Dialogs/BankAccountDialog.cs @@ -1,4 +1,5 @@ -using EndlessClient.ControlSets; +using System; +using EndlessClient.ControlSets; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.HUD; @@ -13,7 +14,6 @@ using Microsoft.Xna.Framework; using Optional; using Optional.Collections; -using System; using XNAControls; namespace EndlessClient.Dialogs @@ -33,7 +33,7 @@ public class BankAccountDialog : ScrollingListDialog private int _cachedValue; private Option _cachedUpgrades; - public BankAccountDialog(INativeGraphicsManager nativeGraphicsManager, + public BankAccountDialog(INativeGraphicsManager nativeGraphicsManager, IBankActions bankActions, IEODialogButtonService dialogButtonService, IEODialogIconService dialogIconService, @@ -247,4 +247,4 @@ private void Upgrade(object sender, EventArgs e) }); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/BarberDialog.cs b/EndlessClient/Dialogs/BarberDialog.cs index d29a13c52..f6a2d7371 100644 --- a/EndlessClient/Dialogs/BarberDialog.cs +++ b/EndlessClient/Dialogs/BarberDialog.cs @@ -1,17 +1,17 @@ using System; +using EndlessClient.Audio; +using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; -using EOLib.Graphics; -using EndlessClient.UIControls; using EndlessClient.Rendering.Factories; -using Microsoft.Xna.Framework; -using XNAControls; +using EndlessClient.UIControls; using EOLib.Domain.Character; -using EOLib.Localization; using EOLib.Domain.Interact.Barber; -using EndlessClient.Dialogs.Factories; -using Optional.Collections; +using EOLib.Graphics; using EOLib.IO.Repositories; -using EndlessClient.Audio; +using EOLib.Localization; +using Microsoft.Xna.Framework; +using Optional.Collections; +using XNAControls; namespace EndlessClient.Dialogs { @@ -194,4 +194,4 @@ private XNAButton CreateButton(IEODialogButtonService dialogButtonService, Vecto return button; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/BardDialog.cs b/EndlessClient/Dialogs/BardDialog.cs index 737dd771f..8dad95c06 100644 --- a/EndlessClient/Dialogs/BardDialog.cs +++ b/EndlessClient/Dialogs/BardDialog.cs @@ -1,4 +1,5 @@ -using EndlessClient.Controllers; +using System; +using EndlessClient.Controllers; using EndlessClient.Dialogs.Services; using EOLib.Graphics; using Microsoft.Xna.Framework; @@ -6,7 +7,6 @@ using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; using XNAControls; namespace EndlessClient.Dialogs @@ -108,4 +108,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/BaseEODialog.cs b/EndlessClient/Dialogs/BaseEODialog.cs index b480929e8..5952768eb 100644 --- a/EndlessClient/Dialogs/BaseEODialog.cs +++ b/EndlessClient/Dialogs/BaseEODialog.cs @@ -1,7 +1,7 @@ -using EndlessClient.GameExecution; +using System; +using EndlessClient.GameExecution; using EOLib.Graphics; using Microsoft.Xna.Framework; -using System; using XNAControls; namespace EndlessClient.Dialogs @@ -30,7 +30,7 @@ public override void CenterInGameView() base.CenterInGameView(); if (_isInGame() && !Game.Window.AllowUserResizing) - DrawPosition = new Vector2(DrawPosition.X, (330 - DrawArea.Height)/2f); + DrawPosition = new Vector2(DrawPosition.X, (330 - DrawArea.Height) / 2f); } public void Close() @@ -38,4 +38,4 @@ public void Close() Close(XNADialogResult.NO_BUTTON_PRESSED); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/BoardDialog.cs b/EndlessClient/Dialogs/BoardDialog.cs index 961fde98f..fa0808bf8 100644 --- a/EndlessClient/Dialogs/BoardDialog.cs +++ b/EndlessClient/Dialogs/BoardDialog.cs @@ -1,4 +1,7 @@ -using EndlessClient.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Content; using EndlessClient.ControlSets; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; @@ -14,9 +17,6 @@ using MonoGame.Extended.Input.InputListeners; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -312,4 +312,4 @@ private void ChildItem_Click(object sender, MouseEventArgs e) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/BookDialog.cs b/EndlessClient/Dialogs/BookDialog.cs index 5a5aaee18..b10252646 100644 --- a/EndlessClient/Dialogs/BookDialog.cs +++ b/EndlessClient/Dialogs/BookDialog.cs @@ -1,12 +1,12 @@ -using EndlessClient.Dialogs.Services; +using System; +using System.Collections.Generic; +using EndlessClient.Dialogs.Services; using EndlessClient.UIControls; using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; using EOLib.IO.Repositories; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; using XNAControls; using static EndlessClient.Dialogs.QuestStatusListDialogItem; @@ -127,4 +127,4 @@ private static Rectangle GetIconSourceRectangle(QuestStatusIcon index) return new Rectangle((int)index * 15, 0, 15, 15); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ChangePasswordDialog.cs b/EndlessClient/Dialogs/ChangePasswordDialog.cs index 5af8f6989..b88c7a04b 100644 --- a/EndlessClient/Dialogs/ChangePasswordDialog.cs +++ b/EndlessClient/Dialogs/ChangePasswordDialog.cs @@ -1,4 +1,6 @@ -using EndlessClient.Content; +using System; +using System.Linq; +using EndlessClient.Content; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.GameExecution; @@ -10,8 +12,6 @@ using EOLib.Localization; using Microsoft.Xna.Framework; using Optional; -using System; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -140,4 +140,4 @@ private void OnButtonPressed(object sender, EventArgs e) Close(XNADialogResult.OK); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ChestDialog.cs b/EndlessClient/Dialogs/ChestDialog.cs index 4fa1fed24..0aff00ded 100644 --- a/EndlessClient/Dialogs/ChestDialog.cs +++ b/EndlessClient/Dialogs/ChestDialog.cs @@ -1,4 +1,6 @@ -using EndlessClient.ControlSets; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.ControlSets; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.HUD; @@ -14,8 +16,6 @@ using EOLib.IO.Repositories; using EOLib.Localization; using Microsoft.Xna.Framework; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Dialogs { @@ -120,4 +120,4 @@ private void TakeItem(ChestItem item, EIFRecord itemData) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/CreateCharacterDialog.cs b/EndlessClient/Dialogs/CreateCharacterDialog.cs index 8b64f87ec..912852749 100644 --- a/EndlessClient/Dialogs/CreateCharacterDialog.cs +++ b/EndlessClient/Dialogs/CreateCharacterDialog.cs @@ -140,7 +140,7 @@ protected override void OnDrawControl(GameTime gt) { _spriteBatch.Draw(_charCreateSheet, new Vector2(170 + DrawPositionWithParentOffset.X, - 84 + i*27 + DrawPositionWithParentOffset.Y), + 84 + i * 27 + DrawPositionWithParentOffset.Y), _srcRectangles[i], Color.White); } @@ -189,4 +189,4 @@ private void ClickOk() } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/EODialogButton.cs b/EndlessClient/Dialogs/EODialogButton.cs index c6c2f7e17..e065433f5 100644 --- a/EndlessClient/Dialogs/EODialogButton.cs +++ b/EndlessClient/Dialogs/EODialogButton.cs @@ -6,4 +6,4 @@ public enum EODialogButtons Cancel, OkCancel, } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/EOMessageBox.cs b/EndlessClient/Dialogs/EOMessageBox.cs index 1ce9d4918..aadc7ad52 100644 --- a/EndlessClient/Dialogs/EOMessageBox.cs +++ b/EndlessClient/Dialogs/EOMessageBox.cs @@ -1,9 +1,9 @@ -using EndlessClient.Dialogs.Services; +using System; +using EndlessClient.Dialogs.Services; using EndlessClient.GameExecution; using EOLib; using EOLib.Graphics; using Microsoft.Xna.Framework; -using System; using XNAControls; namespace EndlessClient.Dialogs @@ -126,4 +126,4 @@ public override void Initialize() base.Initialize(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Extensions/EquipLocationExtensions.cs b/EndlessClient/Dialogs/Extensions/EquipLocationExtensions.cs index b9e269763..f2c74d39f 100644 --- a/EndlessClient/Dialogs/Extensions/EquipLocationExtensions.cs +++ b/EndlessClient/Dialogs/Extensions/EquipLocationExtensions.cs @@ -1,6 +1,6 @@ -using EOLib.IO; +using System; +using EOLib.IO; using Microsoft.Xna.Framework; -using System; namespace EndlessClient.Dialogs.Extensions { @@ -29,4 +29,4 @@ public static Rectangle GetEquipLocationRectangle(this EquipLocation loc) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/BankAccountDialogFactory.cs b/EndlessClient/Dialogs/Factories/BankAccountDialogFactory.cs index 908bbc221..ca9207f4d 100644 --- a/EndlessClient/Dialogs/Factories/BankAccountDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/BankAccountDialogFactory.cs @@ -74,4 +74,4 @@ public interface IBankAccountDialogFactory { BankAccountDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/BarberDialogFactory.cs b/EndlessClient/Dialogs/Factories/BarberDialogFactory.cs index a446b06d7..7c4dabe1e 100644 --- a/EndlessClient/Dialogs/Factories/BarberDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/BarberDialogFactory.cs @@ -1,17 +1,17 @@ +using System.Collections.Generic; using AutomaticTypeMapper; +using EndlessClient.Audio; +using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.Dialogs.Services; using EndlessClient.Rendering.Character; -using EOLib.Graphics; -using EndlessClient.Content; using EndlessClient.Rendering.Factories; using EOLib.Domain.Character; -using EOLib.Localization; using EOLib.Domain.Interact.Barber; -using EOLib.IO.Repositories; using EOLib.Domain.Notifiers; -using System.Collections.Generic; -using EndlessClient.Audio; +using EOLib.Graphics; +using EOLib.IO.Repositories; +using EOLib.Localization; namespace EndlessClient.Dialogs.Factories { diff --git a/EndlessClient/Dialogs/Factories/BardDialogFactory.cs b/EndlessClient/Dialogs/Factories/BardDialogFactory.cs index 64e81da46..9be90b362 100644 --- a/EndlessClient/Dialogs/Factories/BardDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/BardDialogFactory.cs @@ -33,4 +33,4 @@ public interface IBardDialogFactory { BardDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/BoardDialogFactory.cs b/EndlessClient/Dialogs/Factories/BoardDialogFactory.cs index ebfd4628e..167d2cbd5 100644 --- a/EndlessClient/Dialogs/Factories/BoardDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/BoardDialogFactory.cs @@ -66,4 +66,4 @@ public interface IBoardDialogFactory { BoardDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/BookDialogFactory.cs b/EndlessClient/Dialogs/Factories/BookDialogFactory.cs index cc78bd1f6..0ab0c369f 100644 --- a/EndlessClient/Dialogs/Factories/BookDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/BookDialogFactory.cs @@ -19,7 +19,7 @@ public BookDialogFactory(INativeGraphicsManager nativeGraphicsManager, IPubFileProvider pubFileProvider, IPaperdollProvider paperdollProvider) { - + _nativeGraphicsManager = nativeGraphicsManager; _eoDialogButtonService = eoDialogButtonService; _pubFileProvider = pubFileProvider; @@ -41,4 +41,4 @@ public interface IBookDialogFactory { BookDialog Create(Character character, bool isMainCharacter); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/ChestDialogFactory.cs b/EndlessClient/Dialogs/Factories/ChestDialogFactory.cs index 731a80f84..7326a6b18 100644 --- a/EndlessClient/Dialogs/Factories/ChestDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/ChestDialogFactory.cs @@ -72,4 +72,4 @@ public interface IChestDialogFactory { ChestDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/CreateAccountWarningDialogFactory.cs b/EndlessClient/Dialogs/Factories/CreateAccountWarningDialogFactory.cs index 614ae0ac0..4342a1a98 100644 --- a/EndlessClient/Dialogs/Factories/CreateAccountWarningDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/CreateAccountWarningDialogFactory.cs @@ -47,4 +47,4 @@ public interface ICreateAccountWarningDialogFactory { IXNADialog ShowCreateAccountWarningDialog(string warningMessage); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs b/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs index 1e212c732..09bd62474 100644 --- a/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.ControlSets; using EndlessClient.Dialogs.Services; using EndlessClient.GameExecution; @@ -10,8 +12,6 @@ using EOLib.Domain.Online; using EOLib.Graphics; using EOLib.Localization; -using System; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs.Factories @@ -137,4 +137,4 @@ public interface IFriendIgnoreListDialogFactory { FriendIgnoreListDialog Create(bool isFriendList); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/GuildDialogFactory.cs b/EndlessClient/Dialogs/Factories/GuildDialogFactory.cs index a01d47c04..797fb8718 100644 --- a/EndlessClient/Dialogs/Factories/GuildDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/GuildDialogFactory.cs @@ -47,4 +47,4 @@ public interface IGuildDialogFactory { GuildDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs b/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs index 5e424db3d..80d4d1d61 100644 --- a/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Content; using EndlessClient.Dialogs.Actions; using EndlessClient.Dialogs.Services; using EOLib; using EOLib.Graphics; using EOLib.Localization; -using System; -using System.Collections.Generic; namespace EndlessClient.Dialogs.Factories { @@ -78,4 +78,4 @@ public interface IHelpDialogFactory { ScrollingListDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/IChangePasswordDialogFactory.cs b/EndlessClient/Dialogs/Factories/IChangePasswordDialogFactory.cs index e333d839c..80054bf4e 100644 --- a/EndlessClient/Dialogs/Factories/IChangePasswordDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/IChangePasswordDialogFactory.cs @@ -4,4 +4,4 @@ public interface IChangePasswordDialogFactory { ChangePasswordDialog BuildChangePasswordDialog(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/IEOMessageBoxFactory.cs b/EndlessClient/Dialogs/Factories/IEOMessageBoxFactory.cs index 96decb462..aa345a1e1 100644 --- a/EndlessClient/Dialogs/Factories/IEOMessageBoxFactory.cs +++ b/EndlessClient/Dialogs/Factories/IEOMessageBoxFactory.cs @@ -5,7 +5,7 @@ namespace EndlessClient.Dialogs.Factories { public interface IEOMessageBoxFactory { - IXNADialog CreateMessageBox(string message, + IXNADialog CreateMessageBox(string message, string caption = "", EODialogButtons whichButtons = EODialogButtons.Ok, EOMessageBoxStyle style = EOMessageBoxStyle.SmallDialogSmallHeader); @@ -29,4 +29,4 @@ IXNADialog CreateMessageBox(EOResourceID message, EODialogButtons whichButtons = EODialogButtons.Ok, EOMessageBoxStyle style = EOMessageBoxStyle.SmallDialogSmallHeader); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/InnkeeperDialogFactory.cs b/EndlessClient/Dialogs/Factories/InnkeeperDialogFactory.cs index 774ae41ec..15a389ce4 100644 --- a/EndlessClient/Dialogs/Factories/InnkeeperDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/InnkeeperDialogFactory.cs @@ -64,4 +64,4 @@ public interface IInnkeeperDialogFactory { InnkeeperDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/JukeboxDialogFactory.cs b/EndlessClient/Dialogs/Factories/JukeboxDialogFactory.cs index a0228e152..926646a63 100644 --- a/EndlessClient/Dialogs/Factories/JukeboxDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/JukeboxDialogFactory.cs @@ -64,4 +64,4 @@ public interface IJukeboxDialogFactory { JukeboxDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/LawDialogFactory.cs b/EndlessClient/Dialogs/Factories/LawDialogFactory.cs index 349aac6a0..0a9538435 100644 --- a/EndlessClient/Dialogs/Factories/LawDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/LawDialogFactory.cs @@ -61,4 +61,4 @@ public interface ILawDialogFactory { LawDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/LockerDialogFactory.cs b/EndlessClient/Dialogs/Factories/LockerDialogFactory.cs index e5a699335..fc9065bee 100644 --- a/EndlessClient/Dialogs/Factories/LockerDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/LockerDialogFactory.cs @@ -71,4 +71,4 @@ public interface ILockerDialogFactory { LockerDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/PaperdollDialogFactory.cs b/EndlessClient/Dialogs/Factories/PaperdollDialogFactory.cs index 7ed0c4499..b1ec454e0 100644 --- a/EndlessClient/Dialogs/Factories/PaperdollDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/PaperdollDialogFactory.cs @@ -74,4 +74,4 @@ public interface IPaperdollDialogFactory void InjectInventoryController(IInventoryController inventoryController); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/QuestDialogFactory.cs b/EndlessClient/Dialogs/Factories/QuestDialogFactory.cs index 0fdc86289..73b9e7d77 100644 --- a/EndlessClient/Dialogs/Factories/QuestDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/QuestDialogFactory.cs @@ -47,4 +47,4 @@ public interface IQuestDialogFactory { QuestDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/QuestStatusDialogFactory.cs b/EndlessClient/Dialogs/Factories/QuestStatusDialogFactory.cs index ecdb3f1c2..18ca65f3a 100644 --- a/EndlessClient/Dialogs/Factories/QuestStatusDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/QuestStatusDialogFactory.cs @@ -43,4 +43,4 @@ public interface IQuestStatusDialogFactory { QuestStatusDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/ScrollingListDialogFactory.cs b/EndlessClient/Dialogs/Factories/ScrollingListDialogFactory.cs index 2641bdd86..5bf061e6a 100644 --- a/EndlessClient/Dialogs/Factories/ScrollingListDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/ScrollingListDialogFactory.cs @@ -27,4 +27,4 @@ public interface IScrollingListDialogFactory { ScrollingListDialog Create(DialogType size); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/SessionExpDialogFactory.cs b/EndlessClient/Dialogs/Factories/SessionExpDialogFactory.cs index 6eb6e954c..548c7a48b 100644 --- a/EndlessClient/Dialogs/Factories/SessionExpDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/SessionExpDialogFactory.cs @@ -46,4 +46,4 @@ public interface ISessionExpDialogFactory { SessionExpDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/ShopDialogFactory.cs b/EndlessClient/Dialogs/Factories/ShopDialogFactory.cs index b2f0cbea0..ed7d589d5 100644 --- a/EndlessClient/Dialogs/Factories/ShopDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/ShopDialogFactory.cs @@ -74,4 +74,4 @@ public interface IShopDialogFactory { ShopDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/SkillmasterDialogFactory.cs b/EndlessClient/Dialogs/Factories/SkillmasterDialogFactory.cs index 917decb76..e17ff74c8 100644 --- a/EndlessClient/Dialogs/Factories/SkillmasterDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/SkillmasterDialogFactory.cs @@ -78,4 +78,4 @@ public interface ISkillmasterDialogFactory { SkillmasterDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/TextInputDialogFactory.cs b/EndlessClient/Dialogs/Factories/TextInputDialogFactory.cs index 6718eaece..b72776cd5 100644 --- a/EndlessClient/Dialogs/Factories/TextInputDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/TextInputDialogFactory.cs @@ -46,4 +46,4 @@ public interface ITextInputDialogFactory { TextInputDialog Create(string prompt, int maxInputChars = 12); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/TextInputMultiDialogFactory.cs b/EndlessClient/Dialogs/Factories/TextInputMultiDialogFactory.cs index 60caa456a..111ddbda3 100644 --- a/EndlessClient/Dialogs/Factories/TextInputMultiDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/TextInputMultiDialogFactory.cs @@ -51,4 +51,4 @@ TextMultiInputDialog Create(string title, TextMultiInputDialog.DialogSize size, params TextMultiInputDialog.InputInfo[] inputInfo); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Factories/TradeDialogFactory.cs b/EndlessClient/Dialogs/Factories/TradeDialogFactory.cs index 83d56ab88..bfd49b8b4 100644 --- a/EndlessClient/Dialogs/Factories/TradeDialogFactory.cs +++ b/EndlessClient/Dialogs/Factories/TradeDialogFactory.cs @@ -76,4 +76,4 @@ public interface ITradeDialogFactory { TradeDialog Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/FriendIgnoreListDialog.cs b/EndlessClient/Dialogs/FriendIgnoreListDialog.cs index 590766826..7a6d0459e 100644 --- a/EndlessClient/Dialogs/FriendIgnoreListDialog.cs +++ b/EndlessClient/Dialogs/FriendIgnoreListDialog.cs @@ -1,9 +1,9 @@ -using EndlessClient.Dialogs.Services; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Dialogs.Services; using EOLib.Domain.Online; using EOLib.Graphics; using Microsoft.Xna.Framework; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Dialogs { @@ -35,4 +35,4 @@ protected override void OnUpdateControl(GameTime gameTime) base.OnUpdateControl(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/GameLoadingDialog.cs b/EndlessClient/Dialogs/GameLoadingDialog.cs index 2a126af6c..678893cfd 100644 --- a/EndlessClient/Dialogs/GameLoadingDialog.cs +++ b/EndlessClient/Dialogs/GameLoadingDialog.cs @@ -70,7 +70,7 @@ public override void Initialize() protected override void OnUpdateControl(GameTime gt) { - if ((int) (DateTime.Now - _lastBackgroundUpdate).TotalMilliseconds > 500) + if ((int)(DateTime.Now - _lastBackgroundUpdate).TotalMilliseconds > 500) { _bgSrcIndex = _bgSrcIndex == 3 ? 0 : _bgSrcIndex + 1; _lastBackgroundUpdate = DateTime.Now; @@ -133,4 +133,4 @@ public enum GameLoadingDialogState Class, LoadingGame } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/GuildDialog.cs b/EndlessClient/Dialogs/GuildDialog.cs index 9d835d349..9c1cb9d9f 100644 --- a/EndlessClient/Dialogs/GuildDialog.cs +++ b/EndlessClient/Dialogs/GuildDialog.cs @@ -230,4 +230,4 @@ private void SetStateIfGuildMember(GuildDialogState state) SetState(state); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/InnkeeperDialog.cs b/EndlessClient/Dialogs/InnkeeperDialog.cs index b72bfc8b0..f98503f6e 100644 --- a/EndlessClient/Dialogs/InnkeeperDialog.cs +++ b/EndlessClient/Dialogs/InnkeeperDialog.cs @@ -1,4 +1,6 @@ -using EndlessClient.Content; +using System; +using System.Collections.Generic; +using EndlessClient.Content; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EOLib; @@ -9,8 +11,6 @@ using EOLib.Localization; using Microsoft.Xna.Framework; using Optional.Collections; -using System; -using System.Collections.Generic; using XNAControls; namespace EndlessClient.Dialogs @@ -251,4 +251,4 @@ private void SetState(InnkeeperDialogState state) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ItemTransferDialog.cs b/EndlessClient/Dialogs/ItemTransferDialog.cs index 39494171f..a8c79f3c1 100644 --- a/EndlessClient/Dialogs/ItemTransferDialog.cs +++ b/EndlessClient/Dialogs/ItemTransferDialog.cs @@ -1,4 +1,5 @@ -using EndlessClient.Content; +using System; +using EndlessClient.Content; using EndlessClient.Dialogs.Services; using EndlessClient.HUD.Chat; using EOLib; @@ -7,7 +8,6 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input.InputListeners; -using System; using XNAControls; namespace EndlessClient.Dialogs @@ -68,7 +68,7 @@ public ItemTransferDialog(INativeGraphicsManager nativeGraphicsManager, } _okButton = new XNAButton(eoDialogButtonService.SmallButtonSheet, - new Vector2(60, 125), + new Vector2(60, 125), eoDialogButtonService.GetSmallDialogButtonOutSource(SmallButton.Ok), eoDialogButtonService.GetSmallDialogButtonOverSource(SmallButton.Ok)) { @@ -219,5 +219,4 @@ private static bool IsValidMessage(EOResourceID msg) return name.Contains("DIALOG_TRANSFER"); } } - -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/JukeboxDialog.cs b/EndlessClient/Dialogs/JukeboxDialog.cs index aa8af76ce..4541d237c 100644 --- a/EndlessClient/Dialogs/JukeboxDialog.cs +++ b/EndlessClient/Dialogs/JukeboxDialog.cs @@ -1,4 +1,6 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using EndlessClient.Audio; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EOLib.Domain.Character; @@ -9,8 +11,6 @@ using MonoGame.Extended.Input.InputListeners; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; using XNAControls; namespace EndlessClient.Dialogs @@ -172,4 +172,4 @@ private string FormatSubtitle(string additionalText) return _localizedStringFinder.GetString(EOResourceID.DIALOG_WORD_CURRENT) + " : " + additionalText; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/LawDialog.cs b/EndlessClient/Dialogs/LawDialog.cs index 2469efa12..070e47f29 100644 --- a/EndlessClient/Dialogs/LawDialog.cs +++ b/EndlessClient/Dialogs/LawDialog.cs @@ -1,4 +1,7 @@ -using EndlessClient.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Content; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EOLib; @@ -9,9 +12,6 @@ using EOLib.IO.Repositories; using EOLib.Localization; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -195,4 +195,4 @@ private void SetState(LawDialogState state) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ListDialogItem.cs b/EndlessClient/Dialogs/ListDialogItem.cs index 77874114f..37684cc84 100644 --- a/EndlessClient/Dialogs/ListDialogItem.cs +++ b/EndlessClient/Dialogs/ListDialogItem.cs @@ -1,10 +1,10 @@ -using EOLib; +using System; +using EOLib; using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; -using System; using XNAControls; namespace EndlessClient.Dialogs @@ -297,4 +297,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/LockerDialog.cs b/EndlessClient/Dialogs/LockerDialog.cs index 92114f376..eaeebbd4f 100644 --- a/EndlessClient/Dialogs/LockerDialog.cs +++ b/EndlessClient/Dialogs/LockerDialog.cs @@ -1,4 +1,6 @@ -using EndlessClient.ControlSets; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.ControlSets; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.HUD; @@ -13,8 +15,6 @@ using EOLib.IO.Repositories; using EOLib.Localization; using Microsoft.Xna.Framework; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Dialogs { @@ -121,4 +121,4 @@ private string GetDialogTitle() return _characterProvider.MainCharacter.Name + "'s " + _localizedStringFinder.GetString(EOResourceID.DIALOG_TITLE_PRIVATE_LOCKER) + $" [{_lockerDataProvider.Items.Count}]"; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/PaperdollDialog.cs b/EndlessClient/Dialogs/PaperdollDialog.cs index e9d513b31..c2811a636 100644 --- a/EndlessClient/Dialogs/PaperdollDialog.cs +++ b/EndlessClient/Dialogs/PaperdollDialog.cs @@ -1,4 +1,7 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Audio; using EndlessClient.Controllers; using EndlessClient.ControlSets; using EndlessClient.Dialogs.Extensions; @@ -15,9 +18,6 @@ using EOLib.Localization; using Microsoft.Xna.Framework; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Dialogs { @@ -155,4 +155,4 @@ protected override void UpdateDisplayedData(PaperdollData paperdollData) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/PaperdollDialogItem.cs b/EndlessClient/Dialogs/PaperdollDialogItem.cs index 9c753acfc..14e30679b 100644 --- a/EndlessClient/Dialogs/PaperdollDialogItem.cs +++ b/EndlessClient/Dialogs/PaperdollDialogItem.cs @@ -1,4 +1,5 @@ -using EndlessClient.Audio; +using System; +using EndlessClient.Audio; using EndlessClient.Dialogs.Extensions; using EndlessClient.HUD.Panels; using EOLib.Graphics; @@ -8,7 +9,6 @@ using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; using XNAControls; namespace EndlessClient.Dialogs @@ -121,4 +121,4 @@ private void StopDragging() _sfxPlayer.PlaySfx(SoundEffectID.InventoryPlace); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/PlayerInfoDialog.cs b/EndlessClient/Dialogs/PlayerInfoDialog.cs index 8d1ff2939..ca98e9f21 100644 --- a/EndlessClient/Dialogs/PlayerInfoDialog.cs +++ b/EndlessClient/Dialogs/PlayerInfoDialog.cs @@ -162,4 +162,4 @@ private static Rectangle GetOnlineIconSourceRectangle(CharacterIcon icon) return new Rectangle(x, y, width, height); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ProgressDialog.cs b/EndlessClient/Dialogs/ProgressDialog.cs index 5a698f105..93d73d9ce 100644 --- a/EndlessClient/Dialogs/ProgressDialog.cs +++ b/EndlessClient/Dialogs/ProgressDialog.cs @@ -122,4 +122,4 @@ private void DoCancel(object sender, EventArgs e) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/QuestDialog.cs b/EndlessClient/Dialogs/QuestDialog.cs index 538fb1123..578b223ea 100644 --- a/EndlessClient/Dialogs/QuestDialog.cs +++ b/EndlessClient/Dialogs/QuestDialog.cs @@ -1,4 +1,7 @@ -using EndlessClient.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Content; using EndlessClient.Dialogs.Services; using EOLib; using EOLib.Domain.Interact.Quest; @@ -7,9 +10,6 @@ using Microsoft.Xna.Framework; using Moffat.EndlessOnline.SDK.Protocol.Net.Client; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -188,4 +188,4 @@ private void PreviousPage(object sender, EventArgs e) }); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/QuestStatusDialog.cs b/EndlessClient/Dialogs/QuestStatusDialog.cs index 6acff69be..0a535f840 100644 --- a/EndlessClient/Dialogs/QuestStatusDialog.cs +++ b/EndlessClient/Dialogs/QuestStatusDialog.cs @@ -1,11 +1,11 @@ -using EndlessClient.Dialogs.Services; +using System.Collections.Generic; +using EndlessClient.Dialogs.Services; using EOLib.Domain.Character; using EOLib.Domain.Interact.Quest; using EOLib.Graphics; using EOLib.Localization; using Microsoft.Xna.Framework; using Moffat.EndlessOnline.SDK.Protocol.Net; -using System.Collections.Generic; namespace EndlessClient.Dialogs { @@ -131,4 +131,4 @@ private void SetTitle(QuestPage page) Title = $"{_characterProvider.MainCharacter.Name}'s {description}"; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/QuestStatusListDialogItem.cs b/EndlessClient/Dialogs/QuestStatusListDialogItem.cs index c708eea4a..2e3f99dfc 100644 --- a/EndlessClient/Dialogs/QuestStatusListDialogItem.cs +++ b/EndlessClient/Dialogs/QuestStatusListDialogItem.cs @@ -11,14 +11,14 @@ public class QuestStatusListDialogItem : ListDialogItem { public enum QuestStatusIcon { - None = 0, - Talk = 1, - Item = 2, - Kill = 3, - Step = 4, - Complete = 5, - None2 = 6, // ? - None3 = 7, // ? + None = 0, + Talk = 1, + Item = 2, + Kill = 3, + Step = 4, + Complete = 5, + None2 = 6, // ? + None3 = 7, // ? }; private static readonly Vector2 _firstIconPosition = new Vector2(6, 0); @@ -131,4 +131,4 @@ private static Rectangle GetSignalSourceRectangle() return new Rectangle(0, 15, 15, 15); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ScrollingListDialog.cs b/EndlessClient/Dialogs/ScrollingListDialog.cs index 56f598ffb..8092aaf32 100644 --- a/EndlessClient/Dialogs/ScrollingListDialog.cs +++ b/EndlessClient/Dialogs/ScrollingListDialog.cs @@ -1,4 +1,7 @@ -using EndlessClient.Dialogs.Factories; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.UIControls; using EOLib; @@ -8,9 +11,6 @@ using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.BitmapFonts; using MonoGame.Extended.Input.InputListeners; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -18,28 +18,28 @@ namespace EndlessClient.Dialogs [Flags] public enum ScrollingListDialogButtons { - None = 0x00, - Add = 0x01, - Cancel = 0x02, - Back = 0x04, - Next = 0x08, - Ok = 0x10, - History = 0x20, - Progress = 0x40, - Delete = 0x80, - DualButtons = 0x800, + None = 0x00, + Add = 0x01, + Cancel = 0x02, + Back = 0x04, + Next = 0x08, + Ok = 0x10, + History = 0x20, + Progress = 0x40, + Delete = 0x80, + DualButtons = 0x800, // indicates a configuration in which a pairing of DualButtons is already defined, but the order is reversed - Alternate = 0x1000, - - AddCancel = DualButtons | Add | Cancel, - BackCancel = DualButtons | Back | Cancel, - BackOk = DualButtons | Back | Ok, - CancelOk = DualButtons | Cancel | Ok, - OkCancel = DualButtons | Cancel | Ok | Alternate, - BackNext = DualButtons | Back | Next, - CancelNext = DualButtons | Cancel | Next, - HistoryOk = DualButtons | History | Ok, - ProgressOk = DualButtons | Progress | Ok, + Alternate = 0x1000, + + AddCancel = DualButtons | Add | Cancel, + BackCancel = DualButtons | Back | Cancel, + BackOk = DualButtons | Back | Ok, + CancelOk = DualButtons | Cancel | Ok, + OkCancel = DualButtons | Cancel | Ok | Alternate, + BackNext = DualButtons | Back | Next, + CancelNext = DualButtons | Cancel | Next, + HistoryOk = DualButtons | History | Ok, + ProgressOk = DualButtons | Progress | Ok, DeleteCancel = DualButtons | Delete | Cancel, // There is only one button, but we want it to show on the right side as if it were a dual button setting @@ -228,7 +228,7 @@ public ScrollingListDialog(INativeGraphicsManager nativeGraphicsManager, _add = new XNAButton(dialogButtonService.SmallButtonSheet, Vector2.Zero, dialogButtonService.GetSmallDialogButtonOutSource(SmallButton.Add), dialogButtonService.GetSmallDialogButtonOverSource(SmallButton.Add)) - { + { Visible = false, UpdateOrder = 1, }; @@ -483,7 +483,7 @@ protected override void OnUpdateControl(GameTime gameTime) protected static Rectangle GetTitleDrawArea(DialogType size) { - switch(size) + switch (size) { case DialogType.Shop: case DialogType.Help: @@ -539,7 +539,7 @@ private static int GetBackgroundTexture(DialogType size) return new Rectangle(0, 0, backgroundTexture.Width, backgroundTexture.Height / 2); case DialogType.Jukebox: case DialogType.NpcQuestDialog: - case DialogType.BankAccountDialog: return null; + case DialogType.BankAccountDialog: return null; default: throw new NotImplementedException(); } } @@ -606,4 +606,4 @@ private static int GetButtonYCoordinate(Rectangle dialogArea) return dialogArea.Height - 38; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ScrollingMessageDialog.cs b/EndlessClient/Dialogs/ScrollingMessageDialog.cs index 0387095eb..47e490a00 100644 --- a/EndlessClient/Dialogs/ScrollingMessageDialog.cs +++ b/EndlessClient/Dialogs/ScrollingMessageDialog.cs @@ -114,4 +114,4 @@ protected override void OnDrawControl(GameTime gt) _spriteBatch.End(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Services/EODialogButtonService.cs b/EndlessClient/Dialogs/Services/EODialogButtonService.cs index 150da078c..84ee583cc 100644 --- a/EndlessClient/Dialogs/Services/EODialogButtonService.cs +++ b/EndlessClient/Dialogs/Services/EODialogButtonService.cs @@ -34,16 +34,16 @@ public EODialogButtonService(INativeGraphicsManager nativeGraphicsManager) public Rectangle GetSmallDialogButtonOutSource(SmallButton whichButton) { - var widthDelta = SmallButtonSheet.Width/2; - var heightDelta = SmallButtonSheet.Height/(int) SmallButton.NUM_BUTTONS; - return new Rectangle(0, heightDelta*(int) whichButton, widthDelta, heightDelta); + var widthDelta = SmallButtonSheet.Width / 2; + var heightDelta = SmallButtonSheet.Height / (int)SmallButton.NUM_BUTTONS; + return new Rectangle(0, heightDelta * (int)whichButton, widthDelta, heightDelta); } public Rectangle GetSmallDialogButtonOverSource(SmallButton whichButton) { - var widthDelta = SmallButtonSheet.Width/2; - var heightDelta = SmallButtonSheet.Height/(int) SmallButton.NUM_BUTTONS; - return new Rectangle(widthDelta, heightDelta*(int) whichButton, widthDelta, heightDelta); + var widthDelta = SmallButtonSheet.Width / 2; + var heightDelta = SmallButtonSheet.Height / (int)SmallButton.NUM_BUTTONS; + return new Rectangle(widthDelta, heightDelta * (int)whichButton, widthDelta, heightDelta); } } @@ -54,4 +54,4 @@ public interface IEODialogButtonService Rectangle GetSmallDialogButtonOutSource(SmallButton whichButton); Rectangle GetSmallDialogButtonOverSource(SmallButton whichButton); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/Services/EODialogIconService.cs b/EndlessClient/Dialogs/Services/EODialogIconService.cs index 90a638e05..671b562cc 100644 --- a/EndlessClient/Dialogs/Services/EODialogIconService.cs +++ b/EndlessClient/Dialogs/Services/EODialogIconService.cs @@ -69,4 +69,4 @@ public interface IEODialogIconService Rectangle GetDialogIconSource(DialogIcon whichIcon); } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/SessionExpDialog.cs b/EndlessClient/Dialogs/SessionExpDialog.cs index 4f85b5354..7f806db41 100644 --- a/EndlessClient/Dialogs/SessionExpDialog.cs +++ b/EndlessClient/Dialogs/SessionExpDialog.cs @@ -93,9 +93,9 @@ public SessionExpDialog(INativeGraphicsManager nativeGraphicsManager, rightSide[1].Text = $"{expTableProvider.ExperienceByLevel[level + 1]}"; rightSide[2].Text = $"{expTableProvider.ExperienceByLevel[level + 1] - exp}"; rightSide[3].Text = $"{characterSessionProvider.TodayTotalExp}"; - rightSide[4].Text = $"{(int)(exp / (usage/60.0))}"; + rightSide[4].Text = $"{(int)(exp / (usage / 60.0))}"; int sessionTimeMinutes = (int)(DateTime.Now - characterSessionProvider.SessionStartTime).TotalMinutes; - rightSide[5].Text = $"{(sessionTimeMinutes > 0 ? (int)(characterSessionProvider.TodayTotalExp / (sessionTimeMinutes/60.0)) : 0)}"; + rightSide[5].Text = $"{(sessionTimeMinutes > 0 ? (int)(characterSessionProvider.TodayTotalExp / (sessionTimeMinutes / 60.0)) : 0)}"; rightSide[6].Text = $"{characterSessionProvider.BestKillExp}"; rightSide[7].Text = $"{characterSessionProvider.LastKillExp}"; @@ -117,10 +117,10 @@ protected override void OnDrawControl(GameTime gameTime) for (int i = 0; i < 8; i++) _spriteBatch.Draw(_icons, new Vector2(DrawPositionWithParentOffset.X + 18, DrawPositionWithParentOffset.Y + 47 + 16 * i), _iconSource, Color.White); - for(int i = 0; i < 3; i++) + for (int i = 0; i < 3; i++) _spriteBatch.Draw(_icons, new Vector2(DrawPositionWithParentOffset.X + 142, DrawPositionWithParentOffset.Y + 48 + 16 * i), _signalSource, Color.White); _spriteBatch.End(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/ShopDialog.cs b/EndlessClient/Dialogs/ShopDialog.cs index 469b06bf4..a18a4deef 100644 --- a/EndlessClient/Dialogs/ShopDialog.cs +++ b/EndlessClient/Dialogs/ShopDialog.cs @@ -1,4 +1,7 @@ -using EndlessClient.Dialogs.Factories; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.HUD.Inventory; using EOLib.Domain.Character; @@ -9,9 +12,6 @@ using Microsoft.Xna.Framework; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -364,7 +364,7 @@ private void CraftItem(object sender, EventArgs e) { var message = BuildMessage(EOResourceID.DIALOG_SHOP_CRAFT_MISSING_INGREDIENTS); var caption = BuildCaption(EOResourceID.DIALOG_SHOP_CRAFT_INGREDIENTS); - + var dlg = _messageBoxFactory.CreateMessageBox(message, caption, EODialogButtons.Cancel, EOMessageBoxStyle.LargeDialogSmallHeader); dlg.ShowDialog(); @@ -411,4 +411,4 @@ string BuildCaption(EOResourceID resource) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/SkillmasterDialog.cs b/EndlessClient/Dialogs/SkillmasterDialog.cs index 2ceb60820..d4229b964 100644 --- a/EndlessClient/Dialogs/SkillmasterDialog.cs +++ b/EndlessClient/Dialogs/SkillmasterDialog.cs @@ -332,7 +332,7 @@ from req in skill.SkillRequirements if (skill.WisRequirement > 0) drawStrings.Add($"{skill.WisRequirement} {_localizedStringFinder.GetString(EOResourceID.SKILLMASTER_WORD_WISDOM)}"); if (skill.AgiRequirement > 0) - drawStrings.Add($"{skill.AgiRequirement} { _localizedStringFinder.GetString(EOResourceID.SKILLMASTER_WORD_AGILITY)}"); + drawStrings.Add($"{skill.AgiRequirement} {_localizedStringFinder.GetString(EOResourceID.SKILLMASTER_WORD_AGILITY)}"); if (skill.ConRequirement > 0) drawStrings.Add($"{skill.ConRequirement} {_localizedStringFinder.GetString(EOResourceID.SKILLMASTER_WORD_CONSTITUTION)}"); if (skill.ChaRequirement > 0) @@ -398,4 +398,4 @@ private void ConfirmResetCharacter() dlg.ShowDialog(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/TextInputDialog.cs b/EndlessClient/Dialogs/TextInputDialog.cs index 67bb93890..4e6bea597 100644 --- a/EndlessClient/Dialogs/TextInputDialog.cs +++ b/EndlessClient/Dialogs/TextInputDialog.cs @@ -43,7 +43,7 @@ public TextInputDialog(INativeGraphicsManager nativeGraphicsManager, TextColor = ColorConstants.LightBeigeText, }; _inputBox.SetParentControl(this); - + var ok = new XNAButton(eoDialogButtonService.SmallButtonSheet, new Vector2(41, 103), eoDialogButtonService.GetSmallDialogButtonOutSource(SmallButton.Ok), @@ -73,4 +73,4 @@ public override void Initialize() base.Initialize(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/TextMultiInputDialog.cs b/EndlessClient/Dialogs/TextMultiInputDialog.cs index fc11fd872..b41fee9c2 100644 --- a/EndlessClient/Dialogs/TextMultiInputDialog.cs +++ b/EndlessClient/Dialogs/TextMultiInputDialog.cs @@ -1,13 +1,13 @@ -using EndlessClient.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Content; using EndlessClient.Dialogs.Services; using EndlessClient.HUD.Chat; using EOLib; using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -51,7 +51,7 @@ public TextMultiInputDialog(INativeGraphicsManager nativeGraphicsManager, : base(nativeGraphicsManager, isInGame: true) { _background = GraphicsManager.TextureFromResource(GFXTypes.PostLoginUI, 57); - + switch (size) { case DialogSize.Two: @@ -159,4 +159,4 @@ protected override void OnDrawControl(GameTime gameTime) base.OnDrawControl(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Dialogs/TradeDialog.cs b/EndlessClient/Dialogs/TradeDialog.cs index 33822db05..00084eb9b 100644 --- a/EndlessClient/Dialogs/TradeDialog.cs +++ b/EndlessClient/Dialogs/TradeDialog.cs @@ -1,4 +1,8 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using EndlessClient.Audio; using EndlessClient.Dialogs.Factories; using EndlessClient.Dialogs.Services; using EndlessClient.HUD; @@ -14,10 +18,6 @@ using EOLib.Localization; using Microsoft.Xna.Framework; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; using XNAControls; namespace EndlessClient.Dialogs @@ -309,7 +309,7 @@ private void UpdateOffer(TradeOffer actualOffer, TradeOffer cachedOffer, { var dlg = _messageBoxFactory.CreateMessageBox(DialogResourceID.TRADE_OTHER_PLAYER_TRICK_YOU); dlg.ShowDialog(); - + // this will prevent the message from showing more than once per trade (I'm too lazy to find something more elegant) _recentPartnerItemChanges = -1000; } @@ -401,4 +401,4 @@ private void CancelButtonClicked(object sender, EventArgs e) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/EndlessClient.csproj b/EndlessClient/EndlessClient.csproj index 1ac9f1b06..1fa79d048 100644 --- a/EndlessClient/EndlessClient.csproj +++ b/EndlessClient/EndlessClient.csproj @@ -1,4 +1,7 @@  + + + net6.0-windows WinExe @@ -75,7 +78,6 @@ Icon.bmp - diff --git a/EndlessClient/GameExecution/DebugGameRunner.cs b/EndlessClient/GameExecution/DebugGameRunner.cs index 922665e93..80eb2abab 100644 --- a/EndlessClient/GameExecution/DebugGameRunner.cs +++ b/EndlessClient/GameExecution/DebugGameRunner.cs @@ -10,4 +10,4 @@ public class DebugGameRunner : GameRunnerBase public DebugGameRunner(ITypeRegistry registry, string[] args) : base(registry, args) { } } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/EndlessGame.cs b/EndlessClient/GameExecution/EndlessGame.cs index 8f0db67f2..58e4c6f47 100644 --- a/EndlessClient/GameExecution/EndlessGame.cs +++ b/EndlessClient/GameExecution/EndlessGame.cs @@ -1,4 +1,9 @@ -using AutomaticTypeMapper; +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Content; using EndlessClient.Controllers; @@ -18,11 +23,6 @@ using Microsoft.Xna.Framework.Input; using MonoGame.Extended.BitmapFonts; using MonoGame.Extended.Input; -using System; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; namespace EndlessClient.GameExecution { @@ -297,4 +297,4 @@ private void SetUpInitialControlSet() xnaControl.Initialize(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/GameRunnerBase.cs b/EndlessClient/GameExecution/GameRunnerBase.cs index 832f7d37d..1f74f8535 100644 --- a/EndlessClient/GameExecution/GameRunnerBase.cs +++ b/EndlessClient/GameExecution/GameRunnerBase.cs @@ -1,12 +1,12 @@ -using System.Diagnostics; +using System; +using System.Diagnostics; using System.IO; +using System.Net; using AutomaticTypeMapper; using EndlessClient.Initialization; using EOLib.Config; using EOLib.Graphics; using EOLib.Localization; -using System; -using System.Net; #if !LINUX && !OSX using System.Windows.Forms; @@ -60,7 +60,7 @@ public virtual bool SetupDependencies() catch (LibraryLoadException lle) { var message = - $"There was an error loading GFX{(int) lle.WhichGFX:000}.EGF : {lle.WhichGFX}. Place all .GFX files in .\\gfx\\. The error message is:\n\n\"{lle.Message}\""; + $"There was an error loading GFX{(int)lle.WhichGFX:000}.EGF : {lle.WhichGFX}. Place all .GFX files in .\\gfx\\. The error message is:\n\n\"{lle.Message}\""; ShowErrorMessage(message, "GFX Load Error"); return false; } @@ -76,7 +76,7 @@ public virtual bool SetupDependencies() i++; } - else if(string.Equals(arg, "--port") && i < _args.Length - 1) + else if (string.Equals(arg, "--port") && i < _args.Length - 1) { var port = _args[i + 1]; @@ -145,4 +145,4 @@ public virtual void RunGame() game.Run(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/GameStateActions.cs b/EndlessClient/GameExecution/GameStateActions.cs index 95a4bb011..7536b81e8 100644 --- a/EndlessClient/GameExecution/GameStateActions.cs +++ b/EndlessClient/GameExecution/GameStateActions.cs @@ -4,15 +4,15 @@ using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.ControlSets; +using EndlessClient.HUD.Panels; using EndlessClient.Network; +using EndlessClient.Rendering; +using EOLib; +using EOLib.Config; using EOLib.Domain.Character; using EOLib.Domain.Login; -using EndlessClient.Rendering; using Microsoft.Xna.Framework; using XNAControls.Input; -using EndlessClient.HUD.Panels; -using EOLib; -using EOLib.Config; namespace EndlessClient.GameExecution { @@ -159,4 +159,4 @@ private void StorePanelLayout(object sender, EventArgs e) private IEndlessGame Game => _endlessGameProvider.Game; } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/IEndlessGame.cs b/EndlessClient/GameExecution/IEndlessGame.cs index 682eb62e1..06e3eb969 100644 --- a/EndlessClient/GameExecution/IEndlessGame.cs +++ b/EndlessClient/GameExecution/IEndlessGame.cs @@ -20,4 +20,4 @@ public interface IEndlessGame : IDisposable void Exit(); } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/IEndlessGameProvider.cs b/EndlessClient/GameExecution/IEndlessGameProvider.cs index 47f16f20d..5320faa60 100644 --- a/EndlessClient/GameExecution/IEndlessGameProvider.cs +++ b/EndlessClient/GameExecution/IEndlessGameProvider.cs @@ -18,4 +18,4 @@ public class EndlessGameRepository : IEndlessGameRepository, IEndlessGameProvide { public IEndlessGame Game { get; set; } } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/IGameRunner.cs b/EndlessClient/GameExecution/IGameRunner.cs index fa75ed940..48347f597 100644 --- a/EndlessClient/GameExecution/IGameRunner.cs +++ b/EndlessClient/GameExecution/IGameRunner.cs @@ -6,4 +6,4 @@ public interface IGameRunner void RunGame(); } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/IGameStateActions.cs b/EndlessClient/GameExecution/IGameStateActions.cs index ec73a464e..cf109642b 100644 --- a/EndlessClient/GameExecution/IGameStateActions.cs +++ b/EndlessClient/GameExecution/IGameStateActions.cs @@ -8,4 +8,4 @@ public interface IGameStateActions void ExitGame(); } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/IGameStateRepository.cs b/EndlessClient/GameExecution/IGameStateRepository.cs index d983c5142..288123615 100644 --- a/EndlessClient/GameExecution/IGameStateRepository.cs +++ b/EndlessClient/GameExecution/IGameStateRepository.cs @@ -18,4 +18,4 @@ public class GameStateRepository : IGameStateRepository, IGameStateProvider { public GameStates CurrentState { get; set; } } -} +} \ No newline at end of file diff --git a/EndlessClient/GameExecution/ReleaseGameRunner.cs b/EndlessClient/GameExecution/ReleaseGameRunner.cs index 2164c63b0..abe6e97ac 100644 --- a/EndlessClient/GameExecution/ReleaseGameRunner.cs +++ b/EndlessClient/GameExecution/ReleaseGameRunner.cs @@ -1,7 +1,6 @@ using System; -using AutomaticTypeMapper; - using System.Runtime.Versioning; +using AutomaticTypeMapper; #if !LINUX && !OSX using System.Windows.Forms; @@ -111,4 +110,4 @@ private static void ShowExceptionDialog(Exception ex) #endif } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/AStarPathFinder.cs b/EndlessClient/HUD/AStarPathFinder.cs index 5ecd0c205..001ec85bc 100644 --- a/EndlessClient/HUD/AStarPathFinder.cs +++ b/EndlessClient/HUD/AStarPathFinder.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; -using EOLib.Domain.Character; -using EOLib.Domain.Map; -using System; +using System; using System.Collections.Generic; using System.Linq; +using AutomaticTypeMapper; +using EOLib.Domain.Character; +using EOLib.Domain.Map; namespace EndlessClient.HUD { @@ -97,7 +97,7 @@ private IEnumerable getNeighbors(MapCoordinate current) }; foreach (var coordinateOffset in points) - { + { if (_walkValidationActions.CanMoveToCoordinates(current.X + coordinateOffset.X, current.Y + coordinateOffset.Y) == WalkValidationResult.Walkable) yield return new MapCoordinate(current.X + coordinateOffset.X, current.Y + coordinateOffset.Y); } @@ -108,4 +108,4 @@ public interface IPathFinder { Queue FindPath(MapCoordinate start, MapCoordinate finish); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Chat/ChatBubbleActions.cs b/EndlessClient/HUD/Chat/ChatBubbleActions.cs index 2bfa991a7..633828104 100644 --- a/EndlessClient/HUD/Chat/ChatBubbleActions.cs +++ b/EndlessClient/HUD/Chat/ChatBubbleActions.cs @@ -1,3 +1,4 @@ +using System.Linq; using AutomaticTypeMapper; using EndlessClient.Rendering.Character; using EndlessClient.Rendering.Chat; @@ -5,7 +6,6 @@ using EOLib.Domain.Chat; using EOLib.Domain.Party; using Optional; -using System.Linq; namespace EndlessClient.HUD.Chat { diff --git a/EndlessClient/HUD/Chat/ChatModeCalculator.cs b/EndlessClient/HUD/Chat/ChatModeCalculator.cs index ea75ac74d..39dde4b17 100644 --- a/EndlessClient/HUD/Chat/ChatModeCalculator.cs +++ b/EndlessClient/HUD/Chat/ChatModeCalculator.cs @@ -31,7 +31,7 @@ public ChatModePictureBox.ChatMode CalculateMode(string fullTextString) { case '!': return ChatModePictureBox.ChatMode.Private; case '@': - case '~': return ChatModePictureBox.ChatMode.Global; + case '~': return ChatModePictureBox.ChatMode.Global; case '+': return ChatModePictureBox.ChatMode.Admin; case '\'': return ChatModePictureBox.ChatMode.Group; case '&': return ChatModePictureBox.ChatMode.Guild; diff --git a/EndlessClient/HUD/Chat/ChatNotificationActions.cs b/EndlessClient/HUD/Chat/ChatNotificationActions.cs index 9cc3d0283..525e0cfc2 100644 --- a/EndlessClient/HUD/Chat/ChatNotificationActions.cs +++ b/EndlessClient/HUD/Chat/ChatNotificationActions.cs @@ -108,4 +108,4 @@ public void NotifyServerPing(int timeInMS) _chatRepository.AllChat[ChatTab.Local].Add(chatData); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Chat/ChatPanelTab.cs b/EndlessClient/HUD/Chat/ChatPanelTab.cs index 4af986b75..88bbda614 100644 --- a/EndlessClient/HUD/Chat/ChatPanelTab.cs +++ b/EndlessClient/HUD/Chat/ChatPanelTab.cs @@ -1,4 +1,7 @@ -using EndlessClient.ControlSets; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.ControlSets; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; using EndlessClient.Rendering.Chat; @@ -11,9 +14,6 @@ using MonoGame.Extended.BitmapFonts; using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.HUD.Chat @@ -244,4 +244,4 @@ ChatTab.Private1 or }; } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Chat/IChatModeCalculator.cs b/EndlessClient/HUD/Chat/IChatModeCalculator.cs index 9c7c20875..5ae7f3286 100644 --- a/EndlessClient/HUD/Chat/IChatModeCalculator.cs +++ b/EndlessClient/HUD/Chat/IChatModeCalculator.cs @@ -6,4 +6,4 @@ public interface IChatModeCalculator { ChatModePictureBox.ChatMode CalculateMode(string fullTextString); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Chat/IChatTextBoxActions.cs b/EndlessClient/HUD/Chat/IChatTextBoxActions.cs index 734a443e8..e5c61e4ec 100644 --- a/EndlessClient/HUD/Chat/IChatTextBoxActions.cs +++ b/EndlessClient/HUD/Chat/IChatTextBoxActions.cs @@ -6,4 +6,4 @@ public interface IChatTextBoxActions void FocusChatTextBox(); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Chat/PrivateMessageActions.cs b/EndlessClient/HUD/Chat/PrivateMessageActions.cs index 6b57fe969..47c8e20bc 100644 --- a/EndlessClient/HUD/Chat/PrivateMessageActions.cs +++ b/EndlessClient/HUD/Chat/PrivateMessageActions.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EndlessClient.ControlSets; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; using EOLib.Domain.Character; using EOLib.Domain.Chat; using EOLib.Localization; -using System; namespace EndlessClient.HUD.Chat { diff --git a/EndlessClient/HUD/Chat/ServerMessageHandler.cs b/EndlessClient/HUD/Chat/ServerMessageHandler.cs index 00f409b44..89e66123c 100644 --- a/EndlessClient/HUD/Chat/ServerMessageHandler.cs +++ b/EndlessClient/HUD/Chat/ServerMessageHandler.cs @@ -41,4 +41,4 @@ public interface IServerMessageHandler { void AddServerMessage(string message, SoundEffectID soundEffect = SoundEffectID.ServerMessage, ChatIcon icon = ChatIcon.Exclamation); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Controls/DragCompletedEventArgs.cs b/EndlessClient/HUD/Controls/DragCompletedEventArgs.cs index 5e7d5f497..741bbb32f 100644 --- a/EndlessClient/HUD/Controls/DragCompletedEventArgs.cs +++ b/EndlessClient/HUD/Controls/DragCompletedEventArgs.cs @@ -20,4 +20,4 @@ public DragCompletedEventArgs(TRecord data, bool isChainedDrag) IsChainedDrag = isChainedDrag; } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Controls/DraggablePanelItem.cs b/EndlessClient/HUD/Controls/DraggablePanelItem.cs index 33c5c0886..d9c9427e5 100644 --- a/EndlessClient/HUD/Controls/DraggablePanelItem.cs +++ b/EndlessClient/HUD/Controls/DraggablePanelItem.cs @@ -1,7 +1,7 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; -using System; using XNAControls; namespace EndlessClient.HUD.Controls @@ -132,4 +132,4 @@ private void StopDragging(MouseEventArgs mouseEventArgs) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Controls/HudBackgroundFrame.cs b/EndlessClient/HUD/Controls/HudBackgroundFrame.cs index 728acbc9d..c9dde9fd6 100644 --- a/EndlessClient/HUD/Controls/HudBackgroundFrame.cs +++ b/EndlessClient/HUD/Controls/HudBackgroundFrame.cs @@ -68,4 +68,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Controls/HudControlIdentifier.cs b/EndlessClient/HUD/Controls/HudControlIdentifier.cs index bd1938bc2..19824f396 100644 --- a/EndlessClient/HUD/Controls/HudControlIdentifier.cs +++ b/EndlessClient/HUD/Controls/HudControlIdentifier.cs @@ -39,7 +39,7 @@ public enum HudControlIdentifier PartyPanel, MacroButton, - + SettingsButton, SettingsPanel, @@ -78,4 +78,4 @@ public enum HudControlIdentifier PreviousUserInputTracker = Int32.MaxValue, //this should always be last! } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Controls/HudControlsFactory.cs b/EndlessClient/HUD/Controls/HudControlsFactory.cs index 4d522d28e..556b96917 100644 --- a/EndlessClient/HUD/Controls/HudControlsFactory.cs +++ b/EndlessClient/HUD/Controls/HudControlsFactory.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Content; using EndlessClient.Controllers; @@ -26,9 +29,6 @@ using EOLib.Graphics; using EOLib.Localization; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.HUD.Controls @@ -253,11 +253,11 @@ private IXNAButton CreateStateChangeButton(InGameStates whichState) { if (whichState == InGameStates.News) throw new ArgumentOutOfRangeException(nameof(whichState), "News state does not have a button associated with it"); - var buttonIndex = (int) whichState; + var buttonIndex = (int)whichState; var mainButtonTexture = _nativeGraphicsManager.TextureFromResource(GFXTypes.PostLoginUI, 25); - var widthDelta = mainButtonTexture.Width/2; - var heightDelta = mainButtonTexture.Height/11; + var widthDelta = mainButtonTexture.Width / 2; + var heightDelta = mainButtonTexture.Height / 11; IXNAButton retButton; if (!_clientWindowSizeRepository.Resizable) @@ -359,7 +359,7 @@ private void DoHudStateChangeClick(InGameStates whichState) case InGameStates.ViewMapToggle: _hudButtonController.ClickViewMapToggle(); break; case InGameStates.ActiveSpells: _hudButtonController.ClickActiveSpells(); break; case InGameStates.PassiveSpells: _hudButtonController.ClickPassiveSpells(); break; - case InGameStates.Chat: + case InGameStates.Chat: _hudButtonController.ClickChat(); _statusLabelSetter.SetStatusLabel(EOResourceID.STATUS_LABEL_TYPE_ACTION, EOResourceID.STATUS_LABEL_CHAT_PANEL_NOW_VIEWED); break; diff --git a/EndlessClient/HUD/Controls/IDraggableItemContainer.cs b/EndlessClient/HUD/Controls/IDraggableItemContainer.cs index c2387a469..39713bef4 100644 --- a/EndlessClient/HUD/Controls/IDraggableItemContainer.cs +++ b/EndlessClient/HUD/Controls/IDraggableItemContainer.cs @@ -6,4 +6,4 @@ public interface IDraggableItemContainer : IXNAControl { bool NoItemsDragging(); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Controls/IHudControlsFactory.cs b/EndlessClient/HUD/Controls/IHudControlsFactory.cs index 2b7c2d115..c35fb7fd7 100644 --- a/EndlessClient/HUD/Controls/IHudControlsFactory.cs +++ b/EndlessClient/HUD/Controls/IHudControlsFactory.cs @@ -10,4 +10,4 @@ public interface IHudControlsFactory IReadOnlyDictionary CreateHud(); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Controls/PeriodicStatUpdaterComponent.cs b/EndlessClient/HUD/Controls/PeriodicStatUpdaterComponent.cs index e437a3c12..ba50ec3ca 100644 --- a/EndlessClient/HUD/Controls/PeriodicStatUpdaterComponent.cs +++ b/EndlessClient/HUD/Controls/PeriodicStatUpdaterComponent.cs @@ -69,4 +69,4 @@ public override void Update(GameTime gameTime) base.Update(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/IHudButtonController.cs b/EndlessClient/HUD/IHudButtonController.cs index acf078f09..47a5e8ad8 100644 --- a/EndlessClient/HUD/IHudButtonController.cs +++ b/EndlessClient/HUD/IHudButtonController.cs @@ -32,4 +32,4 @@ public interface IHudButtonController void ClickQuestStatus(); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/IHudStateActions.cs b/EndlessClient/HUD/IHudStateActions.cs index 755e063bd..83e06dba3 100644 --- a/EndlessClient/HUD/IHudStateActions.cs +++ b/EndlessClient/HUD/IHudStateActions.cs @@ -3,7 +3,7 @@ public interface IHudStateActions { void SwitchToState(InGameStates newState); - + void ToggleMapView(); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/IStatusLabelSetter.cs b/EndlessClient/HUD/IStatusLabelSetter.cs index 8f6b3aa59..b28839090 100644 --- a/EndlessClient/HUD/IStatusLabelSetter.cs +++ b/EndlessClient/HUD/IStatusLabelSetter.cs @@ -13,4 +13,4 @@ public interface IStatusLabelSetter : IStatusLabelNotifier void SetStatusLabel(string text); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/IStatusLabelTextRepository.cs b/EndlessClient/HUD/IStatusLabelTextRepository.cs index 6b0ee57bd..12f17f9c3 100644 --- a/EndlessClient/HUD/IStatusLabelTextRepository.cs +++ b/EndlessClient/HUD/IStatusLabelTextRepository.cs @@ -31,4 +31,4 @@ public StatusLabelTextRepository() SetTime = DateTime.Now; } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Inventory/InventoryPanelItem.cs b/EndlessClient/HUD/Inventory/InventoryPanelItem.cs index eb9b75a88..50e38a9e8 100644 --- a/EndlessClient/HUD/Inventory/InventoryPanelItem.cs +++ b/EndlessClient/HUD/Inventory/InventoryPanelItem.cs @@ -1,4 +1,5 @@ -using EndlessClient.Audio; +using System; +using EndlessClient.Audio; using EndlessClient.Dialogs; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; @@ -12,7 +13,6 @@ using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; using XNAControls; namespace EndlessClient.HUD.Inventory @@ -56,7 +56,7 @@ public string Text public event EventHandler DoubleClick; public override Rectangle EventArea => IsDragging ? DrawArea : DrawAreaWithParentOffset; - + // uses absolute coordinates protected override Rectangle GridArea => new Rectangle( _parentContainer.DrawPositionWithParentOffset.ToPoint() + new Point(12, 8), @@ -232,4 +232,4 @@ private static Vector2 GetPosition(int slot) return new Vector2(13 + 26 * (slot % InventoryPanel.InventoryRowSlots), 9 + 26 * (slot / InventoryPanel.InventoryRowSlots)); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Inventory/InventoryService.cs b/EndlessClient/HUD/Inventory/InventoryService.cs index f111b8af1..5ca5fdb59 100644 --- a/EndlessClient/HUD/Inventory/InventoryService.cs +++ b/EndlessClient/HUD/Inventory/InventoryService.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.HUD.Panels; using EOLib.IO; using EOLib.IO.Extensions; using Optional; -using System.Collections.Generic; namespace EndlessClient.HUD.Inventory { @@ -110,4 +110,4 @@ public interface IInventoryService bool FitsInSlot(bool[,] usedSlots, int newSlot, ItemSize size); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Inventory/InventorySlotRepository.cs b/EndlessClient/HUD/Inventory/InventorySlotRepository.cs index b3da1b47a..88a8d798b 100644 --- a/EndlessClient/HUD/Inventory/InventorySlotRepository.cs +++ b/EndlessClient/HUD/Inventory/InventorySlotRepository.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.HUD.Panels; using EOLib; using EOLib.IO.Map; -using System.Collections.Generic; namespace EndlessClient.HUD.Inventory { @@ -42,4 +42,4 @@ public void ResetState() SlotMap = new Dictionary(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Inventory/InventorySpaceValidator.cs b/EndlessClient/HUD/Inventory/InventorySpaceValidator.cs index 66f4e2a55..d30e8a184 100644 --- a/EndlessClient/HUD/Inventory/InventorySpaceValidator.cs +++ b/EndlessClient/HUD/Inventory/InventorySpaceValidator.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Map; using EOLib.IO; @@ -6,8 +8,6 @@ using EOLib.IO.Repositories; using Optional; using Optional.Collections; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.HUD.Inventory { @@ -86,4 +86,4 @@ public interface IInventorySpaceValidator bool ItemsFit(IReadOnlyList outItems, IReadOnlyList inItems); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/ItemNameColorService.cs b/EndlessClient/HUD/ItemNameColorService.cs index d37a3217c..c41fe4a20 100644 --- a/EndlessClient/HUD/ItemNameColorService.cs +++ b/EndlessClient/HUD/ItemNameColorService.cs @@ -34,4 +34,4 @@ public interface IItemNameColorService Color GetColorForInventoryDisplay(EIFRecord itemData); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs b/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs index 0178d79ef..feddf2936 100644 --- a/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs +++ b/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs @@ -1,4 +1,10 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using EndlessClient.Audio; using EndlessClient.Controllers; using EndlessClient.ControlSets; using EndlessClient.Dialogs; @@ -22,14 +28,7 @@ using MonoGame.Extended.Input; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; using XNAControls; - using static EndlessClient.HUD.Spells.SpellPanelItem; namespace EndlessClient.HUD.Panels diff --git a/EndlessClient/HUD/Panels/DraggableHudPanel.cs b/EndlessClient/HUD/Panels/DraggableHudPanel.cs index e33c7bb96..c689fb513 100644 --- a/EndlessClient/HUD/Panels/DraggableHudPanel.cs +++ b/EndlessClient/HUD/Panels/DraggableHudPanel.cs @@ -1,7 +1,7 @@ -using EndlessClient.Rendering; +using System; +using EndlessClient.Rendering; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; using XNAControls; namespace EndlessClient.HUD.Panels @@ -63,4 +63,4 @@ protected override bool HandleDragEnd(IXNAControl control, MouseEventArgs eventA return true; } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Panels/HudPanelFactory.cs b/EndlessClient/HUD/Panels/HudPanelFactory.cs index 0f89149e7..0a1f045de 100644 --- a/EndlessClient/HUD/Panels/HudPanelFactory.cs +++ b/EndlessClient/HUD/Panels/HudPanelFactory.cs @@ -134,7 +134,8 @@ public NewsPanel CreateNewsPanel() new ChatRenderableGenerator(_nativeGraphicsManager, _friendIgnoreListService, chatFont), _newsProvider, chatFont, - _clientWindowSizeProvider) { DrawOrder = HUD_CONTROL_LAYER }; + _clientWindowSizeProvider) + { DrawOrder = HUD_CONTROL_LAYER }; } public InventoryPanel CreateInventoryPanel() @@ -154,7 +155,8 @@ public InventoryPanel CreateInventoryPanel() _activeDialogProvider, _sfxPlayer, _configurationProvider, - _clientWindowSizeProvider) { DrawOrder = HUD_CONTROL_LAYER }; + _clientWindowSizeProvider) + { DrawOrder = HUD_CONTROL_LAYER }; } public ActiveSpellsPanel CreateActiveSpellsPanel() @@ -171,7 +173,8 @@ public ActiveSpellsPanel CreateActiveSpellsPanel() _hudControlProvider, _sfxPlayer, _configurationProvider, - _clientWindowSizeProvider) { DrawOrder = HUD_CONTROL_LAYER }; + _clientWindowSizeProvider) + { DrawOrder = HUD_CONTROL_LAYER }; } public PassiveSpellsPanel CreatePassiveSpellsPanel() @@ -189,7 +192,8 @@ public ChatPanel CreateChatPanel() _chatProvider, _hudControlProvider, chatFont, - _clientWindowSizeProvider) { DrawOrder = HUD_CONTROL_LAYER }; + _clientWindowSizeProvider) + { DrawOrder = HUD_CONTROL_LAYER }; } public StatsPanel CreateStatsPanel() @@ -200,7 +204,8 @@ public StatsPanel CreateStatsPanel() _experienceTableProvider, _messageBoxFactory, _trainingController, - _clientWindowSizeProvider) { DrawOrder = HUD_CONTROL_LAYER }; + _clientWindowSizeProvider) + { DrawOrder = HUD_CONTROL_LAYER }; } public OnlineListPanel CreateOnlineListPanel() @@ -224,7 +229,8 @@ public SettingsPanel CreateSettingsPanel() _messageBoxFactory, _configurationRepository, _sfxPlayer, - _clientWindowSizeProvider) { DrawOrder = HUD_CONTROL_LAYER }; + _clientWindowSizeProvider) + { DrawOrder = HUD_CONTROL_LAYER }; } public HelpPanel CreateHelpPanel() diff --git a/EndlessClient/HUD/Panels/IHudPanel.cs b/EndlessClient/HUD/Panels/IHudPanel.cs index 8e915163a..afd13c118 100644 --- a/EndlessClient/HUD/Panels/IHudPanel.cs +++ b/EndlessClient/HUD/Panels/IHudPanel.cs @@ -1,5 +1,5 @@ -using Microsoft.Xna.Framework; -using System; +using System; +using Microsoft.Xna.Framework; using XNAControls; namespace EndlessClient.HUD.Panels @@ -20,4 +20,4 @@ public interface IHudPanel : IGameComponent event Action DragCompleted; } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Panels/IHudPanelFactory.cs b/EndlessClient/HUD/Panels/IHudPanelFactory.cs index 04f1a847d..eec471e9d 100644 --- a/EndlessClient/HUD/Panels/IHudPanelFactory.cs +++ b/EndlessClient/HUD/Panels/IHudPanelFactory.cs @@ -22,4 +22,4 @@ public interface IHudPanelFactory HelpPanel CreateHelpPanel(); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Panels/InventoryPanel.cs b/EndlessClient/HUD/Panels/InventoryPanel.cs index b2956f8b7..f3c9d9e8c 100644 --- a/EndlessClient/HUD/Panels/InventoryPanel.cs +++ b/EndlessClient/HUD/Panels/InventoryPanel.cs @@ -1,4 +1,10 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Runtime.Versioning; +using EndlessClient.Audio; using EndlessClient.Controllers; using EndlessClient.ControlSets; using EndlessClient.Dialogs; @@ -24,12 +30,6 @@ using MonoGame.Extended.Input; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Runtime.Versioning; using XNAControls; namespace EndlessClient.HUD.Panels @@ -565,4 +565,4 @@ private static IEnumerable GetOverlappingTakenSlots(int newSlot, ItemSize s } } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Panels/NewsPanel.cs b/EndlessClient/HUD/Panels/NewsPanel.cs index 1a0e51cea..474c7f163 100644 --- a/EndlessClient/HUD/Panels/NewsPanel.cs +++ b/EndlessClient/HUD/Panels/NewsPanel.cs @@ -1,14 +1,14 @@ -using EndlessClient.Rendering.Chat; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Rendering; +using EndlessClient.Rendering.Chat; using EndlessClient.UIControls; using EOLib.Domain.Login; using EOLib.Graphics; using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.BitmapFonts; using XNAControls; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using System.Linq; -using EndlessClient.Rendering; namespace EndlessClient.HUD.Panels { @@ -129,4 +129,4 @@ private void SetupRenderablesFromCachedValues(IReadOnlyList ren _scrollBar.UpdateDimensions(renderables.Count); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Panels/OnlineListPanel.cs b/EndlessClient/HUD/Panels/OnlineListPanel.cs index d58d9c7bc..d49f9b6d1 100644 --- a/EndlessClient/HUD/Panels/OnlineListPanel.cs +++ b/EndlessClient/HUD/Panels/OnlineListPanel.cs @@ -1,4 +1,7 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.HUD.Controls; using EndlessClient.Rendering; @@ -16,9 +19,6 @@ using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; using Optional.Unsafe; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.HUD.Panels @@ -130,7 +130,7 @@ protected override void OnUpdateControl(GameTime gameTime) if (!_cachedList.SetEquals(_onlinePlayerProvider.OnlinePlayers)) { _cachedList = _onlinePlayerProvider.OnlinePlayers.ToHashSet(); - + // keep the friends list data from overriding the displayed data in this panel // it will be friends list data if all titles (or any field other than name) are empty if (!_cachedList.All(x => x.Title == string.Empty)) @@ -217,7 +217,7 @@ private void ApplyFilter() { case Filter.Friends: _filteredList = _onlineList.Where(x => _friendList.Contains(x.Name, StringComparer.InvariantCultureIgnoreCase)).ToList(); break; case Filter.Admins: _filteredList = _onlineList.Where(IsAdminIcon).ToList(); break; - case Filter.Party: _filteredList = _onlineList.Where(x => _partyDataProvider.Members.Any(y => string.Equals(y.Name, x.Name, StringComparison.InvariantCultureIgnoreCase))).ToList(); break; + case Filter.Party: _filteredList = _onlineList.Where(x => _partyDataProvider.Members.Any(y => string.Equals(y.Name, x.Name, StringComparison.InvariantCultureIgnoreCase))).ToList(); break; case Filter.All: default: _filteredList = new List(_onlineList); break; } diff --git a/EndlessClient/HUD/Panels/PartyPanel.cs b/EndlessClient/HUD/Panels/PartyPanel.cs index 40bc1a4ea..06d0d9de7 100644 --- a/EndlessClient/HUD/Panels/PartyPanel.cs +++ b/EndlessClient/HUD/Panels/PartyPanel.cs @@ -1,4 +1,6 @@ -using EndlessClient.Content; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Content; using EndlessClient.HUD.Party; using EndlessClient.Rendering; using EndlessClient.UIControls; @@ -8,8 +10,6 @@ using EOLib.Graphics; using Microsoft.Xna.Framework; using Optional.Collections; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.HUD.Panels diff --git a/EndlessClient/HUD/Panels/SettingsPanel.cs b/EndlessClient/HUD/Panels/SettingsPanel.cs index c459144dc..0dc86b5d7 100644 --- a/EndlessClient/HUD/Panels/SettingsPanel.cs +++ b/EndlessClient/HUD/Panels/SettingsPanel.cs @@ -1,4 +1,7 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Audio; using EndlessClient.Dialogs; using EndlessClient.Dialogs.Factories; using EndlessClient.Rendering; @@ -8,9 +11,6 @@ using EOLib.Graphics; using EOLib.Localization; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.HUD.Panels diff --git a/EndlessClient/HUD/Panels/StatsPanel.cs b/EndlessClient/HUD/Panels/StatsPanel.cs index cdb3d288e..828038b6d 100644 --- a/EndlessClient/HUD/Panels/StatsPanel.cs +++ b/EndlessClient/HUD/Panels/StatsPanel.cs @@ -73,11 +73,11 @@ public StatsPanel(INativeGraphicsManager nativeGraphicsManager, ForeColor = ColorConstants.LightGrayText, AutoSize = false, Text = "", - DrawArea = new Rectangle(50, 8 + i*18, 73, 13) + DrawArea = new Rectangle(50, 8 + i * 18, 73, 13) }; _arrowButtons[i] = new XNAButton(buttonTexture, - new Vector2(106, 7 + i*18), + new Vector2(106, 7 + i * 18), outTextureArea, overTextureArea) { @@ -100,8 +100,8 @@ public StatsPanel(INativeGraphicsManager nativeGraphicsManager, for (int i = 0; i < _otherInfo.Length; ++i) { var drawArea = i < 4 - ? new Rectangle(280, 44 + i%4*18, 60, 13) - : new Rectangle(379, 44 + i%4*18, 94, 13); + ? new Rectangle(280, 44 + i % 4 * 18, 60, 13) + : new Rectangle(379, 44 + i % 4 * 18, 94, 13); _otherInfo[i] = new XNALabel(Constants.FontSize08pt5) { @@ -223,7 +223,7 @@ private void HandleArrowButtonClick(object sender, EventArgs e) } else { - var index = _arrowButtons.Select((btn, ndx) => new {btn, ndx}) + var index = _arrowButtons.Select((btn, ndx) => new { btn, ndx }) .Single(x => x.btn == sender).ndx; var characterStat = CharacterStat.Strength + index; _trainingController.AddStatPoint(characterStat); diff --git a/EndlessClient/HUD/Party/PartyPanelMember.cs b/EndlessClient/HUD/Party/PartyPanelMember.cs index 372e29df4..c6d5ac8dc 100644 --- a/EndlessClient/HUD/Party/PartyPanelMember.cs +++ b/EndlessClient/HUD/Party/PartyPanelMember.cs @@ -1,4 +1,5 @@ -using EndlessClient.Content; +using System; +using EndlessClient.Content; using EOLib; using EOLib.Domain.Chat; using EOLib.Domain.Party; @@ -6,7 +7,6 @@ using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; using XNAControls; namespace EndlessClient.HUD.Party @@ -94,7 +94,7 @@ public PartyPanelMember(INativeGraphicsManager nativeGraphicsManager, { DrawPosition = new Vector2(205, 0), AutoSize = true, - ForeColor= Color.Black, + ForeColor = Color.Black, Text = "HP" }; _hpLabel.SetParentControl(this); @@ -132,4 +132,4 @@ protected override void OnDrawControl(GameTime gameTime) base.OnDrawControl(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Spells/SpellPanelItem.cs b/EndlessClient/HUD/Spells/SpellPanelItem.cs index b3fe8afa2..88ddf3dd4 100644 --- a/EndlessClient/HUD/Spells/SpellPanelItem.cs +++ b/EndlessClient/HUD/Spells/SpellPanelItem.cs @@ -1,4 +1,5 @@ -using EndlessClient.Audio; +using System; +using EndlessClient.Audio; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Panels; using EOLib.Domain.Character; @@ -8,7 +9,6 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MonoGame.Extended.Input.InputListeners; -using System; using XNAControls; namespace EndlessClient.HUD.Spells @@ -33,7 +33,7 @@ public int DisplaySlot set { _displaySlot = value; - DrawPosition = GetDisplayPosition(_displaySlot); + DrawPosition = GetDisplayPosition(_displaySlot); } } @@ -196,4 +196,4 @@ private static Vector2 GetDisplayPosition(int slot) return new Vector2(101 + col * 45, 9 + row * 52); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Spells/SpellSelectActions.cs b/EndlessClient/HUD/Spells/SpellSelectActions.cs index 0c01ea633..0e70a4dd6 100644 --- a/EndlessClient/HUD/Spells/SpellSelectActions.cs +++ b/EndlessClient/HUD/Spells/SpellSelectActions.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Party; using EOLib.IO.Repositories; using EOLib.Localization; using Optional; -using System.Linq; namespace EndlessClient.HUD.Spells { @@ -58,4 +58,4 @@ public interface ISpellSelectActions { void SelectSpellBySlot(int slot); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/Spells/SpellSlotDataRepository.cs b/EndlessClient/HUD/Spells/SpellSlotDataRepository.cs index a477c05c8..46aa93c3d 100644 --- a/EndlessClient/HUD/Spells/SpellSlotDataRepository.cs +++ b/EndlessClient/HUD/Spells/SpellSlotDataRepository.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.HUD.Panels; using EOLib.Domain.Character; using Optional; -using System.Collections.Generic; namespace EndlessClient.HUD.Spells { @@ -63,4 +63,4 @@ public SpellSlotDataRepository() SpellSlots = new Option[ActiveSpellsPanel.SpellRows * ActiveSpellsPanel.SpellRowLength]; } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/StatusBars/HPStatusBar.cs b/EndlessClient/HUD/StatusBars/HPStatusBar.cs index cea877923..fb573b92a 100644 --- a/EndlessClient/HUD/StatusBars/HPStatusBar.cs +++ b/EndlessClient/HUD/StatusBars/HPStatusBar.cs @@ -1,8 +1,8 @@ -using EndlessClient.Rendering; +using System; +using EndlessClient.Rendering; using EOLib.Domain.Character; using EOLib.Graphics; using Microsoft.Xna.Framework; -using System; namespace EndlessClient.HUD.StatusBars { @@ -36,4 +36,4 @@ protected override void DrawStatusBar() _spriteBatch.End(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/StatusBars/SPStatusBar.cs b/EndlessClient/HUD/StatusBars/SPStatusBar.cs index e02d50091..aeaa364f7 100644 --- a/EndlessClient/HUD/StatusBars/SPStatusBar.cs +++ b/EndlessClient/HUD/StatusBars/SPStatusBar.cs @@ -1,8 +1,8 @@ -using EndlessClient.Rendering; +using System; +using EndlessClient.Rendering; using EOLib.Domain.Character; using EOLib.Graphics; using Microsoft.Xna.Framework; -using System; namespace EndlessClient.HUD.StatusBars { @@ -37,4 +37,4 @@ protected override void DrawStatusBar() _spriteBatch.End(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/StatusBars/StatusBarBase.cs b/EndlessClient/HUD/StatusBars/StatusBarBase.cs index 1260140a4..7035fe01d 100644 --- a/EndlessClient/HUD/StatusBars/StatusBarBase.cs +++ b/EndlessClient/HUD/StatusBars/StatusBarBase.cs @@ -1,4 +1,5 @@ -using EndlessClient.Rendering; +using System; +using EndlessClient.Rendering; using EOLib; using EOLib.Domain.Character; using EOLib.Graphics; @@ -6,7 +7,6 @@ using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; using XNAControls; namespace EndlessClient.HUD.StatusBars @@ -121,4 +121,4 @@ protected void ChangeStatusBarPosition() /// private static Rectangle DropDownSourceRectangle => new Rectangle(220, 30, 110, 21); } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/StatusBars/TNLStatusBar.cs b/EndlessClient/HUD/StatusBars/TNLStatusBar.cs index 5915d3e5e..26e9c0ba7 100644 --- a/EndlessClient/HUD/StatusBars/TNLStatusBar.cs +++ b/EndlessClient/HUD/StatusBars/TNLStatusBar.cs @@ -23,7 +23,7 @@ public TNLStatusBar(INativeGraphicsManager nativeGraphicsManager, _experienceTableProvider = experienceTableProvider; DrawArea = new Rectangle(430, 0, _sourceRectangleArea.Width, _sourceRectangleArea.Height); - _sourceRectangleArea = new Rectangle(_sourceRectangleArea.Width*3 - 1, + _sourceRectangleArea = new Rectangle(_sourceRectangleArea.Width * 3 - 1, 0, _sourceRectangleArea.Width + 1, _sourceRectangleArea.Height); @@ -51,4 +51,4 @@ protected override void DrawStatusBar() private IReadOnlyList ExpTable => _experienceTableProvider.ExperienceByLevel; } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/StatusBars/TPStatusBar.cs b/EndlessClient/HUD/StatusBars/TPStatusBar.cs index 3e88aac8a..2fe98f293 100644 --- a/EndlessClient/HUD/StatusBars/TPStatusBar.cs +++ b/EndlessClient/HUD/StatusBars/TPStatusBar.cs @@ -38,4 +38,4 @@ protected override void DrawStatusBar() _spriteBatch.End(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/HUD/UserInterfaceActions.cs b/EndlessClient/HUD/UserInterfaceActions.cs index 9fe7de27d..7eb59f115 100644 --- a/EndlessClient/HUD/UserInterfaceActions.cs +++ b/EndlessClient/HUD/UserInterfaceActions.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Dialogs.Actions; using EOLib.Domain.Character; using EOLib.Domain.Map; @@ -6,9 +9,6 @@ using EOLib.IO.Repositories; using EOLib.Localization; using Moffat.EndlessOnline.SDK.Protocol.Net; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.HUD { @@ -102,4 +102,4 @@ public void NotifyCharacterInventory(string name, int usage, int gold, IReadOnly _inGameDialogActions.ShowKeyValueMessageDialog(title, messages); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Initialization/ConfigInitializer.cs b/EndlessClient/Initialization/ConfigInitializer.cs index 83defdf85..3610a8654 100644 --- a/EndlessClient/Initialization/ConfigInitializer.cs +++ b/EndlessClient/Initialization/ConfigInitializer.cs @@ -18,4 +18,4 @@ public void Initialize() _configFileLoadActions.LoadConfigFile(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Initialization/EndlessClientInitializer.cs b/EndlessClient/Initialization/EndlessClientInitializer.cs index 4bd7b6e21..feda3c023 100644 --- a/EndlessClient/Initialization/EndlessClientInitializer.cs +++ b/EndlessClient/Initialization/EndlessClientInitializer.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Content; using EndlessClient.Controllers; using EndlessClient.ControlSets; @@ -8,7 +9,6 @@ using EndlessClient.UIControls; using Microsoft.Xna.Framework; using MonoGame.Extended.Input.InputListeners; -using System.Collections.Generic; using XNAControls; using XNAControls.Input; @@ -96,4 +96,4 @@ public void Initialize() _paperdollDialogFactory.InjectInventoryController(_inventoryController); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Initialization/GraphicsInitializer.cs b/EndlessClient/Initialization/GraphicsInitializer.cs index 06bf931fe..5d297de3c 100644 --- a/EndlessClient/Initialization/GraphicsInitializer.cs +++ b/EndlessClient/Initialization/GraphicsInitializer.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; +using System.IO; +using AutomaticTypeMapper; using EOLib.Graphics; using PELoaderLib; -using System.IO; namespace EndlessClient.Initialization { @@ -40,4 +40,4 @@ private static void TryInitializePEFiles(GFXTypes file, IPEFile peFile) throw new LibraryLoadException(number, file); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Initialization/IGameInitializer.cs b/EndlessClient/Initialization/IGameInitializer.cs index 3ac14a51d..7bddf1ae9 100644 --- a/EndlessClient/Initialization/IGameInitializer.cs +++ b/EndlessClient/Initialization/IGameInitializer.cs @@ -4,4 +4,4 @@ public interface IGameInitializer { void Initialize(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Initialization/LocalizationInitializer.cs b/EndlessClient/Initialization/LocalizationInitializer.cs index b08492391..72f96ae48 100644 --- a/EndlessClient/Initialization/LocalizationInitializer.cs +++ b/EndlessClient/Initialization/LocalizationInitializer.cs @@ -18,4 +18,4 @@ public void Initialize() _dataFileLoadActions.LoadDataFiles(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/ArrowKeyHandler.cs b/EndlessClient/Input/ArrowKeyHandler.cs index c425ef8e8..c4aac0903 100644 --- a/EndlessClient/Input/ArrowKeyHandler.cs +++ b/EndlessClient/Input/ArrowKeyHandler.cs @@ -37,4 +37,4 @@ protected override Option HandleInput() return Option.None(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/ControlKeyHandler.cs b/EndlessClient/Input/ControlKeyHandler.cs index 270ecea55..d0e51f4f1 100644 --- a/EndlessClient/Input/ControlKeyHandler.cs +++ b/EndlessClient/Input/ControlKeyHandler.cs @@ -30,4 +30,4 @@ protected override Option HandleInput() return Option.None(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/CurrentUserInputTracker.cs b/EndlessClient/Input/CurrentUserInputTracker.cs index 5f7e929ad..f09bb9f5e 100644 --- a/EndlessClient/Input/CurrentUserInputTracker.cs +++ b/EndlessClient/Input/CurrentUserInputTracker.cs @@ -26,4 +26,4 @@ public override void Update(GameTime gameTime) base.Update(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/FunctionKeyHandler.cs b/EndlessClient/Input/FunctionKeyHandler.cs index 18d692bee..e0a1de145 100644 --- a/EndlessClient/Input/FunctionKeyHandler.cs +++ b/EndlessClient/Input/FunctionKeyHandler.cs @@ -41,4 +41,4 @@ protected override Option HandleInput() return Option.None(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/IUserInputRepository.cs b/EndlessClient/Input/IUserInputRepository.cs index 127b912f3..8382d233a 100644 --- a/EndlessClient/Input/IUserInputRepository.cs +++ b/EndlessClient/Input/IUserInputRepository.cs @@ -37,4 +37,4 @@ public class KeyStateRepository : IUserInputRepository, IUserInputProvider public MouseState CurrentMouseState { get; set; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/IUserInputTimeRepository.cs b/EndlessClient/Input/IUserInputTimeRepository.cs index 5f8c6c4da..a6b950047 100644 --- a/EndlessClient/Input/IUserInputTimeRepository.cs +++ b/EndlessClient/Input/IUserInputTimeRepository.cs @@ -23,4 +23,4 @@ public UserInputTimeRepository() LastInputTime = DateTime.Now; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/InputHandlerBase.cs b/EndlessClient/Input/InputHandlerBase.cs index e93648ddd..f86cf5eef 100644 --- a/EndlessClient/Input/InputHandlerBase.cs +++ b/EndlessClient/Input/InputHandlerBase.cs @@ -1,9 +1,9 @@ -using EndlessClient.GameExecution; +using System; +using System.Linq; +using EndlessClient.GameExecution; using EOLib.Domain.Map; using Microsoft.Xna.Framework.Input; using Optional; -using System; -using System.Linq; namespace EndlessClient.Input { diff --git a/EndlessClient/Input/KeyboardStateExtensions.cs b/EndlessClient/Input/KeyboardStateExtensions.cs index 55d97415d..977060c9b 100644 --- a/EndlessClient/Input/KeyboardStateExtensions.cs +++ b/EndlessClient/Input/KeyboardStateExtensions.cs @@ -28,4 +28,4 @@ public static bool IsKeyPressedOnce(this KeyboardState keyState, KeyboardState p return previousKeyState.IsKeyDown(key) && keyState.IsKeyUp(key); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/NumPadHandler.cs b/EndlessClient/Input/NumPadHandler.cs index 8a9bae140..44c490bd6 100644 --- a/EndlessClient/Input/NumPadHandler.cs +++ b/EndlessClient/Input/NumPadHandler.cs @@ -44,4 +44,4 @@ protected override Option HandleInput() return Option.None(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/PanelShortcutHandler.cs b/EndlessClient/Input/PanelShortcutHandler.cs index 390fa0e70..316b9f598 100644 --- a/EndlessClient/Input/PanelShortcutHandler.cs +++ b/EndlessClient/Input/PanelShortcutHandler.cs @@ -1,9 +1,9 @@ -using EndlessClient.GameExecution; +using System.Linq; +using EndlessClient.GameExecution; using EndlessClient.HUD; using EOLib.Domain.Map; using Microsoft.Xna.Framework.Input; using Optional; -using System.Linq; namespace EndlessClient.Input { @@ -45,7 +45,7 @@ protected override Option HandleInput() case Keys.D7: _hudButtonController.ClickOnlineList(); break; case Keys.D8: _hudButtonController.ClickParty(); break; - // macro: intentionally not implemented + // macro: intentionally not implemented case Keys.D9: _hudButtonController.ClickSettings(); break; case Keys.D0: _hudButtonController.ClickHelp(); break; } @@ -57,4 +57,4 @@ protected override Option HandleInput() return Option.None(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/PreviousUserInputTracker.cs b/EndlessClient/Input/PreviousUserInputTracker.cs index fe128f5a6..d157bc31c 100644 --- a/EndlessClient/Input/PreviousUserInputTracker.cs +++ b/EndlessClient/Input/PreviousUserInputTracker.cs @@ -24,4 +24,4 @@ public override void Update(GameTime gameTime) base.Update(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/UnwalkableTileActions.cs b/EndlessClient/Input/UnwalkableTileActions.cs index 6aced669e..b1dc20da0 100644 --- a/EndlessClient/Input/UnwalkableTileActions.cs +++ b/EndlessClient/Input/UnwalkableTileActions.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Dialogs.Factories; using EndlessClient.HUD; @@ -7,7 +8,6 @@ using EOLib.Domain.Map; using EOLib.IO.Map; using EOLib.Localization; -using System.Collections.Generic; namespace EndlessClient.Input { @@ -177,4 +177,4 @@ public interface IUnwalkableTileActions IReadOnlyList GetUnwalkableTileActions(IMapCellState mapCellState); } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/UnwalkableTileActionsHandler.cs b/EndlessClient/Input/UnwalkableTileActionsHandler.cs index 0f261fe57..9669a2642 100644 --- a/EndlessClient/Input/UnwalkableTileActionsHandler.cs +++ b/EndlessClient/Input/UnwalkableTileActionsHandler.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Dialogs.Actions; using EOLib.Domain.Character; using EOLib.Domain.Map; -using System.Collections.Generic; namespace EndlessClient.Input { @@ -59,4 +59,4 @@ public interface IUnwalkableTileActionsHandler { void HandleUnwalkableTileActions(IReadOnlyList unwalkableActions, IMapCellState cellState); } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/UserInputHandler.cs b/EndlessClient/Input/UserInputHandler.cs index c69c03cc7..03bd64adb 100644 --- a/EndlessClient/Input/UserInputHandler.cs +++ b/EndlessClient/Input/UserInputHandler.cs @@ -1,13 +1,13 @@ -using EndlessClient.Controllers; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Controllers; using EndlessClient.Dialogs; using EndlessClient.GameExecution; using EndlessClient.HUD; using EndlessClient.Rendering; using EOLib.Domain.Map; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Input @@ -78,4 +78,4 @@ protected override void OnUpdateControl(GameTime gameTime) public interface IUserInputHandler : IGameComponent { } -} +} \ No newline at end of file diff --git a/EndlessClient/Input/UserInputHandlerFactory.cs b/EndlessClient/Input/UserInputHandlerFactory.cs index 3cbc3b809..0b7a37162 100644 --- a/EndlessClient/Input/UserInputHandlerFactory.cs +++ b/EndlessClient/Input/UserInputHandlerFactory.cs @@ -68,4 +68,4 @@ public interface IUserInputHandlerFactory { IUserInputHandler CreateUserInputHandler(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Network/PacketHandlerGameComponent.cs b/EndlessClient/Network/PacketHandlerGameComponent.cs index 57051d0db..cce3832a4 100644 --- a/EndlessClient/Network/PacketHandlerGameComponent.cs +++ b/EndlessClient/Network/PacketHandlerGameComponent.cs @@ -21,7 +21,7 @@ public PacketHandlerGameComponent(IEndlessGame game, INetworkClientProvider networkClientProvider, IBackgroundReceiveTaskRepository backgroundReceiveTaskRepository, IMainButtonController mainButtonController) - : base((Game) game) + : base((Game)game) { _packetHandler = packetHandler; _networkClientProvider = networkClientProvider; @@ -49,4 +49,4 @@ public override void Update(GameTime gameTime) base.Update(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Network/UnknownEntitiesRequester.cs b/EndlessClient/Network/UnknownEntitiesRequester.cs index 21ddb08ba..0378835d8 100644 --- a/EndlessClient/Network/UnknownEntitiesRequester.cs +++ b/EndlessClient/Network/UnknownEntitiesRequester.cs @@ -1,4 +1,8 @@ -using EndlessClient.GameExecution; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using EndlessClient.GameExecution; using EndlessClient.Rendering; using EndlessClient.Rendering.Character; using EndlessClient.Rendering.NPC; @@ -7,10 +11,6 @@ using EOLib.Domain.NPC; using EOLib.IO.Map; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; namespace EndlessClient.Network { @@ -37,7 +37,7 @@ public UnknownEntitiesRequester(IEndlessGameProvider gameProvider, INPCRendererProvider npcRendererProvider, ICharacterRendererProvider characterRendererProvider, IUnknownEntitiesRequestActions unknownEntitiesRequestActions) - : base((Game) gameProvider.Game) + : base((Game)gameProvider.Game) { _clientWindowSizeProvider = clientWindowSizeProvider; _characterProvider = characterProvider; @@ -112,4 +112,4 @@ private void ClearOutOfRangeActors() } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Program.cs b/EndlessClient/Program.cs index c0575733f..d02ab6db2 100644 --- a/EndlessClient/Program.cs +++ b/EndlessClient/Program.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; -using System; -using EndlessClient.GameExecution; +using System; using System.Reflection; +using AutomaticTypeMapper; +using EndlessClient.GameExecution; namespace EndlessClient { @@ -12,7 +12,7 @@ public static class Program [STAThread] public static void Main(string[] args) { - var assemblyNames = new [] + var assemblyNames = new[] { Assembly.GetExecutingAssembly().FullName, "EOLib", @@ -35,4 +35,4 @@ public static void Main(string[] args) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Properties/AssemblyInfo.cs b/EndlessClient/Properties/AssemblyInfo.cs index d9d051560..df4346355 100644 --- a/EndlessClient/Properties/AssemblyInfo.cs +++ b/EndlessClient/Properties/AssemblyInfo.cs @@ -32,4 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("3.4.0.456")] -[assembly: AssemblyFileVersion("3.4.0.456")] +[assembly: AssemblyFileVersion("3.4.0.456")] \ No newline at end of file diff --git a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs index 7db24db09..2dec43696 100644 --- a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs +++ b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.HUD; @@ -21,9 +24,6 @@ using Moffat.EndlessOnline.SDK.Protocol.Net.Server; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering.Character { @@ -130,7 +130,7 @@ public void StartOtherCharacterWalkAnimation(int characterID, MapCoordinate dest return; Animator.StartOtherCharacterWalkAnimation(characterID, destination, direction); - + ShowWaterSplashiesIfNeeded(CharacterActionState.Walking, characterID); if (IsSteppingStone(character.RenderProperties)) @@ -198,7 +198,7 @@ public void NotifySelfSpellCast(int playerId, int spellId, int spellHp, int perc var spellGraphic = _pubFileProvider.ESFFile[spellId].Graphic; if (playerId == _characterRepository.MainCharacter.ID) - { + { _characterRendererProvider.MainCharacterRenderer.MatchSome(cr => { cr.ShoutSpellCast(); @@ -432,4 +432,4 @@ public interface ICharacterAnimationActions void Emote(Emote whichEmote); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Character/CharacterAnimator.cs b/EndlessClient/Rendering/Character/CharacterAnimator.cs index f5e0ffb97..db82ea146 100644 --- a/EndlessClient/Rendering/Character/CharacterAnimator.cs +++ b/EndlessClient/Rendering/Character/CharacterAnimator.cs @@ -1,4 +1,8 @@ -using EndlessClient.GameExecution; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using EndlessClient.GameExecution; using EndlessClient.HUD; using EndlessClient.HUD.Spells; using EndlessClient.Rendering.Metadata; @@ -12,10 +16,6 @@ using EOLib.IO.Pub; using Microsoft.Xna.Framework; using Optional; -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; namespace EndlessClient.Rendering.Character { @@ -60,7 +60,7 @@ public CharacterAnimator(IEndlessGameProvider gameProvider, IPathFinder pathFinder, IFixedTimeStepRepository fixedTimeStepRepository, IMetadataProvider weaponMetadataProvider) - : base((Game) gameProvider.Game) + : base((Game)gameProvider.Game) { _characterRepository = characterRepository; _currentMapStateRepository = currentMapStateRepository; @@ -131,7 +131,7 @@ public void StartMainCharacterWalkAnimation(Option targetCoordina rp = FaceTarget(characterCoord, _walkPath.Peek(), rp); _characterRepository.MainCharacter = _characterRepository.MainCharacter.WithRenderProperties(rp); } - + doTheWalk(); }, none: doTheWalk); @@ -609,4 +609,4 @@ public interface ICharacterAnimator : IGameComponent void StopAllCharacterAnimations(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Character/CharacterRenderer.cs b/EndlessClient/Rendering/Character/CharacterRenderer.cs index 6dba6e6c3..916e143d5 100644 --- a/EndlessClient/Rendering/Character/CharacterRenderer.cs +++ b/EndlessClient/Rendering/Character/CharacterRenderer.cs @@ -1,4 +1,6 @@ -using EndlessClient.Audio; +using System; +using System.Linq; +using EndlessClient.Audio; using EndlessClient.GameExecution; using EndlessClient.Input; using EndlessClient.Rendering.CharacterProperties; @@ -18,8 +20,6 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; -using System; -using System.Linq; using XNAControls; namespace EndlessClient.Rendering.Character @@ -242,7 +242,7 @@ public void SetToCenterScreenPosition() : 310; var yCoord = _clientWindowSizeRepository.Resizable ? (_clientWindowSizeRepository.Height - skinRect.Height) / 2 - 11 - : (298 - skinRect.Height) / 2 - skinRect.Height/4 - 3; + : (298 - skinRect.Height) / 2 - skinRect.Height / 4 - 3; SetAbsoluteScreenPosition(xCoord, yCoord); } @@ -386,7 +386,7 @@ private void UpdateNameLabel() private Vector2 GetNameLabelPosition() { - NameLabelY = DrawArea.Y - 12 - (int)(_nameLabel?.ActualHeight ?? 0) + ((int)Character.RenderProperties.SitState)*10; + NameLabelY = DrawArea.Y - 12 - (int)(_nameLabel?.ActualHeight ?? 0) + ((int)Character.RenderProperties.SitState) * 10; return new Vector2(HorizontalCenter - (_nameLabel.ActualWidth / 2f), NameLabelY); } @@ -405,7 +405,7 @@ private int GetSteppingStoneOffset(CharacterRenderProperties renderProps) if (isSteppingStone && renderProps.IsActing(CharacterActionState.Walking)) { - switch(renderProps.ActualWalkFrame) + switch (renderProps.ActualWalkFrame) { case 1: return -8; case 2: return -16; @@ -545,11 +545,11 @@ protected override void Dispose(bool disposing) _clientWindowSizeRepository.GameWindowSizeChanged -= RecreateRenderTargetEvent; - lock(_rt_locker_) + lock (_rt_locker_) _charRenderTarget?.Dispose(); } base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Character/CharacterRendererUpdater.cs b/EndlessClient/Rendering/Character/CharacterRendererUpdater.cs index 219739c6f..3f8713272 100644 --- a/EndlessClient/Rendering/Character/CharacterRendererUpdater.cs +++ b/EndlessClient/Rendering/Character/CharacterRendererUpdater.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Rendering.Effects; using EndlessClient.Rendering.Factories; using EOLib; @@ -7,9 +10,6 @@ using Microsoft.Xna.Framework; using Optional; using Optional.Collections; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering.Character { diff --git a/EndlessClient/Rendering/Character/CharacterStateCache.cs b/EndlessClient/Rendering/Character/CharacterStateCache.cs index bbd518cf3..bdc75771e 100644 --- a/EndlessClient/Rendering/Character/CharacterStateCache.cs +++ b/EndlessClient/Rendering/Character/CharacterStateCache.cs @@ -1,10 +1,9 @@ -using AutomaticTypeMapper; -using EOLib; -using Optional; -using System; +using System; using System.Collections.Generic; using System.Linq; - +using AutomaticTypeMapper; +using EOLib; +using Optional; using DomainCharacter = EOLib.Domain.Character.Character; namespace EndlessClient.Rendering.Character diff --git a/EndlessClient/Rendering/Character/CharacterTextures.cs b/EndlessClient/Rendering/Character/CharacterTextures.cs index 961c6c61c..9cfa89f4c 100644 --- a/EndlessClient/Rendering/Character/CharacterTextures.cs +++ b/EndlessClient/Rendering/Character/CharacterTextures.cs @@ -15,7 +15,7 @@ public class CharacterTextures : ICharacterTextures public ISpriteSheet Shield { get; private set; } public ISpriteSheet Weapon { get; private set; } public ISpriteSheet WeaponExtra { get; private set; } - public ISpriteSheet WeaponSlash{ get; private set; } + public ISpriteSheet WeaponSlash { get; private set; } public ISpriteSheet Hair { get; private set; } public ISpriteSheet Skin { get; private set; } @@ -47,4 +47,4 @@ public void Refresh(CharacterRenderProperties characterRenderProperties) Face = _characterSpriteCalculator.GetFaceTexture(characterRenderProperties); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Character/ICharacterRenderer.cs b/EndlessClient/Rendering/Character/ICharacterRenderer.cs index 9c9a8ca73..13457876a 100644 --- a/EndlessClient/Rendering/Character/ICharacterRenderer.cs +++ b/EndlessClient/Rendering/Character/ICharacterRenderer.cs @@ -1,6 +1,6 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; namespace EndlessClient.Rendering.Character { @@ -22,4 +22,4 @@ public interface ICharacterRenderer : IDrawable, IUpdateable, IGameComponent, ID void HideName(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Character/ICharacterStateCache.cs b/EndlessClient/Rendering/Character/ICharacterStateCache.cs index 4dba53934..cba0412a1 100644 --- a/EndlessClient/Rendering/Character/ICharacterStateCache.cs +++ b/EndlessClient/Rendering/Character/ICharacterStateCache.cs @@ -1,6 +1,5 @@ -using Optional; -using System.Collections.Generic; - +using System.Collections.Generic; +using Optional; using DomainCharacter = EOLib.Domain.Character.Character; namespace EndlessClient.Rendering.Character diff --git a/EndlessClient/Rendering/Character/ICharacterTextures.cs b/EndlessClient/Rendering/Character/ICharacterTextures.cs index 9869d503a..ae4e0d2f5 100644 --- a/EndlessClient/Rendering/Character/ICharacterTextures.cs +++ b/EndlessClient/Rendering/Character/ICharacterTextures.cs @@ -22,4 +22,4 @@ public interface ICharacterTextures void Refresh(CharacterRenderProperties characterRenderProperties); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Character/PeriodicEmoteHandler.cs b/EndlessClient/Rendering/Character/PeriodicEmoteHandler.cs index 280cc11e6..dfe02d497 100644 --- a/EndlessClient/Rendering/Character/PeriodicEmoteHandler.cs +++ b/EndlessClient/Rendering/Character/PeriodicEmoteHandler.cs @@ -1,4 +1,6 @@ -using EndlessClient.Audio; +using System; +using System.Diagnostics; +using EndlessClient.Audio; using EndlessClient.Controllers; using EndlessClient.GameExecution; using EndlessClient.HUD; @@ -8,8 +10,6 @@ using EOLib.Localization; using Microsoft.Xna.Framework; using Optional; -using System; -using System.Diagnostics; namespace EndlessClient.Rendering.Character { @@ -246,4 +246,4 @@ public interface IPeriodicEmoteHandler : IGameComponent, IUpdateable void CancelArenaBlockTimer(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/ArmorRenderer.cs b/EndlessClient/Rendering/CharacterProperties/ArmorRenderer.cs index 423cf75be..9f84c348f 100644 --- a/EndlessClient/Rendering/CharacterProperties/ArmorRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/ArmorRenderer.cs @@ -74,4 +74,4 @@ private Vector2 GetOffsets(Vector2 parentCharacterSize, bool ranged) return new Vector2(resX, resY); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/BaseCharacterPropertyRenderer.cs b/EndlessClient/Rendering/CharacterProperties/BaseCharacterPropertyRenderer.cs index 18978c99d..2eae9521b 100644 --- a/EndlessClient/Rendering/CharacterProperties/BaseCharacterPropertyRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/BaseCharacterPropertyRenderer.cs @@ -33,4 +33,4 @@ protected virtual void Render(SpriteBatch spriteBatch, ISpriteSheet sheet, Vecto LayerDepth); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/BootsRenderer.cs b/EndlessClient/Rendering/CharacterProperties/BootsRenderer.cs index 3b0af0f47..4dc635b5c 100644 --- a/EndlessClient/Rendering/CharacterProperties/BootsRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/BootsRenderer.cs @@ -1,11 +1,11 @@ -using EndlessClient.Rendering.Metadata.Models; +using System; +using EndlessClient.Rendering.Metadata.Models; using EndlessClient.Rendering.Sprites; using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; namespace EndlessClient.Rendering.CharacterProperties { @@ -47,7 +47,7 @@ private Vector2 GetOffsets(Rectangle parentCharacterDrawArea, bool ranged) { var isDownOrLeft = _renderProperties.IsFacing(EODirection.Down, EODirection.Left); var factor = isDownOrLeft ? -1 : 1; - var extra = !isDownOrLeft ? 2*_renderProperties.Gender : 0; + var extra = !isDownOrLeft ? 2 * _renderProperties.Gender : 0; resX += 2 * factor; resY += 1 * factor - extra; @@ -87,4 +87,4 @@ private Vector2 GetOffsets(Rectangle parentCharacterDrawArea, bool ranged) return new Vector2(resX, resY); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/CharacterPropertyRendererBuilder.cs b/EndlessClient/Rendering/CharacterProperties/CharacterPropertyRendererBuilder.cs index d269f11bc..244147b40 100644 --- a/EndlessClient/Rendering/CharacterProperties/CharacterPropertyRendererBuilder.cs +++ b/EndlessClient/Rendering/CharacterProperties/CharacterPropertyRendererBuilder.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Rendering.Character; using EndlessClient.Rendering.Metadata; using EndlessClient.Rendering.Metadata.Models; @@ -8,8 +10,6 @@ using EOLib.IO; using EOLib.IO.Pub; using EOLib.IO.Repositories; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering.CharacterProperties { @@ -74,9 +74,9 @@ private bool IsShieldBehindCharacter(CharacterRenderProperties renderProperties) private bool IsWeaponBehindCharacter(CharacterRenderProperties renderProperties) { - var weaponInfo = EIFFile.FirstOrDefault( - x => x.Type == ItemType.Weapon && - x.DollGraphic == renderProperties.WeaponGraphic); + var weaponInfo = EIFFile.FirstOrDefault( + x => x.Type == ItemType.Weapon && + x.DollGraphic == renderProperties.WeaponGraphic); var pass1 = renderProperties.RenderAttackFrame < 2; var pass2 = renderProperties.IsFacing(EODirection.Up, EODirection.Left); @@ -99,4 +99,4 @@ private bool IsShieldOnBack(int shieldGraphic) private IPubFile EIFFile => _eifFileProvider.EIFFile ?? new EIFFile(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/EmoteRenderer.cs b/EndlessClient/Rendering/CharacterProperties/EmoteRenderer.cs index 5031b7749..10978e828 100644 --- a/EndlessClient/Rendering/CharacterProperties/EmoteRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/EmoteRenderer.cs @@ -36,4 +36,4 @@ public override void Render(SpriteBatch spriteBatch, Rectangle parentCharacterDr Render(spriteBatch, _emoteSheet, emotePos, 128); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/FaceRenderer.cs b/EndlessClient/Rendering/CharacterProperties/FaceRenderer.cs index 83e37046b..80f57e6b0 100644 --- a/EndlessClient/Rendering/CharacterProperties/FaceRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/FaceRenderer.cs @@ -46,4 +46,4 @@ public override void Render(SpriteBatch spriteBatch, Rectangle parentCharacterDr Render(spriteBatch, _faceSheet, facePos); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/HairRenderLocationCalculator.cs b/EndlessClient/Rendering/CharacterProperties/HairRenderLocationCalculator.cs index 239b90e48..db4516a8b 100644 --- a/EndlessClient/Rendering/CharacterProperties/HairRenderLocationCalculator.cs +++ b/EndlessClient/Rendering/CharacterProperties/HairRenderLocationCalculator.cs @@ -65,4 +65,4 @@ public Vector2 CalculateDrawLocationOfCharacterHair(Rectangle hairRectangle, Rec return parentCharacterDrawArea.Location.ToVector2() + new Vector2(resX + flippedOffset, resY); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/HairRenderer.cs b/EndlessClient/Rendering/CharacterProperties/HairRenderer.cs index 6f7dd9066..e499b7f4c 100644 --- a/EndlessClient/Rendering/CharacterProperties/HairRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/HairRenderer.cs @@ -27,4 +27,4 @@ public override void Render(SpriteBatch spriteBatch, Rectangle parentCharacterDr Render(spriteBatch, _hairSheet, drawLoc); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/HatRenderer.cs b/EndlessClient/Rendering/CharacterProperties/HatRenderer.cs index 30e78b456..798c50454 100644 --- a/EndlessClient/Rendering/CharacterProperties/HatRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/HatRenderer.cs @@ -45,4 +45,4 @@ private Vector2 GetOffsets() return new Vector2(xOff + flippedOffset, yOff); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/ICharacterPropertyRenderer.cs b/EndlessClient/Rendering/CharacterProperties/ICharacterPropertyRenderer.cs index 9d5bb6c96..fc8199f84 100644 --- a/EndlessClient/Rendering/CharacterProperties/ICharacterPropertyRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/ICharacterPropertyRenderer.cs @@ -12,4 +12,4 @@ public interface ICharacterPropertyRenderer void Render(SpriteBatch spriteBatch, Rectangle parentCharacterDrawArea, WeaponMetadata weaponMetadata); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/ShieldRenderer.cs b/EndlessClient/Rendering/CharacterProperties/ShieldRenderer.cs index 0fb203e7a..f1d1371d1 100644 --- a/EndlessClient/Rendering/CharacterProperties/ShieldRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/ShieldRenderer.cs @@ -1,11 +1,11 @@ -using EndlessClient.Rendering.Metadata.Models; +using System; +using EndlessClient.Rendering.Metadata.Models; using EndlessClient.Rendering.Sprites; using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; namespace EndlessClient.Rendering.CharacterProperties { @@ -113,4 +113,4 @@ private Vector2 GetOffsets(Rectangle parentCharacterDrawArea, bool ranged) return new Vector2(resX, resY); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/SkinRenderLocationCalculator.cs b/EndlessClient/Rendering/CharacterProperties/SkinRenderLocationCalculator.cs index 5689254d0..87e2445aa 100644 --- a/EndlessClient/Rendering/CharacterProperties/SkinRenderLocationCalculator.cs +++ b/EndlessClient/Rendering/CharacterProperties/SkinRenderLocationCalculator.cs @@ -80,4 +80,4 @@ public Vector2 CalculateDrawLocationOfCharacterSkin(Rectangle skinRectangle, Rec return new Vector2(resX, resY); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/SkinRenderer.cs b/EndlessClient/Rendering/CharacterProperties/SkinRenderer.cs index 3ee22f3b6..99c2c8107 100644 --- a/EndlessClient/Rendering/CharacterProperties/SkinRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/SkinRenderer.cs @@ -28,4 +28,4 @@ public override void Render(SpriteBatch spriteBatch, Rectangle parentCharacterDr Render(spriteBatch, _skinSheet, drawLoc); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/WeaponRenderer.cs b/EndlessClient/Rendering/CharacterProperties/WeaponRenderer.cs index 30d521aef..ad480bdf7 100644 --- a/EndlessClient/Rendering/CharacterProperties/WeaponRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/WeaponRenderer.cs @@ -1,11 +1,11 @@ -using EndlessClient.Rendering.Metadata.Models; +using System; +using EndlessClient.Rendering.Metadata.Models; using EndlessClient.Rendering.Sprites; using EOLib; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; namespace EndlessClient.Rendering.CharacterProperties { @@ -58,4 +58,4 @@ private Vector2 GetOffsets(Rectangle parentCharacterDrawArea, bool ranged) return new Vector2(resX, resY); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/CharacterProperties/WeaponSlashRenderer.cs b/EndlessClient/Rendering/CharacterProperties/WeaponSlashRenderer.cs index 328aa6613..3ac4ca2a7 100644 --- a/EndlessClient/Rendering/CharacterProperties/WeaponSlashRenderer.cs +++ b/EndlessClient/Rendering/CharacterProperties/WeaponSlashRenderer.cs @@ -43,4 +43,4 @@ private Vector2 GetOffsets(Rectangle parentCharacterDrawArea) }; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Chat/ChatBubble.cs b/EndlessClient/Rendering/Chat/ChatBubble.cs index 3af07edc7..35e3fef73 100644 --- a/EndlessClient/Rendering/Chat/ChatBubble.cs +++ b/EndlessClient/Rendering/Chat/ChatBubble.cs @@ -1,11 +1,11 @@ -using EndlessClient.GameExecution; +using System; +using System.Diagnostics; +using EndlessClient.GameExecution; using EOLib; using EOLib.Config; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; -using System; -using System.Diagnostics; using XNAControls; namespace EndlessClient.Rendering.Chat @@ -96,7 +96,7 @@ public override void Update(GameTime gameTime) _startTime.MatchSome(st => { - if (st.ElapsedMilliseconds > (24 + _textLabel.Text.Length / 3)*120) + if (st.ElapsedMilliseconds > (24 + _textLabel.Text.Length / 3) * 120) { _textLabel.Visible = false; Visible = false; @@ -122,7 +122,7 @@ public override void Draw(GameTime gameTime) var xCov = TL.Width; var yCov = TL.Height; - + var color = _isGroupChat ? Color.FromNonPremultiplied(247, 234, 164, 232) : Color.FromNonPremultiplied(255, 255, 255, 232); _spriteBatch.Begin(); @@ -159,7 +159,7 @@ public override void Draw(GameTime gameTime) _spriteBatch.Draw(BR, _drawLocation + new Vector2(x2, y), color); y += BM.Height; - _spriteBatch.Draw(NUB, _drawLocation + new Vector2((x2 + BR.Width - NUB.Width)/2f, y - 1), color); + _spriteBatch.Draw(NUB, _drawLocation + new Vector2((x2 + BR.Width - NUB.Width) / 2f, y - 1), color); _spriteBatch.End(); } @@ -196,4 +196,4 @@ public interface IChatBubble : IDisposable void Show(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Chat/ChatBubbleFactory.cs b/EndlessClient/Rendering/Chat/ChatBubbleFactory.cs index 6d474b266..630c98a05 100644 --- a/EndlessClient/Rendering/Chat/ChatBubbleFactory.cs +++ b/EndlessClient/Rendering/Chat/ChatBubbleFactory.cs @@ -35,4 +35,4 @@ public interface IChatBubbleFactory { IChatBubble CreateChatBubble(IMapActor owner); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Chat/ChatBubbleTexture.cs b/EndlessClient/Rendering/Chat/ChatBubbleTexture.cs index 325fab3af..ee6c96602 100644 --- a/EndlessClient/Rendering/Chat/ChatBubbleTexture.cs +++ b/EndlessClient/Rendering/Chat/ChatBubbleTexture.cs @@ -13,4 +13,4 @@ public enum ChatBubbleTexture BottomRight, Nubbin } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Chat/ChatBubbleTextureProvider.cs b/EndlessClient/Rendering/Chat/ChatBubbleTextureProvider.cs index 903921620..e4311e494 100644 --- a/EndlessClient/Rendering/Chat/ChatBubbleTextureProvider.cs +++ b/EndlessClient/Rendering/Chat/ChatBubbleTextureProvider.cs @@ -42,4 +42,4 @@ public interface IChatBubbleTextureProvider void LoadContent(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Chat/ChatColorExtensions.cs b/EndlessClient/Rendering/Chat/ChatColorExtensions.cs index 2ddaec0c2..7d558b298 100644 --- a/EndlessClient/Rendering/Chat/ChatColorExtensions.cs +++ b/EndlessClient/Rendering/Chat/ChatColorExtensions.cs @@ -21,4 +21,4 @@ public static Color ToColor(this ChatColor chatColor) } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Chat/ChatRenderable.cs b/EndlessClient/Rendering/Chat/ChatRenderable.cs index 3ad4c6f64..9d9728d3b 100644 --- a/EndlessClient/Rendering/Chat/ChatRenderable.cs +++ b/EndlessClient/Rendering/Chat/ChatRenderable.cs @@ -39,7 +39,7 @@ public ChatRenderable(INativeGraphicsManager nativeGraphicsManager, public override bool Equals(object obj) { if (!(obj is ChatRenderable)) return false; - var other = (ChatRenderable) obj; + var other = (ChatRenderable)obj; return other.Data.Equals(Data) && other._partialMessage.Equals(_partialMessage); @@ -48,8 +48,8 @@ public override bool Equals(object obj) public override int GetHashCode() { var hash = 397 ^ Data.GetHashCode(); - hash = (hash*397) ^ DisplayIndex.GetHashCode(); - hash = (hash*397) ^ _partialMessage.GetHashCode(); + hash = (hash * 397) ^ DisplayIndex.GetHashCode(); + hash = (hash * 397) ^ _partialMessage.GetHashCode(); return hash; } @@ -57,7 +57,7 @@ public void Render(IHudPanel parentPanel, SpriteBatch spriteBatch, BitmapFont ch { spriteBatch.Begin(); - var pos = parentPanel.DrawPosition + new Vector2(0, DisplayIndex*13); + var pos = parentPanel.DrawPosition + new Vector2(0, DisplayIndex * 13); spriteBatch.Draw(_nativeGraphicsManager.TextureFromResource(GFXTypes.PostLoginUI, 32, true), new Vector2(pos.X + ICON_GRAPHIC_X_OFF, pos.Y + HeaderYOffset), GetChatIconRectangle(Data.Icon), diff --git a/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs b/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs index ae2d2c31d..1855dbbba 100644 --- a/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs +++ b/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs @@ -40,7 +40,7 @@ public IReadOnlyList GenerateNewsRenderables(IReadOnlyList GenerateChatRenderables(IEnumerable x.Equals(data.Who, StringComparison.InvariantCultureIgnoreCase))) continue; - var splitStrings = SplitTextIntoLines(data.Who, new[] {data.Message}); + var splitStrings = SplitTextIntoLines(data.Who, new[] { data.Message }); var renderables = splitStrings.Select( (pair, i) => CreateChatRenderableFromChatPair(pair, i, data)) .ToList(); @@ -91,7 +91,7 @@ private IReadOnlyList SplitTextIntoLines(string who, IReadOnlyList GenerateChatRenderables(IEnumerable chatData); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/ClientWindowSizeRepository.cs b/EndlessClient/Rendering/ClientWindowSizeRepository.cs index ab82aa7ff..045f2c2c4 100644 --- a/EndlessClient/Rendering/ClientWindowSizeRepository.cs +++ b/EndlessClient/Rendering/ClientWindowSizeRepository.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using AutomaticTypeMapper; using EOLib; using EOLib.Graphics; -using System; -using System.Collections.Generic; namespace EndlessClient.Rendering { @@ -107,4 +107,4 @@ public void ResetState() Height = DEFAULT_BACKBUFFER_HEIGHT; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/ContextMenuRenderer.cs b/EndlessClient/Rendering/ContextMenuRenderer.cs index cafc92f9a..54cab99f0 100644 --- a/EndlessClient/Rendering/ContextMenuRenderer.cs +++ b/EndlessClient/Rendering/ContextMenuRenderer.cs @@ -1,4 +1,7 @@ -using EndlessClient.Audio; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.Dialogs.Actions; using EndlessClient.Dialogs.Factories; @@ -20,9 +23,6 @@ using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Rendering @@ -78,7 +78,7 @@ public ContextMenuRenderer(INativeGraphicsManager nativeGraphicsManager, IContextMenuRepository contextMenuRepository, IPartyDataProvider partyDataProvider, ICharacterRenderer characterRenderer, - ICurrentMapStateProvider currentMapStateProvider, + ICurrentMapStateProvider currentMapStateProvider, IEOMessageBoxFactory messageBoxFactory, IClientWindowSizeProvider clientWindowSizeProvider, ISfxPlayer sfxPlayer) @@ -355,4 +355,4 @@ protected override void Dispose(bool disposing) public interface IContextMenuRenderer : IXNAControl { } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/ContextMenuRepository.cs b/EndlessClient/Rendering/ContextMenuRepository.cs index 771124e41..f0650e66a 100644 --- a/EndlessClient/Rendering/ContextMenuRepository.cs +++ b/EndlessClient/Rendering/ContextMenuRepository.cs @@ -10,7 +10,7 @@ public interface IContextMenuProvider public interface IContextMenuRepository { - Option ContextMenu { get; set; } + Option ContextMenu { get; set; } } [AutoMappedType(IsSingleton = true)] @@ -23,4 +23,4 @@ public ContextMenuRepository() ContextMenu = Option.None(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/DispatcherGameComponent.cs b/EndlessClient/Rendering/DispatcherGameComponent.cs index 8660c764e..82c0e7f51 100644 --- a/EndlessClient/Rendering/DispatcherGameComponent.cs +++ b/EndlessClient/Rendering/DispatcherGameComponent.cs @@ -1,11 +1,11 @@ -using AutomaticTypeMapper; -using EndlessClient.GameExecution; -using Microsoft.Xna.Framework; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; +using AutomaticTypeMapper; +using EndlessClient.GameExecution; +using Microsoft.Xna.Framework; namespace EndlessClient.Rendering { @@ -33,7 +33,7 @@ public static async Task Invoke(Action action) public override void Update(GameTime gameTime) { - lock(_queuelocker_) + lock (_queuelocker_) { if (_actions.Any()) { @@ -45,4 +45,4 @@ public override void Update(GameTime gameTime) base.Update(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/EffectAnimationType.cs b/EndlessClient/Rendering/Effects/EffectAnimationType.cs index 7990b4245..3792c38b3 100644 --- a/EndlessClient/Rendering/Effects/EffectAnimationType.cs +++ b/EndlessClient/Rendering/Effects/EffectAnimationType.cs @@ -9,4 +9,4 @@ public enum EffectAnimationType Position = 2, Flickering = 3 } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/EffectLayer.cs b/EndlessClient/Rendering/Effects/EffectLayer.cs index a53e79380..c5a37cd24 100644 --- a/EndlessClient/Rendering/Effects/EffectLayer.cs +++ b/EndlessClient/Rendering/Effects/EffectLayer.cs @@ -6,4 +6,4 @@ public enum EffectLayer Transparent, InFront } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/EffectRenderer.cs b/EndlessClient/Rendering/Effects/EffectRenderer.cs index a3594b738..87993a12d 100644 --- a/EndlessClient/Rendering/Effects/EffectRenderer.cs +++ b/EndlessClient/Rendering/Effects/EffectRenderer.cs @@ -1,4 +1,7 @@ -using EndlessClient.Audio; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using EndlessClient.Audio; using EndlessClient.Rendering.Metadata.Models; using EOLib.Domain.Character; using EOLib.Domain.Extensions; @@ -6,10 +9,6 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; -using System.Collections.Generic; -using System.Diagnostics; -using System.Linq; - using DomainCharacter = EOLib.Domain.Character.Character; using DomainNPC = EOLib.Domain.NPC.NPC; @@ -217,4 +216,4 @@ public interface IEffectRenderer void DrawInFrontOfTarget(SpriteBatch sb, bool beginHasBeenCalled = true); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/EffectRendererFactory.cs b/EndlessClient/Rendering/Effects/EffectRendererFactory.cs index b35740693..04354f61a 100644 --- a/EndlessClient/Rendering/Effects/EffectRendererFactory.cs +++ b/EndlessClient/Rendering/Effects/EffectRendererFactory.cs @@ -36,4 +36,4 @@ public interface IEffectRendererFactory { IEffectRenderer Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/EffectSpriteInfo.cs b/EndlessClient/Rendering/Effects/EffectSpriteInfo.cs index 267d00d95..b807af9a5 100644 --- a/EndlessClient/Rendering/Effects/EffectSpriteInfo.cs +++ b/EndlessClient/Rendering/Effects/EffectSpriteInfo.cs @@ -1,9 +1,9 @@ -using EndlessClient.Rendering.Metadata.Models; +using System; +using System.Collections.Generic; +using EndlessClient.Rendering.Metadata.Models; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; -using System; -using System.Collections.Generic; namespace EndlessClient.Rendering.Effects { @@ -97,13 +97,13 @@ private Vector2 GetDrawLocation(Rectangle textureSourceRectangle, Vector2 gridCo private int GetDisplayFrame() { return _metadata.AnimationType switch - { - EffectAnimationType.Flickering => - _random.Next( - _metadata.RandomFlickeringMetadata?.FirstFrame ?? 0, - 1 + (_metadata.RandomFlickeringMetadata?.LastFrame ?? _metadata.RandomFlickeringMetadata?.FirstFrame ?? 0)), - _ => _displayFrame + 1 - }; + { + EffectAnimationType.Flickering => + _random.Next( + _metadata.RandomFlickeringMetadata?.FirstFrame ?? 0, + 1 + (_metadata.RandomFlickeringMetadata?.LastFrame ?? _metadata.RandomFlickeringMetadata?.FirstFrame ?? 0)), + _ => _displayFrame + 1 + }; } private void ResetFrame() @@ -114,4 +114,4 @@ private void ResetFrame() _displayFrame = 0; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/EffectSpriteManager.cs b/EndlessClient/Rendering/Effects/EffectSpriteManager.cs index f333e0d73..234a7d56b 100644 --- a/EndlessClient/Rendering/Effects/EffectSpriteManager.cs +++ b/EndlessClient/Rendering/Effects/EffectSpriteManager.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Rendering.Metadata; using EndlessClient.Rendering.Metadata.Models; using EOLib.Graphics; using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; namespace EndlessClient.Rendering.Effects { @@ -31,7 +31,7 @@ public IList GetEffectInfo(int graphic) } public IList GetEffectInfo(int graphic, EffectMetadata metadata) - { + { var baseGraphic = 101 + (graphic - 1) * 3; var retList = new List(); @@ -59,4 +59,4 @@ public interface IEffectSpriteManager IList GetEffectInfo(int graphic, EffectMetadata metadata); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/HardCodedEffect.cs b/EndlessClient/Rendering/Effects/HardCodedEffect.cs index 6457671cc..369e10eac 100644 --- a/EndlessClient/Rendering/Effects/HardCodedEffect.cs +++ b/EndlessClient/Rendering/Effects/HardCodedEffect.cs @@ -12,4 +12,4 @@ public enum HardCodedEffect Terror = 8, WaterSplashies = 9 } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/IEffectSpriteInfo.cs b/EndlessClient/Rendering/Effects/IEffectSpriteInfo.cs index c1179347b..4b5d38a64 100644 --- a/EndlessClient/Rendering/Effects/IEffectSpriteInfo.cs +++ b/EndlessClient/Rendering/Effects/IEffectSpriteInfo.cs @@ -13,4 +13,4 @@ public interface IEffectSpriteInfo void Restart(); void DrawToSpriteBatch(SpriteBatch sb, Vector2 gridCoordinatePosition); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/PositionOffsetEffectMetadata.cs b/EndlessClient/Rendering/Effects/PositionOffsetEffectMetadata.cs index 7cb406730..e86b7d7d1 100644 --- a/EndlessClient/Rendering/Effects/PositionOffsetEffectMetadata.cs +++ b/EndlessClient/Rendering/Effects/PositionOffsetEffectMetadata.cs @@ -1,6 +1,6 @@ -using Amadevus.RecordGenerator; +using System.Collections.Generic; +using Amadevus.RecordGenerator; using Newtonsoft.Json; -using System.Collections.Generic; namespace EndlessClient.Rendering.Effects { @@ -13,4 +13,4 @@ public sealed partial class PositionOffsetEffectMetadata [JsonProperty("yOffsetPerFrame")] public IReadOnlyList OffsetYByFrame { get; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/RandomFlickeringEffectMetadata.cs b/EndlessClient/Rendering/Effects/RandomFlickeringEffectMetadata.cs index 939b607b5..4d20baae3 100644 --- a/EndlessClient/Rendering/Effects/RandomFlickeringEffectMetadata.cs +++ b/EndlessClient/Rendering/Effects/RandomFlickeringEffectMetadata.cs @@ -12,4 +12,4 @@ public sealed partial class RandomFlickeringEffectMetadata [JsonProperty("lastFrame")] public int LastFrame { get; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Effects/VerticalSlidingEffectMetadata.cs b/EndlessClient/Rendering/Effects/VerticalSlidingEffectMetadata.cs index 75461c907..317e2eee8 100644 --- a/EndlessClient/Rendering/Effects/VerticalSlidingEffectMetadata.cs +++ b/EndlessClient/Rendering/Effects/VerticalSlidingEffectMetadata.cs @@ -9,4 +9,4 @@ public sealed partial class VerticalSlidingEffectMetadata [JsonProperty("yOffsetPerFrame")] public int FrameOffsetY { get; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/CharacterRendererFactory.cs b/EndlessClient/Rendering/Factories/CharacterRendererFactory.cs index c7ee761b9..60c176080 100644 --- a/EndlessClient/Rendering/Factories/CharacterRendererFactory.cs +++ b/EndlessClient/Rendering/Factories/CharacterRendererFactory.cs @@ -69,7 +69,7 @@ public CharacterRendererFactory(IEndlessGameProvider gameProvider, public ICharacterRenderer CreateCharacterRenderer(EOLib.Domain.Character.Character character, bool isUiControl) { return new CharacterRenderer( - (Game) _gameProvider.Game, + (Game)_gameProvider.Game, _renderTargetFactory, _healthBarRendererFactory, _chatBubbleFactory, diff --git a/EndlessClient/Rendering/Factories/ContextMenuRendererFactory.cs b/EndlessClient/Rendering/Factories/ContextMenuRendererFactory.cs index 3c4623374..d65096ee6 100644 --- a/EndlessClient/Rendering/Factories/ContextMenuRendererFactory.cs +++ b/EndlessClient/Rendering/Factories/ContextMenuRendererFactory.cs @@ -45,7 +45,7 @@ public ContextMenuRendererFactory(INativeGraphicsManager nativeGraphicsManager, IHudControlProvider hudControlProvider, IContextMenuRepository contextMenuRepository, IPartyDataProvider partyDataProvider, - ICurrentMapStateProvider currentMapStateProvider, + ICurrentMapStateProvider currentMapStateProvider, IEOMessageBoxFactory messageBoxFactory, IClientWindowSizeProvider clientWindowSizeProvider, ISfxPlayer sfxPlayer) @@ -80,7 +80,7 @@ public IContextMenuRenderer CreateContextMenuRenderer(ICharacterRenderer charact _hudControlProvider, _contextMenuRepository, _partyDataProvider, - characterRenderer, + characterRenderer, _currentMapStateProvider, _messageBoxFactory, _clientWindowSizeProvider, @@ -92,4 +92,4 @@ public interface IContextMenuRendererFactory { IContextMenuRenderer CreateContextMenuRenderer(ICharacterRenderer characterRenderer); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/HealthBarRendererFactory.cs b/EndlessClient/Rendering/Factories/HealthBarRendererFactory.cs index 662c60bf8..273c8002e 100644 --- a/EndlessClient/Rendering/Factories/HealthBarRendererFactory.cs +++ b/EndlessClient/Rendering/Factories/HealthBarRendererFactory.cs @@ -23,4 +23,4 @@ public interface IHealthBarRendererFactory { IHealthBarRenderer CreateHealthBarRenderer(IMapActor entity); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/ICharacterRendererFactory.cs b/EndlessClient/Rendering/Factories/ICharacterRendererFactory.cs index 4ceaec244..76e9ee0b5 100644 --- a/EndlessClient/Rendering/Factories/ICharacterRendererFactory.cs +++ b/EndlessClient/Rendering/Factories/ICharacterRendererFactory.cs @@ -6,4 +6,4 @@ public interface ICharacterRendererFactory { ICharacterRenderer CreateCharacterRenderer(EOLib.Domain.Character.Character character, bool isUiControl); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/IMapRendererFactory.cs b/EndlessClient/Rendering/Factories/IMapRendererFactory.cs index 1dffc0924..f70bd5d30 100644 --- a/EndlessClient/Rendering/Factories/IMapRendererFactory.cs +++ b/EndlessClient/Rendering/Factories/IMapRendererFactory.cs @@ -6,4 +6,4 @@ public interface IMapRendererFactory { IMapRenderer CreateMapRenderer(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/IRenderTargetFactory.cs b/EndlessClient/Rendering/Factories/IRenderTargetFactory.cs index ae952d201..5619cb444 100644 --- a/EndlessClient/Rendering/Factories/IRenderTargetFactory.cs +++ b/EndlessClient/Rendering/Factories/IRenderTargetFactory.cs @@ -7,4 +7,4 @@ public interface IRenderTargetFactory RenderTarget2D CreateRenderTarget(); RenderTarget2D CreateRenderTarget(int width, int height); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/MapRendererFactory.cs b/EndlessClient/Rendering/Factories/MapRendererFactory.cs index 75d5b94a8..29815b5d8 100644 --- a/EndlessClient/Rendering/Factories/MapRendererFactory.cs +++ b/EndlessClient/Rendering/Factories/MapRendererFactory.cs @@ -92,4 +92,4 @@ public IMapRenderer CreateMapRenderer() _fixedTimeStepRepository); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/MouseCursorRendererFactory.cs b/EndlessClient/Rendering/Factories/MouseCursorRendererFactory.cs index 4305ddd3e..3ebc0e979 100644 --- a/EndlessClient/Rendering/Factories/MouseCursorRendererFactory.cs +++ b/EndlessClient/Rendering/Factories/MouseCursorRendererFactory.cs @@ -65,4 +65,4 @@ public interface IMouseCursorRendererFactory { IMouseCursorRenderer Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Factories/RenderTargetFactory.cs b/EndlessClient/Rendering/Factories/RenderTargetFactory.cs index 3b6d4d91c..1234a95d7 100644 --- a/EndlessClient/Rendering/Factories/RenderTargetFactory.cs +++ b/EndlessClient/Rendering/Factories/RenderTargetFactory.cs @@ -33,4 +33,4 @@ public RenderTarget2D CreateRenderTarget(int width, int height) DepthFormat.None); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/GridDrawCoordinateCalculator.cs b/EndlessClient/Rendering/GridDrawCoordinateCalculator.cs index 3966f5f78..ce25ee258 100644 --- a/EndlessClient/Rendering/GridDrawCoordinateCalculator.cs +++ b/EndlessClient/Rendering/GridDrawCoordinateCalculator.cs @@ -1,10 +1,9 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.Domain.Character; using EOLib.Domain.Extensions; using EOLib.Domain.Map; using Microsoft.Xna.Framework; -using System; - using DomainNPC = EOLib.Domain.NPC.NPC; namespace EndlessClient.Rendering @@ -141,7 +140,7 @@ public MapCoordinate CalculateGridCoordinatesFromDrawLocation(Vector2 drawLocati var offsetX = _renderOffsetCalculator.CalculateOffsetX(_characterProvider.MainCharacter.RenderProperties); var offsetY = _renderOffsetCalculator.CalculateOffsetY(_characterProvider.MainCharacter.RenderProperties); - var gridX = (int)Math.Round((msX + 2 * msY - (ViewportWidthFactor*2) + offsetX + 2 * offsetY) / 64.0); + var gridX = (int)Math.Round((msX + 2 * msY - (ViewportWidthFactor * 2) + offsetX + 2 * offsetY) / 64.0); var gridY = (int)Math.Round((msY - gridX * 16 - ViewportHeightFactor + offsetY) / 16.0); return new MapCoordinate(gridX, gridY); @@ -184,4 +183,4 @@ public interface IGridDrawCoordinateCalculator MapCoordinate CalculateGridCoordinatesFromDrawLocation(Vector2 drawLocation); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/HealthBarRenderer.cs b/EndlessClient/Rendering/HealthBarRenderer.cs index 8625be55e..83c1b214e 100644 --- a/EndlessClient/Rendering/HealthBarRenderer.cs +++ b/EndlessClient/Rendering/HealthBarRenderer.cs @@ -1,10 +1,10 @@ -using EOLib.Graphics; +using System; +using System.Collections.Generic; +using System.Linq; +using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering { @@ -96,14 +96,14 @@ public void Update(GameTime gameTime) if (_isMiss) { var xPos = _parentReference.HorizontalCenter - (_numberSourceRectangles[0].Width / 2f); - var yPos = _parentReference.NameLabelY - _frameOffset - _healthBarBackgroundSource.Height*2f; + var yPos = _parentReference.NameLabelY - _frameOffset - _healthBarBackgroundSource.Height * 2f; _damageCounterPosition = new Vector2(xPos, yPos); } else { var digitCount = _numberSourceRectangles.Count; var xPos = _parentReference.HorizontalCenter - (digitCount * DigitWidth / 2f); - var yPos = _parentReference.NameLabelY - _frameOffset - _healthBarBackgroundSource.Height*2f; + var yPos = _parentReference.NameLabelY - _frameOffset - _healthBarBackgroundSource.Height * 2f; _damageCounterPosition = new Vector2(xPos, yPos); } } @@ -115,7 +115,7 @@ public void DrawToSpriteBatch(SpriteBatch spriteBatch) var numberNdx = 0; foreach (var numberSource in _numberSourceRectangles) { - spriteBatch.Draw(_sourceTexture, _damageCounterPosition + new Vector2(numberNdx*DigitWidth, 0), numberSource, Color.White); + spriteBatch.Draw(_sourceTexture, _damageCounterPosition + new Vector2(numberNdx * DigitWidth, 0), numberSource, Color.White); numberNdx++; } @@ -131,7 +131,7 @@ private static IEnumerable GetNumberSourceRectangles(int value, bool for (int i = 0; i < digits.Length; ++i) { int next = int.Parse($"{digits[i]}"); - yield return new Rectangle(next*DigitWidth, yCoord, 8, 11); + yield return new Rectangle(next * DigitWidth, yCoord, 8, 11); } } @@ -162,4 +162,4 @@ public interface IHealthBarRenderer void DrawToSpriteBatch(SpriteBatch spriteBatch); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/IMapActor.cs b/EndlessClient/Rendering/IMapActor.cs index 69be30187..058a69ea5 100644 --- a/EndlessClient/Rendering/IMapActor.cs +++ b/EndlessClient/Rendering/IMapActor.cs @@ -23,4 +23,4 @@ public interface IMapActor void PlayEffect(int effectId); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/ClickDispatcher.cs b/EndlessClient/Rendering/Map/ClickDispatcher.cs index 546dbfe2e..10bb6ab09 100644 --- a/EndlessClient/Rendering/Map/ClickDispatcher.cs +++ b/EndlessClient/Rendering/Map/ClickDispatcher.cs @@ -1,4 +1,7 @@ -using EndlessClient.Controllers; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Controllers; using EndlessClient.ControlSets; using EndlessClient.HUD.Controls; using EndlessClient.HUD.Spells; @@ -13,9 +16,6 @@ using MonoGame.Extended.Input; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; using DomainCharacter = EOLib.Domain.Character.Character; using DomainNPC = EOLib.Domain.NPC.NPC; @@ -261,4 +261,4 @@ public interface IClickDispatcher : IGameComponent { int DrawOrder { get; set; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/ClickDispatcherFactory.cs b/EndlessClient/Rendering/Map/ClickDispatcherFactory.cs index ea2478c42..1fd6e2c43 100644 --- a/EndlessClient/Rendering/Map/ClickDispatcherFactory.cs +++ b/EndlessClient/Rendering/Map/ClickDispatcherFactory.cs @@ -82,4 +82,4 @@ public interface IClickDispatcherFactory { IClickDispatcher Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/DynamicMapObjectUpdater.cs b/EndlessClient/Rendering/Map/DynamicMapObjectUpdater.cs index 3c93819a2..8a796c696 100644 --- a/EndlessClient/Rendering/Map/DynamicMapObjectUpdater.cs +++ b/EndlessClient/Rendering/Map/DynamicMapObjectUpdater.cs @@ -1,4 +1,7 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Input; using EndlessClient.Rendering.Character; @@ -8,9 +11,6 @@ using EOLib.Domain.Map; using EOLib.IO.Map; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering.Map { @@ -151,4 +151,4 @@ public interface IDynamicMapObjectUpdater { void UpdateMapObjects(GameTime gameTime); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/IMapItemGraphicProvider.cs b/EndlessClient/Rendering/Map/IMapItemGraphicProvider.cs index 6d2958cc8..0182979a0 100644 --- a/EndlessClient/Rendering/Map/IMapItemGraphicProvider.cs +++ b/EndlessClient/Rendering/Map/IMapItemGraphicProvider.cs @@ -6,4 +6,4 @@ public interface IMapItemGraphicProvider { Texture2D GetItemGraphic(int id, int amount); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/IMapRenderDistanceCalculator.cs b/EndlessClient/Rendering/Map/IMapRenderDistanceCalculator.cs index 6d976aafa..7e29d6466 100644 --- a/EndlessClient/Rendering/Map/IMapRenderDistanceCalculator.cs +++ b/EndlessClient/Rendering/Map/IMapRenderDistanceCalculator.cs @@ -6,4 +6,4 @@ public interface IMapRenderDistanceCalculator { MapRenderBounds CalculateRenderBounds(EOLib.Domain.Character.Character character, IMapFile currentMap); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/IMapRenderer.cs b/EndlessClient/Rendering/Map/IMapRenderer.cs index e18b1de9b..00db8ffe2 100644 --- a/EndlessClient/Rendering/Map/IMapRenderer.cs +++ b/EndlessClient/Rendering/Map/IMapRenderer.cs @@ -21,4 +21,4 @@ public interface IMapRenderer : IGameComponent, IDrawable void ClearTransientRenderables(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/MapChangedActions.cs b/EndlessClient/Rendering/Map/MapChangedActions.cs index 9d4d40d5a..51601f251 100644 --- a/EndlessClient/Rendering/Map/MapChangedActions.cs +++ b/EndlessClient/Rendering/Map/MapChangedActions.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Controllers; using EndlessClient.ControlSets; @@ -16,7 +17,6 @@ using EOLib.IO.Repositories; using EOLib.Localization; using Moffat.EndlessOnline.SDK.Protocol.Net.Server; -using System.Linq; namespace EndlessClient.Rendering.Map { @@ -145,7 +145,7 @@ private void ClearNPCRenderersAndCache() { var currentMapNpcGraphics = _currentMapStateRepository.NPCs.Select(x => _enfFileProvider.ENFFile[x.ID].Graphic).ToList(); var priorMapNpcGraphics = _npcRendererRepository.NPCRenderers.Select(x => _enfFileProvider.ENFFile[x.Value.NPC.ID].Graphic); - + foreach (var evict in priorMapNpcGraphics.Except(currentMapNpcGraphics)) _npcSpriteDataCache.MarkForEviction(evict); @@ -252,4 +252,4 @@ public interface IMapChangedActions { void ActiveCharacterEnterMapForLogin(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/MapItemGraphicProvider.cs b/EndlessClient/Rendering/Map/MapItemGraphicProvider.cs index 62a0ec038..ef4fab820 100644 --- a/EndlessClient/Rendering/Map/MapItemGraphicProvider.cs +++ b/EndlessClient/Rendering/Map/MapItemGraphicProvider.cs @@ -28,10 +28,10 @@ public Texture2D GetItemGraphic(int id, int amount) amount >= 10000 ? 3 : ( amount >= 100 ? 2 : ( amount >= 2 ? 1 : 0))); - return _nativeGraphicsManager.TextureFromResource(GFXTypes.Items, 269 + 2*gfx, true); + return _nativeGraphicsManager.TextureFromResource(GFXTypes.Items, 269 + 2 * gfx, true); } - return _nativeGraphicsManager.TextureFromResource(GFXTypes.Items, 2*item.Graphic - 1, true); + return _nativeGraphicsManager.TextureFromResource(GFXTypes.Items, 2 * item.Graphic - 1, true); } } } \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/MapObjectBoundsCalculator.cs b/EndlessClient/Rendering/Map/MapObjectBoundsCalculator.cs index c1b6813fe..ebc188d1b 100644 --- a/EndlessClient/Rendering/Map/MapObjectBoundsCalculator.cs +++ b/EndlessClient/Rendering/Map/MapObjectBoundsCalculator.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Rendering.MapEntityRenderers; using EOLib.Domain.Character; using EOLib.Graphics; using Microsoft.Xna.Framework; -using System.Linq; namespace EndlessClient.Rendering.Map { @@ -14,7 +14,7 @@ public class MapObjectBoundsCalculator : IMapObjectBoundsCalculator private readonly ICharacterProvider _characterProvider; private readonly IRenderOffsetCalculator _renderOffsetCalculator; private readonly IGridDrawCoordinateCalculator _gridDrawCoordinateCalculator; - + public MapObjectBoundsCalculator(INativeGraphicsManager nativeGraphicsManager, ICharacterProvider characterProvider, IRenderOffsetCalculator renderOffsetCalculator, diff --git a/EndlessClient/Rendering/Map/MapRenderBounds.cs b/EndlessClient/Rendering/Map/MapRenderBounds.cs index 5a342a2da..cfc199502 100644 --- a/EndlessClient/Rendering/Map/MapRenderBounds.cs +++ b/EndlessClient/Rendering/Map/MapRenderBounds.cs @@ -16,4 +16,4 @@ public MapRenderBounds(int firstRow, int lastRow, int firstCol, int lastCol) LastCol = lastCol; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/MapRenderDistanceCalculator.cs b/EndlessClient/Rendering/Map/MapRenderDistanceCalculator.cs index 85a850863..37c067290 100644 --- a/EndlessClient/Rendering/Map/MapRenderDistanceCalculator.cs +++ b/EndlessClient/Rendering/Map/MapRenderDistanceCalculator.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System; +using AutomaticTypeMapper; using EOLib.IO.Map; -using System; namespace EndlessClient.Rendering.Map { diff --git a/EndlessClient/Rendering/Map/MapRenderer.cs b/EndlessClient/Rendering/Map/MapRenderer.cs index 4ce993b61..5a0254d96 100644 --- a/EndlessClient/Rendering/Map/MapRenderer.cs +++ b/EndlessClient/Rendering/Map/MapRenderer.cs @@ -1,4 +1,7 @@ -using EndlessClient.Content; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Content; using EndlessClient.GameExecution; using EndlessClient.Rendering.Character; using EndlessClient.Rendering.Effects; @@ -14,9 +17,6 @@ using Microsoft.Xna.Framework.Input; using MonoGame.Extended.BitmapFonts; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering.Map { @@ -297,8 +297,8 @@ private void DrawGroundLayerToRenderTarget() } } - if (transitionComplete) - _mapTransitionState = new MapTransitionState(Option.None(), 0); + if (transitionComplete) + _mapTransitionState = new MapTransitionState(Option.None(), 0); _sb.End(); GraphicsDevice.SetRenderTarget(null); @@ -573,7 +573,7 @@ internal MapQuakeState NextOffset() internal MapQuakeState NextState() { var flip = -OffsetTarget / Math.Abs(OffsetTarget); - var offset = OffsetTarget + 1*flip; + var offset = OffsetTarget + 1 * flip; var nextOffsetTarget = NewOffsetTarget(Magnitude) * flip; return new MapQuakeState(Magnitude, offset, nextOffsetTarget, Flips + 1); diff --git a/EndlessClient/Rendering/Map/MiniMapRenderer.cs b/EndlessClient/Rendering/Map/MiniMapRenderer.cs index c6821ae5d..07733c1f7 100644 --- a/EndlessClient/Rendering/Map/MiniMapRenderer.cs +++ b/EndlessClient/Rendering/Map/MiniMapRenderer.cs @@ -1,4 +1,6 @@ -using EndlessClient.Rendering.Factories; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.Rendering.Factories; using EOLib.Domain.Character; using EOLib.Domain.Map; using EOLib.Graphics; @@ -7,8 +9,6 @@ using EOLib.IO.Repositories; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Rendering.Map @@ -146,7 +146,7 @@ protected override void OnDrawControl(GameTime gameTime) case TileSpec.ChairUpLeft: case TileSpec.Chest: case TileSpec.JammedDoor: - // Unknown TileSpecs 10-15 have been confirmed in the vanilla client to show a Blue ! on the minimap + // Unknown TileSpecs 10-15 have been confirmed in the vanilla client to show a Blue ! on the minimap case (TileSpec)10: case (TileSpec)11: case (TileSpec)12: @@ -273,11 +273,11 @@ private Rectangle GetSourceRect(MiniMapGfx gfx) private Vector2 GetCharacterOffset() { - var tileWidthFactor = TileWidth/2; - var tileHeightFactor = TileHeight/2; + var tileWidthFactor = TileWidth / 2; + var tileHeightFactor = TileHeight / 2; var (cx, cy) = (_characterProvider.MainCharacter.X, _characterProvider.MainCharacter.Y); return new Vector2(cx * tileWidthFactor - cy * tileWidthFactor, cx * tileHeightFactor + cy * tileHeightFactor); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Map/MiniMapRendererFactory.cs b/EndlessClient/Rendering/Map/MiniMapRendererFactory.cs index 0fb5e591e..2bccedcba 100644 --- a/EndlessClient/Rendering/Map/MiniMapRendererFactory.cs +++ b/EndlessClient/Rendering/Map/MiniMapRendererFactory.cs @@ -55,4 +55,4 @@ public interface IMiniMapRendererFactory { MiniMapRenderer Create(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/BaseMapEntityRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/BaseMapEntityRenderer.cs index 9ff23015a..88ccdd080 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/BaseMapEntityRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/BaseMapEntityRenderer.cs @@ -83,4 +83,4 @@ protected virtual Vector2 GetDrawCoordinatesFromGridUnits(int gridX, int gridY) return _gridDrawCoordinateCalculator.CalculateDrawCoordinatesFromGridUnits(gridX, gridY) + _layerOffsets[RenderLayer].ToVector2(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/GroundLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/GroundLayerRenderer.cs index 4bb3963fa..17182a148 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/GroundLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/GroundLayerRenderer.cs @@ -103,4 +103,4 @@ protected override Vector2 GetDrawCoordinatesFromGridUnits(int gridX, int gridY) return _gridDrawCoordinateCalculator.CalculateBaseLayerDrawCoordinatesFromGridUnits(gridX, gridY); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRenderer.cs index c7d3ecdcf..1be23a1c2 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRenderer.cs @@ -15,4 +15,4 @@ public interface IMapEntityRenderer void RenderElementAt(SpriteBatch spriteBatch, int row, int col, int alpha, Vector2 additionalPixelOffset = default); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRendererProvider.cs b/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRendererProvider.cs index 40925ea68..90c1e5422 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRendererProvider.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/IMapEntityRendererProvider.cs @@ -11,4 +11,4 @@ public interface IMapEntityRendererProvider IReadOnlyList MapEntityRenderers { get; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/MainCharacterEntityRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/MainCharacterEntityRenderer.cs index f88df7d2a..f45bc97d2 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/MainCharacterEntityRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/MainCharacterEntityRenderer.cs @@ -50,4 +50,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, }); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/MapItemLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/MapItemLayerRenderer.cs index 8c295783e..935181814 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/MapItemLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/MapItemLayerRenderer.cs @@ -1,10 +1,10 @@ -using EndlessClient.Rendering.Map; +using System; +using System.Linq; +using EndlessClient.Rendering.Map; using EOLib.Domain.Character; using EOLib.Domain.Map; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; -using System.Linq; namespace EndlessClient.Rendering.MapEntityRenderers { @@ -43,10 +43,10 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, var itemTexture = _mapItemGraphicProvider.GetItemGraphic(item.ItemID, item.Amount); spriteBatch.Draw(itemTexture, - new Vector2(itemPos.X - (int) Math.Round(itemTexture.Width/2.0), - itemPos.Y - (int) Math.Round(itemTexture.Height/2.0)) + additionalOffset, + new Vector2(itemPos.X - (int)Math.Round(itemTexture.Width / 2.0), + itemPos.Y - (int)Math.Round(itemTexture.Height / 2.0)) + additionalOffset, Color.FromNonPremultiplied(255, 255, 255, alpha)); } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/MapObjectLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/MapObjectLayerRenderer.cs index 64c400238..ffdf3aff0 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/MapObjectLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/MapObjectLayerRenderer.cs @@ -9,7 +9,6 @@ using EOLib.IO.Map; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; - using DomainCharacter = EOLib.Domain.Character.Character; namespace EndlessClient.Rendering.MapEntityRenderers @@ -90,4 +89,4 @@ private static bool CharacterAt(DomainCharacter c, MapCoordinate tile) : tile == c.RenderProperties.DestinationCoordinates(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/NPCEntityRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/NPCEntityRenderer.cs index 2ad75f5d3..b49fb8532 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/NPCEntityRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/NPCEntityRenderer.cs @@ -1,10 +1,10 @@ -using EndlessClient.Rendering.Map; +using System.Linq; +using EndlessClient.Rendering.Map; using EndlessClient.Rendering.NPC; using EOLib.Domain.Character; using EOLib.Domain.Map; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System.Linq; namespace EndlessClient.Rendering.MapEntityRenderers { @@ -53,4 +53,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, } } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/OnTopLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/OnTopLayerRenderer.cs index 3b19f9339..32a32620f 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/OnTopLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/OnTopLayerRenderer.cs @@ -44,4 +44,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, private IMapFile CurrentMap => _currentMapProvider.CurrentMap; } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/OtherCharacterEntityRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/OtherCharacterEntityRenderer.cs index 25dd1a64e..d31cde25c 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/OtherCharacterEntityRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/OtherCharacterEntityRenderer.cs @@ -1,10 +1,10 @@ -using EndlessClient.Rendering.Character; +using System.Linq; +using EndlessClient.Rendering.Character; using EndlessClient.Rendering.Map; using EOLib.Domain.Character; using EOLib.Domain.Map; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System.Linq; namespace EndlessClient.Rendering.MapEntityRenderers { diff --git a/EndlessClient/Rendering/MapEntityRenderers/Overlay2LayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/Overlay2LayerRenderer.cs index d9057e07e..e23dc5240 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/Overlay2LayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/Overlay2LayerRenderer.cs @@ -46,4 +46,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, private IMapFile CurrentMap => _currentMapProvider.CurrentMap; } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/OverlayLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/OverlayLayerRenderer.cs index 9d9f617df..b6ff7111e 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/OverlayLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/OverlayLayerRenderer.cs @@ -46,4 +46,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, private IMapFile CurrentMap => _currentMapProvider.CurrentMap; } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/RoofLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/RoofLayerRenderer.cs index 12c7f3398..b42cff2e9 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/RoofLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/RoofLayerRenderer.cs @@ -44,4 +44,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, private IMapFile CurrentMap => _currentMapProvider.CurrentMap; } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/ShadowLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/ShadowLayerRenderer.cs index 7bd14fa36..d6ca67d0f 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/ShadowLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/ShadowLayerRenderer.cs @@ -55,4 +55,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, private IMapFile CurrentMap => _currentMapProvider.CurrentMap; } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MapEntityRenderers/WallLayerRenderer.cs b/EndlessClient/Rendering/MapEntityRenderers/WallLayerRenderer.cs index 73eb1ce90..4fd37c518 100644 --- a/EndlessClient/Rendering/MapEntityRenderers/WallLayerRenderer.cs +++ b/EndlessClient/Rendering/MapEntityRenderers/WallLayerRenderer.cs @@ -39,7 +39,7 @@ protected void DrawWall(SpriteBatch spriteBatch, int row, int col, int alpha, in var gfx = _nativeGraphicsManager.TextureFromResource(GFXTypes.MapWalls, gfxNum, true); - var gfxWidthDelta = gfx.Width/4; + var gfxWidthDelta = gfx.Width / 4; var src = gfx.Width > WALL_FRAME_WIDTH ? new Rectangle?(new Rectangle(gfxWidthDelta * _frameIndex, 0, gfxWidthDelta, gfx.Height)) : null; @@ -108,4 +108,4 @@ public override void RenderElementAt(SpriteBatch spriteBatch, int row, int col, DrawWall(spriteBatch, row, col, alpha, gfxNum, additionalOffset); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/EffectMetadataProvider.cs b/EndlessClient/Rendering/Metadata/EffectMetadataProvider.cs index 577bc805c..51011b376 100644 --- a/EndlessClient/Rendering/Metadata/EffectMetadataProvider.cs +++ b/EndlessClient/Rendering/Metadata/EffectMetadataProvider.cs @@ -1,8 +1,8 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Rendering.Effects; using EndlessClient.Rendering.Metadata.Models; -using System.Collections.Generic; namespace EndlessClient.Rendering.Metadata { @@ -64,4 +64,4 @@ public EffectMetadata GetValueOrDefault(int graphic) .ValueOr(DefaultMetadata.TryGetValue(graphic, out var ret) ? ret : EffectMetadata.Default); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/GFXMetadataLoader.cs b/EndlessClient/Rendering/Metadata/GFXMetadataLoader.cs index a89107ada..aae52c7c8 100644 --- a/EndlessClient/Rendering/Metadata/GFXMetadataLoader.cs +++ b/EndlessClient/Rendering/Metadata/GFXMetadataLoader.cs @@ -1,12 +1,12 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Text; +using AutomaticTypeMapper; using EndlessClient.Rendering.Metadata.Models; using EOLib.Graphics; using Newtonsoft.Json; using Optional; using PELoaderLib; -using System; -using System.Collections.Generic; -using System.Text; namespace EndlessClient.Rendering.Metadata { @@ -67,4 +67,4 @@ public interface IGFXMetadataLoader Option GetMetadata(int graphic) where TMetadata : class, IGFXMetadata; } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/HatMetadataProvider.cs b/EndlessClient/Rendering/Metadata/HatMetadataProvider.cs index e560f322e..f8fc6f5b8 100644 --- a/EndlessClient/Rendering/Metadata/HatMetadataProvider.cs +++ b/EndlessClient/Rendering/Metadata/HatMetadataProvider.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Rendering.Metadata.Models; -using System.Collections.Generic; namespace EndlessClient.Rendering.Metadata { @@ -66,4 +66,4 @@ public HatMetadata GetValueOrDefault(int graphic) .ValueOr(DefaultMetadata.TryGetValue(graphic, out var ret) ? ret : HatMetadata.Default); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/IMetadataProvider.cs b/EndlessClient/Rendering/Metadata/IMetadataProvider.cs index df1392564..e7a5d35d1 100644 --- a/EndlessClient/Rendering/Metadata/IMetadataProvider.cs +++ b/EndlessClient/Rendering/Metadata/IMetadataProvider.cs @@ -1,5 +1,5 @@ -using EndlessClient.Rendering.Metadata.Models; -using System.Collections.Generic; +using System.Collections.Generic; +using EndlessClient.Rendering.Metadata.Models; namespace EndlessClient.Rendering.Metadata { @@ -10,4 +10,4 @@ public interface IMetadataProvider TMetadata GetValueOrDefault(int graphic); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/Models/EffectMetadata.cs b/EndlessClient/Rendering/Metadata/Models/EffectMetadata.cs index 40a1d66e1..1d529de90 100644 --- a/EndlessClient/Rendering/Metadata/Models/EffectMetadata.cs +++ b/EndlessClient/Rendering/Metadata/Models/EffectMetadata.cs @@ -46,4 +46,4 @@ public sealed partial class EffectMetadata : IGFXMetadata [JsonProperty("flickeringData")] public RandomFlickeringEffectMetadata RandomFlickeringMetadata { get; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/Models/HatMetadata.cs b/EndlessClient/Rendering/Metadata/Models/HatMetadata.cs index 46f283d17..f2413e944 100644 --- a/EndlessClient/Rendering/Metadata/Models/HatMetadata.cs +++ b/EndlessClient/Rendering/Metadata/Models/HatMetadata.cs @@ -1,13 +1,14 @@ -namespace EndlessClient.Rendering.Metadata.Models; - -public enum HatMaskType +namespace EndlessClient.Rendering.Metadata.Models { - Standard, - FaceMask, - HideHair -} + public enum HatMaskType + { + Standard, + FaceMask, + HideHair + } -public record HatMetadata(HatMaskType ClipMode) : IGFXMetadata -{ - public static HatMetadata Default { get; } = new HatMetadata(HatMaskType.Standard); -} + public record HatMetadata(HatMaskType ClipMode) : IGFXMetadata + { + public static HatMetadata Default { get; } = new HatMetadata(HatMaskType.Standard); + } +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/Models/IGFXMetadata.cs b/EndlessClient/Rendering/Metadata/Models/IGFXMetadata.cs index 08ecf689c..afff2bc1d 100644 --- a/EndlessClient/Rendering/Metadata/Models/IGFXMetadata.cs +++ b/EndlessClient/Rendering/Metadata/Models/IGFXMetadata.cs @@ -3,4 +3,4 @@ public interface IGFXMetadata { } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/Models/NPCMetadata.cs b/EndlessClient/Rendering/Metadata/Models/NPCMetadata.cs index ee0e800cf..4cbe72b7d 100644 --- a/EndlessClient/Rendering/Metadata/Models/NPCMetadata.cs +++ b/EndlessClient/Rendering/Metadata/Models/NPCMetadata.cs @@ -26,4 +26,4 @@ public sealed partial class NPCMetadata : IGFXMetadata [JsonProperty("nameHeight")] public int NameLabelOffset { get; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/Models/ShieldMetadata.cs b/EndlessClient/Rendering/Metadata/Models/ShieldMetadata.cs index 1755292c9..27ff1776f 100644 --- a/EndlessClient/Rendering/Metadata/Models/ShieldMetadata.cs +++ b/EndlessClient/Rendering/Metadata/Models/ShieldMetadata.cs @@ -1,6 +1,7 @@ -namespace EndlessClient.Rendering.Metadata.Models; - -public sealed record ShieldMetadata(bool IsShieldOnBack) : IGFXMetadata +namespace EndlessClient.Rendering.Metadata.Models { - public static ShieldMetadata Default { get; } = new ShieldMetadata(false); -} + public sealed record ShieldMetadata(bool IsShieldOnBack) : IGFXMetadata + { + public static ShieldMetadata Default { get; } = new ShieldMetadata(false); + } +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/Models/WeaponMetadata.cs b/EndlessClient/Rendering/Metadata/Models/WeaponMetadata.cs index 7e55ed2ed..03392aec6 100644 --- a/EndlessClient/Rendering/Metadata/Models/WeaponMetadata.cs +++ b/EndlessClient/Rendering/Metadata/Models/WeaponMetadata.cs @@ -1,8 +1,9 @@ using EndlessClient.Audio; -namespace EndlessClient.Rendering.Metadata.Models; - -public record WeaponMetadata(int? Slash, SoundEffectID[] SFX, bool Ranged) : IGFXMetadata +namespace EndlessClient.Rendering.Metadata.Models { - public static WeaponMetadata Default { get; } = new WeaponMetadata(Slash: null, SFX: new[] { SoundEffectID.PunchAttack }, Ranged: false); -} + public record WeaponMetadata(int? Slash, SoundEffectID[] SFX, bool Ranged) : IGFXMetadata + { + public static WeaponMetadata Default { get; } = new WeaponMetadata(Slash: null, SFX: new[] { SoundEffectID.PunchAttack }, Ranged: false); + } +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/NPCMetadataProvider.cs b/EndlessClient/Rendering/Metadata/NPCMetadataProvider.cs index 7a5aa6d37..8742d5c05 100644 --- a/EndlessClient/Rendering/Metadata/NPCMetadataProvider.cs +++ b/EndlessClient/Rendering/Metadata/NPCMetadataProvider.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Rendering.Metadata.Models; -using System.Collections.Generic; namespace EndlessClient.Rendering.Metadata { @@ -198,4 +198,4 @@ public NPCMetadata GetValueOrDefault(int graphic) .ValueOr(DefaultMetadata.TryGetValue(graphic, out var ret) ? ret : NPCMetadata.Default); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/ShieldMetadataProvider.cs b/EndlessClient/Rendering/Metadata/ShieldMetadataProvider.cs index 856f20287..a4eec431d 100644 --- a/EndlessClient/Rendering/Metadata/ShieldMetadataProvider.cs +++ b/EndlessClient/Rendering/Metadata/ShieldMetadataProvider.cs @@ -1,6 +1,6 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Rendering.Metadata.Models; -using System.Collections.Generic; namespace EndlessClient.Rendering.Metadata { @@ -33,4 +33,4 @@ public ShieldMetadata GetValueOrDefault(int graphic) .ValueOr(DefaultMetadata.TryGetValue(graphic, out var ret) ? ret : ShieldMetadata.Default); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Metadata/WeaponMetadataProvider.cs b/EndlessClient/Rendering/Metadata/WeaponMetadataProvider.cs index 95f2830a9..42320c127 100644 --- a/EndlessClient/Rendering/Metadata/WeaponMetadataProvider.cs +++ b/EndlessClient/Rendering/Metadata/WeaponMetadataProvider.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.Rendering.Metadata.Models; -using System.Collections.Generic; namespace EndlessClient.Rendering.Metadata { @@ -102,4 +102,4 @@ public WeaponMetadata GetValueOrDefault(int graphic) .ValueOr(DefaultMetadata.TryGetValue(graphic, out var ret) ? ret : WeaponMetadata.Default); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/MouseCursorRenderer.cs b/EndlessClient/Rendering/MouseCursorRenderer.cs index 97a1bf04f..25582eac3 100644 --- a/EndlessClient/Rendering/MouseCursorRenderer.cs +++ b/EndlessClient/Rendering/MouseCursorRenderer.cs @@ -1,4 +1,7 @@ -using EndlessClient.Controllers; +using System; +using System.Diagnostics; +using System.Linq; +using EndlessClient.Controllers; using EndlessClient.Dialogs; using EndlessClient.HUD; using EndlessClient.Input; @@ -12,9 +15,6 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Optional; -using System; -using System.Diagnostics; -using System.Linq; using XNAControls; namespace EndlessClient.Rendering @@ -80,7 +80,7 @@ public MouseCursorRenderer(INativeGraphicsManager nativeGraphicsManager, _contextMenuProvider = contextMenuProvider; SingleCursorFrameArea = new Rectangle(0, 0, - _mouseCursorTexture.Width/(int) CursorIndex.NumberOfFramesInSheet, + _mouseCursorTexture.Width / (int)CursorIndex.NumberOfFramesInSheet, _mouseCursorTexture.Height); DrawArea = SingleCursorFrameArea; @@ -258,7 +258,7 @@ public void Draw(SpriteBatch spriteBatch, Vector2 additionalOffset) { spriteBatch.Draw(_mouseCursorTexture, DrawPosition + additionalOffset, - new Rectangle(SingleCursorFrameArea.Width*(int) _cursorIndex, + new Rectangle(SingleCursorFrameArea.Width * (int)_cursorIndex, 0, SingleCursorFrameArea.Width, SingleCursorFrameArea.Height), @@ -315,4 +315,4 @@ public interface IMouseCursorRenderer : IXNAControl, IDisposable void ClearTransientRenderables(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/NPC/INPCRenderer.cs b/EndlessClient/Rendering/NPC/INPCRenderer.cs index 654c13446..deeb8e6c7 100644 --- a/EndlessClient/Rendering/NPC/INPCRenderer.cs +++ b/EndlessClient/Rendering/NPC/INPCRenderer.cs @@ -1,6 +1,6 @@ +using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; namespace EndlessClient.Rendering.NPC { diff --git a/EndlessClient/Rendering/NPC/NPCActions.cs b/EndlessClient/Rendering/NPC/NPCActions.cs index 02fe143b4..1a150be36 100644 --- a/EndlessClient/Rendering/NPC/NPCActions.cs +++ b/EndlessClient/Rendering/NPC/NPCActions.cs @@ -165,4 +165,4 @@ private void ShoutSpellCast(int playerId) private INPCAnimator Animator => _hudControlProvider.GetComponent(HudControlIdentifier.NPCAnimator); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/NPC/NPCAnimator.cs b/EndlessClient/Rendering/NPC/NPCAnimator.cs index e1115a58f..6ba1be037 100644 --- a/EndlessClient/Rendering/NPC/NPCAnimator.cs +++ b/EndlessClient/Rendering/NPC/NPCAnimator.cs @@ -1,12 +1,12 @@ -using EndlessClient.GameExecution; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.GameExecution; using EOLib; using EOLib.Domain.Extensions; using EOLib.Domain.Map; using EOLib.Domain.NPC; using Microsoft.Xna.Framework; using Optional.Collections; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering.NPC { @@ -34,7 +34,7 @@ public override void Update(GameTime gameTime) { AnimateNPCWalking(); AnimateNPCAttacking(); - + base.Update(gameTime); } @@ -143,4 +143,4 @@ public interface INPCAnimator : IGameComponent void StopAllAnimations(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/NPC/NPCCache.cs b/EndlessClient/Rendering/NPC/NPCCache.cs index 94c1e3fe4..bf05224cc 100644 --- a/EndlessClient/Rendering/NPC/NPCCache.cs +++ b/EndlessClient/Rendering/NPC/NPCCache.cs @@ -1,5 +1,5 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; +using AutomaticTypeMapper; namespace EndlessClient.Rendering.NPC { @@ -52,4 +52,4 @@ public interface INPCStateCache void Reset(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/NPC/NPCRenderer.cs b/EndlessClient/Rendering/NPC/NPCRenderer.cs index 0ffc99ec0..4fc11ccf3 100644 --- a/EndlessClient/Rendering/NPC/NPCRenderer.cs +++ b/EndlessClient/Rendering/NPC/NPCRenderer.cs @@ -1,4 +1,7 @@ -using EndlessClient.GameExecution; +using System; +using System.Collections.Generic; +using System.Linq; +using EndlessClient.GameExecution; using EndlessClient.Input; using EndlessClient.Rendering.Chat; using EndlessClient.Rendering.Effects; @@ -13,9 +16,6 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Optional; -using System; -using System.Collections.Generic; -using System.Linq; using XNAControls; namespace EndlessClient.Rendering.NPC @@ -344,4 +344,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/NPC/NPCRendererFactory.cs b/EndlessClient/Rendering/NPC/NPCRendererFactory.cs index 9f69cbc9a..882dab75b 100644 --- a/EndlessClient/Rendering/NPC/NPCRendererFactory.cs +++ b/EndlessClient/Rendering/NPC/NPCRendererFactory.cs @@ -70,4 +70,4 @@ public interface INPCRendererFactory { INPCRenderer CreateRendererFor(EOLib.Domain.NPC.NPC npc); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/NPC/NPCRendererRepository.cs b/EndlessClient/Rendering/NPC/NPCRendererRepository.cs index c3a48042f..15783949d 100644 --- a/EndlessClient/Rendering/NPC/NPCRendererRepository.cs +++ b/EndlessClient/Rendering/NPC/NPCRendererRepository.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; -using EOLib.Domain.Map; -using System; +using System; using System.Collections.Generic; +using AutomaticTypeMapper; +using EOLib.Domain.Map; namespace EndlessClient.Rendering.NPC { @@ -45,4 +45,4 @@ public void Dispose() DyingNPCs.Clear(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/NPC/NPCRendererUpdater.cs b/EndlessClient/Rendering/NPC/NPCRendererUpdater.cs index 931ac1f07..f5c24b7f7 100644 --- a/EndlessClient/Rendering/NPC/NPCRendererUpdater.cs +++ b/EndlessClient/Rendering/NPC/NPCRendererUpdater.cs @@ -1,9 +1,9 @@ -using AutomaticTypeMapper; +using System; +using System.Linq; +using AutomaticTypeMapper; using EOLib.Domain.Map; using Microsoft.Xna.Framework; using Optional; -using System; -using System.Linq; namespace EndlessClient.Rendering.NPC { @@ -130,4 +130,4 @@ public interface INPCRendererUpdater : IDisposable { void UpdateNPCs(GameTime gameTime); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/PlayerStatusIconRenderer.cs b/EndlessClient/Rendering/PlayerStatusIconRenderer.cs index b7150de34..efebacffa 100644 --- a/EndlessClient/Rendering/PlayerStatusIconRenderer.cs +++ b/EndlessClient/Rendering/PlayerStatusIconRenderer.cs @@ -1,10 +1,10 @@ -using EndlessClient.HUD.Spells; +using System; +using EndlessClient.HUD.Spells; using EOLib.Domain.Character; using EOLib.Domain.Map; using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using System; using XNAControls; namespace EndlessClient.Rendering @@ -55,7 +55,7 @@ public PlayerStatusIconRenderer(INativeGraphicsManager nativeGraphicsManager, protected override void OnUpdateControl(GameTime gameTime) { var c = _characterProvider.MainCharacter; - + _icons = 0; if (_currentMapProvider.CurrentMap.Properties.PKAvailable) _icons |= StatusIconType.PK; @@ -94,10 +94,10 @@ private Rectangle GetSourceRectangle(StatusIconType type) var heightDelta = _statusIcons.Height / 2; //convert from power of two 'flag' value to base 10 index - var index = (int)Math.Log((int) type, 2); + var index = (int)Math.Log((int)type, 2); - var xOffset = widthDelta*index; + var xOffset = widthDelta * index; return new Rectangle(xOffset, 0, widthDelta, heightDelta); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/PointComparer.cs b/EndlessClient/Rendering/PointComparer.cs index c191bcb5d..14bb1e178 100644 --- a/EndlessClient/Rendering/PointComparer.cs +++ b/EndlessClient/Rendering/PointComparer.cs @@ -14,4 +14,4 @@ public int Compare(Point a, Point b) return 0; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/RenderOffsetCalculator.cs b/EndlessClient/Rendering/RenderOffsetCalculator.cs index b012673df..6bbc5432a 100644 --- a/EndlessClient/Rendering/RenderOffsetCalculator.cs +++ b/EndlessClient/Rendering/RenderOffsetCalculator.cs @@ -12,12 +12,12 @@ public class RenderOffsetCalculator : IRenderOffsetCalculator { private const int WidthFactor = 32; private const int HeightFactor = 16; - private const int WalkWidthFactor = WidthFactor/4; - private const int WalkHeightFactor = HeightFactor/4; + private const int WalkWidthFactor = WidthFactor / 4; + private const int WalkHeightFactor = HeightFactor / 4; public int CalculateOffsetX(CharacterRenderProperties properties) { - return properties.MapX*WidthFactor - properties.MapY*WidthFactor + CalculateWalkAdjustX(properties); + return properties.MapX * WidthFactor - properties.MapY * WidthFactor + CalculateWalkAdjustX(properties); } public int CalculateWalkAdjustX(CharacterRenderProperties properties) @@ -29,7 +29,7 @@ public int CalculateWalkAdjustX(CharacterRenderProperties properties) public int CalculateOffsetY(CharacterRenderProperties properties) { - return properties.MapX*HeightFactor + properties.MapY*HeightFactor + CalculateWalkAdjustY(properties); + return properties.MapX * HeightFactor + properties.MapY * HeightFactor + CalculateWalkAdjustY(properties); } public int CalculateWalkAdjustY(CharacterRenderProperties properties) @@ -41,7 +41,7 @@ public int CalculateWalkAdjustY(CharacterRenderProperties properties) public int CalculateOffsetX(EOLib.Domain.NPC.NPC npc) { - return npc.X*WidthFactor - npc.Y*WidthFactor + CalculateWalkAdjustX(npc); + return npc.X * WidthFactor - npc.Y * WidthFactor + CalculateWalkAdjustX(npc); } public int CalculateWalkAdjustX(EOLib.Domain.NPC.NPC npc) @@ -54,7 +54,7 @@ public int CalculateWalkAdjustX(EOLib.Domain.NPC.NPC npc) public int CalculateOffsetY(EOLib.Domain.NPC.NPC npc) { - return npc.X*HeightFactor + npc.Y*HeightFactor + CalculateWalkAdjustY(npc); + return npc.X * HeightFactor + npc.Y * HeightFactor + CalculateWalkAdjustY(npc); } public int CalculateWalkAdjustY(EOLib.Domain.NPC.NPC npc) diff --git a/EndlessClient/Rendering/RendererRepositoryResetter.cs b/EndlessClient/Rendering/RendererRepositoryResetter.cs index 8d3b2bfd6..1a00ae3ab 100644 --- a/EndlessClient/Rendering/RendererRepositoryResetter.cs +++ b/EndlessClient/Rendering/RendererRepositoryResetter.cs @@ -38,4 +38,4 @@ public interface IRendererRepositoryResetter { void ResetRenderers(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Sprites/ArmorShieldSpriteType.cs b/EndlessClient/Rendering/Sprites/ArmorShieldSpriteType.cs index 6783e7ead..90c79b724 100644 --- a/EndlessClient/Rendering/Sprites/ArmorShieldSpriteType.cs +++ b/EndlessClient/Rendering/Sprites/ArmorShieldSpriteType.cs @@ -2,7 +2,7 @@ namespace EndlessClient.Rendering.Sprites { public enum ArmorShieldSpriteType { - //dir1/dir2 + //dir1/dir2 Standing = 1, //1/2 ShieldItemOnBack_AttackingWithBow = 3, WalkFrame1 = 3, //3/7 @@ -12,7 +12,7 @@ public enum ArmorShieldSpriteType SpellCast = 11, //11/12 PunchFrame1 = 13, //13/15 PunchFrame2 = 14, //14/16 - + //not valid for shields: SitChair = 17, //17/18 SitGround = 19, //19/20 diff --git a/EndlessClient/Rendering/Sprites/CharacterSpriteCalculator.cs b/EndlessClient/Rendering/Sprites/CharacterSpriteCalculator.cs index e1fcfbb79..a03f1a957 100644 --- a/EndlessClient/Rendering/Sprites/CharacterSpriteCalculator.cs +++ b/EndlessClient/Rendering/Sprites/CharacterSpriteCalculator.cs @@ -1,4 +1,6 @@ -using AutomaticTypeMapper; +using System; +using System.Linq; +using AutomaticTypeMapper; using EndlessClient.Rendering.Metadata; using EndlessClient.Rendering.Metadata.Models; using EOLib; @@ -6,8 +8,6 @@ using EOLib.Domain.Extensions; using EOLib.Graphics; using Microsoft.Xna.Framework; -using System; -using System.Linq; namespace EndlessClient.Rendering.Sprites { @@ -187,7 +187,7 @@ public ISpriteSheet GetShieldTexture(CharacterRenderProperties characterRenderPr { type = ArmorShieldSpriteType.SpellCast; } - else if(characterRenderProperties.SitState != SitState.Standing) + else if (characterRenderProperties.SitState != SitState.Standing) { return new EmptySpriteSheet(); } @@ -340,8 +340,8 @@ public ISpriteSheet GetSkinTexture(CharacterRenderProperties characterRenderProp var rotated = characterRenderProperties.Direction == EODirection.Left || characterRenderProperties.Direction == EODirection.Up; - var heightDelta = texture.Height / SheetRows; - var widthDelta = texture.Width / sheetColumns; + var heightDelta = texture.Height / SheetRows; + var widthDelta = texture.Width / sheetColumns; var sectionDelta = texture.Width / 4; var walkExtra = characterRenderProperties.RenderWalkFrame > 0 ? widthDelta * (characterRenderProperties.RenderWalkFrame - 1) : 0; @@ -429,16 +429,16 @@ public ISpriteSheet GetEmoteTexture(CharacterRenderProperties characterRenderPro const int NUM_EMOTES = 15; const int NUM_FRAMES = 4; - var emoteValue = Enum.GetName(typeof (Emote), characterRenderProperties.Emote) ?? ""; - var convertedValuesDictionary = Enum.GetNames(typeof (EmoteSpriteType)) - .ToDictionary(x => x, x => (EmoteSpriteType) Enum.Parse(typeof (EmoteSpriteType), x)); + var emoteValue = Enum.GetName(typeof(Emote), characterRenderProperties.Emote) ?? ""; + var convertedValuesDictionary = Enum.GetNames(typeof(EmoteSpriteType)) + .ToDictionary(x => x, x => (EmoteSpriteType)Enum.Parse(typeof(EmoteSpriteType), x)); var convertedEmote = (int)convertedValuesDictionary[emoteValue]; var emoteTexture = _gfxManager.TextureFromResource(GFXTypes.PostLoginUI, 38, true); var eachSet = emoteTexture.Width / NUM_EMOTES; var eachFrame = emoteTexture.Width / (NUM_EMOTES * NUM_FRAMES); - var startX = convertedEmote*eachSet + characterRenderProperties.EmoteFrame*eachFrame; + var startX = convertedEmote * eachSet + characterRenderProperties.EmoteFrame * eachFrame; var emoteRect = new Rectangle(startX, 0, eachFrame, emoteTexture.Height); @@ -531,4 +531,4 @@ private bool BowIsEquipped(CharacterRenderProperties characterRenderProperties) return _weaponMetadataProvider.GetValueOrDefault(characterRenderProperties.WeaponGraphic).Ranged; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Sprites/EmoteSpriteType.cs b/EndlessClient/Rendering/Sprites/EmoteSpriteType.cs index aad9b755c..12edf2cba 100644 --- a/EndlessClient/Rendering/Sprites/EmoteSpriteType.cs +++ b/EndlessClient/Rendering/Sprites/EmoteSpriteType.cs @@ -18,4 +18,4 @@ public enum EmoteSpriteType Playful = 13, MusicNotes = 14, } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Sprites/EmptySpriteSheet.cs b/EndlessClient/Rendering/Sprites/EmptySpriteSheet.cs index 9fed00789..46028fe61 100644 --- a/EndlessClient/Rendering/Sprites/EmptySpriteSheet.cs +++ b/EndlessClient/Rendering/Sprites/EmptySpriteSheet.cs @@ -28,4 +28,4 @@ public Texture2D GetSourceTexture() return SheetTexture; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Sprites/ICharacterSpriteCalculator.cs b/EndlessClient/Rendering/Sprites/ICharacterSpriteCalculator.cs index 1fe5818ba..f50db921c 100644 --- a/EndlessClient/Rendering/Sprites/ICharacterSpriteCalculator.cs +++ b/EndlessClient/Rendering/Sprites/ICharacterSpriteCalculator.cs @@ -16,4 +16,4 @@ public interface ICharacterSpriteCalculator ISpriteSheet GetFaceTexture(CharacterRenderProperties characterRenderProperties); ISpriteSheet GetEmoteTexture(CharacterRenderProperties characterRenderProperties); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Sprites/ISpriteSheet.cs b/EndlessClient/Rendering/Sprites/ISpriteSheet.cs index 7b1edde8e..10e7863a6 100644 --- a/EndlessClient/Rendering/Sprites/ISpriteSheet.cs +++ b/EndlessClient/Rendering/Sprites/ISpriteSheet.cs @@ -15,4 +15,4 @@ public interface ISpriteSheet Texture2D GetSourceTexture(); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Sprites/NPCSpriteDataCache.cs b/EndlessClient/Rendering/Sprites/NPCSpriteDataCache.cs index a009ea936..173930a33 100644 --- a/EndlessClient/Rendering/Sprites/NPCSpriteDataCache.cs +++ b/EndlessClient/Rendering/Sprites/NPCSpriteDataCache.cs @@ -1,10 +1,10 @@ -using AutomaticTypeMapper; +using System; +using System.Collections.Generic; +using System.Linq; +using AutomaticTypeMapper; using EOLib; using EOLib.Domain.NPC; using Microsoft.Xna.Framework; -using System; -using System.Collections.Generic; -using System.Linq; namespace EndlessClient.Rendering.Sprites { @@ -115,4 +115,4 @@ public interface INPCSpriteDataCache bool IsBlankSprite(int graphic); } -} +} \ No newline at end of file diff --git a/EndlessClient/Rendering/Sprites/SpriteSheet.cs b/EndlessClient/Rendering/Sprites/SpriteSheet.cs index bbef04b71..4e44ea418 100644 --- a/EndlessClient/Rendering/Sprites/SpriteSheet.cs +++ b/EndlessClient/Rendering/Sprites/SpriteSheet.cs @@ -48,4 +48,4 @@ public Texture2D GetSourceTexture() return retText; } } -} +} \ No newline at end of file diff --git a/EndlessClient/Services/FriendIgnoreListService.cs b/EndlessClient/Services/FriendIgnoreListService.cs index b813ff9ca..17e3561d0 100644 --- a/EndlessClient/Services/FriendIgnoreListService.cs +++ b/EndlessClient/Services/FriendIgnoreListService.cs @@ -1,7 +1,7 @@ -using AutomaticTypeMapper; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; +using AutomaticTypeMapper; namespace EndlessClient.Services { @@ -87,4 +87,4 @@ public interface IFriendIgnoreListService void SaveNewIgnore(string path, string name); } -} +} \ No newline at end of file diff --git a/EndlessClient/Subscribers/ArenaEventSubscriber.cs b/EndlessClient/Subscribers/ArenaEventSubscriber.cs index b25bb9d9d..64e75a756 100644 --- a/EndlessClient/Subscribers/ArenaEventSubscriber.cs +++ b/EndlessClient/Subscribers/ArenaEventSubscriber.cs @@ -1,4 +1,5 @@ -using AutomaticTypeMapper; +using System.Collections.Generic; +using AutomaticTypeMapper; using EndlessClient.Audio; using EndlessClient.ControlSets; using EndlessClient.HUD.Chat; @@ -11,7 +12,6 @@ using EOLib.Domain.Notifiers; using EOLib.IO.Map; using EOLib.Localization; -using System.Collections.Generic; namespace EndlessClient.Subscribers { @@ -104,4 +104,4 @@ private static bool AdjacentToArenaTile(MapCoordinate coord, IReadOnlyMatrix 500) { - var rend = _renderersForDifferentStates[(int) DisplayState.WalkingAnimation]; + var rend = _renderersForDifferentStates[(int)DisplayState.WalkingAnimation]; rend.Character = rend.Character.WithRenderProperties(rend.Character.RenderProperties.WithNextWalkFrame(false)); _lastWalk = now; } @@ -264,7 +264,7 @@ private void RefreshDisplayedCharacters() foreach (var displayState in _allDisplayStates) { var props = GetRenderPropertiesForState(displayState); - _renderersForDifferentStates[(int) displayState].Character = Character.Default.WithRenderProperties(props); + _renderersForDifferentStates[(int)displayState].Character = Character.Default.WithRenderProperties(props); } } @@ -303,4 +303,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/Test/TestModeLauncher.cs b/EndlessClient/Test/TestModeLauncher.cs index 0e0f5cbd3..b6d5e8f96 100644 --- a/EndlessClient/Test/TestModeLauncher.cs +++ b/EndlessClient/Test/TestModeLauncher.cs @@ -49,4 +49,4 @@ public interface ITestModeLauncher { void LaunchTestMode(); } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/BlinkingLabel.cs b/EndlessClient/UIControls/BlinkingLabel.cs index 0c4663d6d..1ed9d3bc7 100644 --- a/EndlessClient/UIControls/BlinkingLabel.cs +++ b/EndlessClient/UIControls/BlinkingLabel.cs @@ -51,4 +51,4 @@ public override void Update(GameTime gameTime) base.Update(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/CharacterControl.cs b/EndlessClient/UIControls/CharacterControl.cs index 11d7c7a0f..fd68673cc 100644 --- a/EndlessClient/UIControls/CharacterControl.cs +++ b/EndlessClient/UIControls/CharacterControl.cs @@ -59,4 +59,4 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/CharacterInfoPanel.cs b/EndlessClient/UIControls/CharacterInfoPanel.cs index 0ba977bd4..3a3730f16 100644 --- a/EndlessClient/UIControls/CharacterInfoPanel.cs +++ b/EndlessClient/UIControls/CharacterInfoPanel.cs @@ -1,4 +1,6 @@ -using EndlessClient.Controllers; +using System; +using System.Threading.Tasks; +using EndlessClient.Controllers; using EndlessClient.Dialogs.Services; using EndlessClient.Input; using EndlessClient.Rendering; @@ -11,8 +13,6 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using Moffat.EndlessOnline.SDK.Protocol; -using System; -using System.Threading.Tasks; using XNAControls; namespace EndlessClient.UIControls @@ -44,7 +44,7 @@ protected CharacterInfoPanel(int characterIndex, { _characterIndex = characterIndex; _gfxManager = gfxManager; - DrawPosition = new Vector2(334, 36 + characterIndex*124); + DrawPosition = new Vector2(334, 36 + characterIndex * 124); _loginButton = new XNAButton(dialogButtonService.SmallButtonSheet, new Vector2(161, 57), @@ -204,7 +204,7 @@ private static string CapitalizeName(string name) private ISpriteSheet CreateAdminGraphic(AdminLevel adminLevel) { var adminGraphic = _gfxManager.TextureFromResource(GFXTypes.PreLoginUI, 22); - + switch (adminLevel) { case AdminLevel.Player: @@ -250,4 +250,4 @@ protected override void AsyncButtonClick(Func clickHandler) { } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/CharacterInfoPanelFactory.cs b/EndlessClient/UIControls/CharacterInfoPanelFactory.cs index aa069e6e3..c8ebdca1d 100644 --- a/EndlessClient/UIControls/CharacterInfoPanelFactory.cs +++ b/EndlessClient/UIControls/CharacterInfoPanelFactory.cs @@ -50,7 +50,7 @@ public void InjectCharacterManagementController(ICharacterManagementController c public IEnumerable CreatePanels(IEnumerable characters) { - if(_loginController == null || _characterManagementController == null) + if (_loginController == null || _characterManagementController == null) throw new InvalidOperationException("Missing controllers - the Unity container was initialized incorrectly"); int i = 0; diff --git a/EndlessClient/UIControls/ChatModePictureBox.cs b/EndlessClient/UIControls/ChatModePictureBox.cs index 9fe2e1e6f..369f16218 100644 --- a/EndlessClient/UIControls/ChatModePictureBox.cs +++ b/EndlessClient/UIControls/ChatModePictureBox.cs @@ -1,11 +1,11 @@ -using EndlessClient.ControlSets; +using System; +using EndlessClient.ControlSets; using EndlessClient.HUD.Chat; using EndlessClient.HUD.Controls; using EndlessClient.Rendering; using EOLib.Graphics; using Microsoft.Xna.Framework; using Optional; -using System; using XNAControls; namespace EndlessClient.UIControls @@ -100,4 +100,4 @@ private void UpdateSourceRectangleForMode(ChatMode mode) private ChatTextBox ChatTextBox => _hudControlProvider.GetComponent(HudControlIdentifier.ChatTextBox); } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/ChatTextBox.cs b/EndlessClient/UIControls/ChatTextBox.cs index 0a086cb52..c62ac8e3d 100644 --- a/EndlessClient/UIControls/ChatTextBox.cs +++ b/EndlessClient/UIControls/ChatTextBox.cs @@ -1,4 +1,5 @@ -using EndlessClient.Content; +using System; +using EndlessClient.Content; using EndlessClient.Rendering; using EOLib; using EOLib.Graphics; @@ -7,7 +8,6 @@ using Microsoft.Xna.Framework.Input; using MonoGame.Extended.Input.InputListeners; using Optional; -using System; using XNAControls; namespace EndlessClient.UIControls @@ -135,4 +135,4 @@ private bool IsSpecialInput(Keys k, KeyboardModifiers modifiers) modifiers == KeyboardModifiers.Alt; } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/ClickableArea.cs b/EndlessClient/UIControls/ClickableArea.cs index 0df1cc688..52b3bb664 100644 --- a/EndlessClient/UIControls/ClickableArea.cs +++ b/EndlessClient/UIControls/ClickableArea.cs @@ -1,6 +1,6 @@ -using Microsoft.Xna.Framework; +using System; +using Microsoft.Xna.Framework; using MonoGame.Extended.Input.InputListeners; -using System; using XNAControls; namespace EndlessClient.UIControls @@ -38,4 +38,4 @@ protected override bool HandleClick(IXNAControl control, MouseEventArgs eventArg return true; } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/CreateCharacterControl.cs b/EndlessClient/UIControls/CreateCharacterControl.cs index 7dfae3d85..056492216 100644 --- a/EndlessClient/UIControls/CreateCharacterControl.cs +++ b/EndlessClient/UIControls/CreateCharacterControl.cs @@ -1,17 +1,17 @@ using System; -using Microsoft.Xna.Framework; -using MonoGame.Extended.Input.InputListeners; -using XNAControls; using EndlessClient.Rendering.Factories; using EOLib; using EOLib.Domain.Character; +using Microsoft.Xna.Framework; +using MonoGame.Extended.Input.InputListeners; +using XNAControls; namespace EndlessClient.UIControls { public class CreateCharacterControl : CharacterControl { private Vector2 _lastPosition; - + public event EventHandler Clicked; @@ -79,4 +79,4 @@ private static CharacterRenderProperties GetDefaultProperties() return new CharacterRenderProperties.Builder { HairStyle = 1 }.ToImmutable(); } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/ICharacterInfoPanelFactory.cs b/EndlessClient/UIControls/ICharacterInfoPanelFactory.cs index f3f1591a0..1fa155882 100644 --- a/EndlessClient/UIControls/ICharacterInfoPanelFactory.cs +++ b/EndlessClient/UIControls/ICharacterInfoPanelFactory.cs @@ -10,4 +10,4 @@ public interface ICharacterInfoPanelFactory void InjectLoginController(ILoginController loginController); void InjectCharacterManagementController(ICharacterManagementController characterManagementController); } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/ScrollBar.cs b/EndlessClient/UIControls/ScrollBar.cs index 18a4af655..879f8cd5f 100644 --- a/EndlessClient/UIControls/ScrollBar.cs +++ b/EndlessClient/UIControls/ScrollBar.cs @@ -1,8 +1,8 @@ -using EOLib.Graphics; +using System; +using EOLib.Graphics; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using MonoGame.Extended.Input.InputListeners; -using System; using XNAControls; namespace EndlessClient.UIControls @@ -232,4 +232,4 @@ protected override bool HandleMouseWheelMoved(IXNAControl control, MouseEventArg return true; } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/StatusBarLabel.cs b/EndlessClient/UIControls/StatusBarLabel.cs index 95500fe3b..691789940 100644 --- a/EndlessClient/UIControls/StatusBarLabel.cs +++ b/EndlessClient/UIControls/StatusBarLabel.cs @@ -79,4 +79,4 @@ protected override void OnDrawControl(GameTime gameTime) base.OnDrawControl(gameTime); } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/TimeLabel.cs b/EndlessClient/UIControls/TimeLabel.cs index 3436133a1..a4a99e2f6 100644 --- a/EndlessClient/UIControls/TimeLabel.cs +++ b/EndlessClient/UIControls/TimeLabel.cs @@ -39,4 +39,4 @@ private static Rectangle GetPositionBasedOnWindowSize(IClientWindowSizeProvider return new Rectangle(xLoc, yLoc, 1, 1); } } -} +} \ No newline at end of file diff --git a/EndlessClient/UIControls/XnaControlSoundMapper.cs b/EndlessClient/UIControls/XnaControlSoundMapper.cs index 9b81490d1..880c32796 100644 --- a/EndlessClient/UIControls/XnaControlSoundMapper.cs +++ b/EndlessClient/UIControls/XnaControlSoundMapper.cs @@ -43,4 +43,4 @@ public interface IXnaControlSoundMapper { void BindSoundToControl(IGameComponent component, Option soundEffectOverride = default); } -} +} \ No newline at end of file diff --git a/README.md b/README.md index 78130ca47..13253faf3 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,12 @@ After installing, clone (or fork+clone) this repository locally and open the sol > - Windows: `rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache` > - Linux: `rm -rf ~/.dotnet/toolResolverCache` +> ⚠️ If you get build errors due to formatting +> +> Run the following commands: +> - Windows: `dotnet format EndlessClient.sln` +> - Linux: `dotnet format EndlessClient.Linux.sln` + ### Building on Mac 1. Download and install the [.NET 6.0 SDK (x64)](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.403-macos-x64-installer). @@ -56,6 +62,11 @@ After installing, clone (or fork+clone) this repository locally and open the sol 6. Run `echo '' > EndlessClient/obj/Debug/net6.0-macos/osx-x64/EndlessClient.GlobalUsings.g.*.generated.cs` 7. Run the build again `dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient` +#### Mac errors + +Problem: `error NETSDK1139: The target platform identifier macos was not recognized.` +Solution: run the command `sudo dotnet workload restore EndlessClient/EndlessClient.csproj` which will install the macos workload for you. + Todo list --------------------- diff --git a/contributing.md b/contributing.md index f9b31db66..1a48cd663 100644 --- a/contributing.md +++ b/contributing.md @@ -1,4 +1,4 @@ -# Contributing +# Contributing This is a general guide for contributing to the EndlessClient project. Pull requests that do not meet the minimum of these requirements will not be accepted, and you will be referred to this document. This is an evolving document and is subject to change without notice. @@ -30,6 +30,12 @@ Here are the style requirements for this project. This is the bare minimum you m - Put empty lines around functions, properties, etc. - Avoid use of explicit `this` or `base` keywords +> ⚠️ If you do not adhere to the above code style, your build may fail locally +> +> To resolve build errors due to formatting, run the following commands: +> - Windows: `dotnet format EndlessClient.sln` +> - Linux: `dotnet format EndlessClient.Linux.sln` + ### Naming Try to follow standard C# namining conventions diff --git a/global.json b/global.json new file mode 100644 index 000000000..b9357befe --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk" : { + "version": "6.0.0", + "rollForward": "latestFeature" + } +} \ No newline at end of file