diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index cea06e787a486d3b6a3bf036a4712a2640f1d357..da0c0f51eb10f8dcc924f3189bf3aac939e99005 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,433 +1,441 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.codeComplete.argumentPrefixes= -org.eclipse.jdt.core.codeComplete.argumentSuffixes= -org.eclipse.jdt.core.codeComplete.fieldPrefixes= -org.eclipse.jdt.core.codeComplete.fieldSuffixes= -org.eclipse.jdt.core.codeComplete.localPrefixes= -org.eclipse.jdt.core.codeComplete.localSuffixes= -org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= -org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= -org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullable.secondary= -org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning -org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=no_tag -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning -org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error -org.eclipse.jdt.core.compiler.problem.nullReference=warning -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning -org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled -org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=warning -org.eclipse.jdt.core.compiler.problem.unusedLocal=warning -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning -org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.source=11 -org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=48 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0 -org.eclipse.jdt.core.formatter.alignment_for_assignment=4 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=49 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=85 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=48 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 -org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 -org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line -org.eclipse.jdt.core.formatter.brace_position_for_block=next_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=next_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert -org.eclipse.jdt.core.formatter.comment.line_length=300 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=1 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=300 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false -org.eclipse.jdt.core.formatter.tabulation.char=tab -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_on_off_tags=true -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true -org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=11 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=warning +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=48 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_assignment=4 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=49 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=49 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=85 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=48 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=true +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=300 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=1 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.lineSplit=300 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=false +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs index 2f9fc0c35da2e738cd8962958f21f2582fab4dc9..04b83b48a3af8a0d055f2c6b1cfc569f6d215066 100644 --- a/.settings/org.eclipse.jdt.ui.prefs +++ b/.settings/org.eclipse.jdt.ui.prefs @@ -16,6 +16,7 @@ cleanup.convert_to_enhanced_for_loop=true cleanup.correct_indentation=false cleanup.format_source_code=true cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false cleanup.make_local_variable_final=false cleanup.make_parameters_final=false cleanup.make_private_fields_final=true @@ -30,6 +31,9 @@ cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=tru cleanup.qualify_static_member_accesses_with_declaring_class=true cleanup.qualify_static_method_accesses_with_declaring_class=false cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=true +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true cleanup.remove_trailing_whitespaces=false cleanup.remove_trailing_whitespaces_all=true cleanup.remove_trailing_whitespaces_ignore_empty=true @@ -52,12 +56,12 @@ cleanup.use_this_for_non_static_field_access=true cleanup.use_this_for_non_static_field_access_only_if_necessary=true cleanup.use_this_for_non_static_method_access=true cleanup.use_this_for_non_static_method_access_only_if_necessary=true -cleanup_profile=_L2J Clean Up v0.3 +cleanup_profile=_L2J Clean Up v0.4 cleanup_settings_version=2 eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_L2J Formatter v0.5 -formatter_settings_version=12 +formatter_profile=_L2J Formatter v0.6 +formatter_settings_version=15 org.eclipse.jdt.ui.exception.name=e org.eclipse.jdt.ui.gettersetter.use.is=true org.eclipse.jdt.ui.ignorelowercasenames=true diff --git a/dist/game/data/scripts/custom/events/Race/Race.java b/dist/game/data/scripts/custom/events/Race/Race.java index a40068c2d3b65b03158736c3b8cad280106ed675..1db86b5615d60dead3a669a10277839d7ba44257 100644 --- a/dist/game/data/scripts/custom/events/Race/Race.java +++ b/dist/game/data/scripts/custom/events/Race/Race.java @@ -38,8 +38,7 @@ import com.l2jserver.gameserver.util.Broadcast; /** * @author Gnacik */ -public final class Race extends Event -{ +public final class Race extends Event { // Event NPC's list private final Set<L2Npc> _npcs = ConcurrentHashMap.newKeySet(); // Npc @@ -49,23 +48,22 @@ public final class Race extends Event // Event Task ScheduledFuture<?> _eventTask = null; // Event state - private static boolean _isactive = false; + private static boolean _isActive = false; // Race state private static boolean _isRaceStarted = false; // 5 min for register - private static final int _time_register = 5; + private static final int TIME_REGISTER = 5; // 5 min for race - private static final int _time_race = 10; + private static final int TIME_RACE = 10; // NPC's - private static final int _start_npc = 900103; - private static final int _stop_npc = 900104; + private static final int START_NPC = 900103; + private static final int STOP_NPC = 900104; // Skills (Frog by default) private static int _skill = 6201; // We must keep second NPC spawn for radar private static int[] _randspawn = null; // Locations - private static final String[] _locations = - { + private static final String[] LOCATIONS = { "Heretic catacomb enterance", "Dion castle bridge", "Floran village enterance", @@ -73,7 +71,7 @@ public final class Race extends Event }; // @formatter:off - private static final int[][] _coords = + private static final int[][] COORDS = { // x, y, z, heading { 39177, 144345, -3650, 0 }, @@ -81,7 +79,7 @@ public final class Race extends Event { 16537, 169937, -3500, 0 }, { 7644, 150898, -2890, 0 } }; - private static final int[][] _rewards = + private static final int[][] REWARDS = { { 6622, 2 }, // Giant's Codex { 9625, 2 }, // Giant's Codex - @@ -100,55 +98,49 @@ public final class Race extends Event }; // @formatter:on - private Race() - { + private Race() { super(Race.class.getSimpleName(), "custom/events"); - addStartNpc(_start_npc); - addFirstTalkId(_start_npc); - addTalkId(_start_npc); - addStartNpc(_stop_npc); - addFirstTalkId(_stop_npc); - addTalkId(_stop_npc); + addStartNpc(START_NPC); + addFirstTalkId(START_NPC); + addTalkId(START_NPC); + addStartNpc(STOP_NPC); + addFirstTalkId(STOP_NPC); + addTalkId(STOP_NPC); } @Override - public boolean eventStart(L2PcInstance eventMaker) - { + public boolean eventStart(L2PcInstance eventMaker) { // Don't start event if its active - if (_isactive) - { + if (_isActive) { return false; } // Check Custom Table - we use custom NPC's - if (!Config.CUSTOM_NPC_DATA) - { + if (!Config.CUSTOM_NPC_DATA) { _log.info(getName() + ": Event can't be started, because custom npc table is disabled!"); eventMaker.sendMessage("Event " + getName() + " can't be started because custom NPC table is disabled!"); return false; } // Set Event active - _isactive = true; + _isActive = true; // Spawn Manager - _npc = recordSpawn(_start_npc, 18429, 145861, -3090, 0, false, 0); + _npc = recordSpawn(START_NPC, 18429, 145861, -3090, 0, false, 0); // Announce event start Broadcast.toAllOnlinePlayers("* Race Event started! *"); - Broadcast.toAllOnlinePlayers("Visit Event Manager in Dion village and signup, you have " + _time_register + " min before Race Start..."); + Broadcast.toAllOnlinePlayers("Visit Event Manager in Dion village and signup, you have " + TIME_REGISTER + " min before Race Start..."); // Schedule Event end - _eventTask = ThreadPoolManager.getInstance().scheduleGeneral(() -> StartRace(), _time_register * 60 * 1000); + _eventTask = ThreadPoolManager.getInstance().scheduleGeneral(() -> StartRace(), TIME_REGISTER * 60 * 1000); return true; } - protected void StartRace() - { + protected void StartRace() { // Abort race if no players signup - if (_players.isEmpty()) - { + if (_players.isEmpty()) { Broadcast.toAllOnlinePlayers("Race aborted, nobody signup."); eventStop(); return; @@ -158,66 +150,56 @@ public final class Race extends Event // Announce Broadcast.toAllOnlinePlayers("Race started!"); // Get random Finish - int location = getRandom(0, _locations.length - 1); - _randspawn = _coords[location]; + int location = getRandom(0, LOCATIONS.length - 1); + _randspawn = COORDS[location]; // And spawn NPC - recordSpawn(_stop_npc, _randspawn[0], _randspawn[1], _randspawn[2], _randspawn[3], false, 0); + recordSpawn(STOP_NPC, _randspawn[0], _randspawn[1], _randspawn[2], _randspawn[3], false, 0); // Transform players and send message - for (L2PcInstance player : _players) - { - if (player.isOnline()) - { - if (player.isInsideRadius(_npc, 500, false, false)) - { - sendMessage(player, "Race started! Go find Finish NPC as fast as you can... He is located near " + _locations[location]); + for (L2PcInstance player : _players) { + if (player.isOnline()) { + if (player.isInsideRadius(_npc, 500, false, false)) { + sendMessage(player, "Race started! Go find Finish NPC as fast as you can... He is located near " + LOCATIONS[location]); transformPlayer(player); player.getRadar().addMarker(_randspawn[0], _randspawn[1], _randspawn[2]); } - else - { + else { sendMessage(player, "I told you stay near me right? Distance was too high, you are excluded from race"); _players.remove(player); } } } // Schedule timeup for Race - _eventTask = ThreadPoolManager.getInstance().scheduleGeneral(() -> timeUp(), _time_race * 60 * 1000); + _eventTask = ThreadPoolManager.getInstance().scheduleGeneral(() -> timeUp(), TIME_RACE * 60 * 1000); } @Override - public boolean eventStop() - { + public boolean eventStop() { // Don't stop inactive event - if (!_isactive) - { + if (!_isActive) { return false; } // Set inactive - _isactive = false; + _isActive = false; _isRaceStarted = false; // Cancel task if any - if (_eventTask != null) - { + if (_eventTask != null) { _eventTask.cancel(true); _eventTask = null; } // Untransform players // Teleport to event start point - for (L2PcInstance player : _players) - { - if (player.isOnline()) - { + for (L2PcInstance player : _players) { + if (player.isOnline()) { player.untransform(); player.teleToLocation(_npc.getX(), _npc.getY(), _npc.getZ(), true); } } _players.clear(); // Despawn NPCs - for (L2Npc _npc : _npcs) - { - _npc.deleteMe(); + for (L2Npc npc : _npcs) { + npc.deleteMe(); } _npcs.clear(); // Announce event end @@ -227,39 +209,30 @@ public final class Race extends Event } @Override - public boolean eventBypass(L2PcInstance activeChar, String bypass) - { - if (bypass.startsWith("skill")) - { - if (_isRaceStarted) - { + public boolean eventBypass(L2PcInstance activeChar, String bypass) { + if (bypass.startsWith("skill")) { + if (_isRaceStarted) { activeChar.sendMessage("Race already started, you cannot change transform skill now"); } - else - { + else { int _number = Integer.valueOf(bypass.substring(5)); Skill _sk = SkillData.getInstance().getSkill(_number, 1); - if (_sk != null) - { + if (_sk != null) { _skill = _number; activeChar.sendMessage("Transform skill set to:"); activeChar.sendMessage(_sk.getName()); } - else - { + else { activeChar.sendMessage("Error while changing transform skill"); } } } - else if (bypass.startsWith("tele")) - { - if ((Integer.valueOf(bypass.substring(4)) > 0) && (_randspawn != null)) - { + else if (bypass.startsWith("tele")) { + if ((Integer.valueOf(bypass.substring(4)) > 0) && (_randspawn != null)) { activeChar.teleToLocation(_randspawn[0], _randspawn[1], _randspawn[2]); } - else - { + else { activeChar.teleToLocation(18429, 145861, -3090); } } @@ -268,52 +241,41 @@ public final class Race extends Event } @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = event; QuestState st = getQuestState(player, false); - if (st == null) - { + if (st == null) { return null; } - if (event.equalsIgnoreCase("transform")) - { + if (event.equalsIgnoreCase("transform")) { transformPlayer(player); return null; } - else if (event.equalsIgnoreCase("untransform")) - { + else if (event.equalsIgnoreCase("untransform")) { player.untransform(); return null; } - else if (event.equalsIgnoreCase("showfinish")) - { + else if (event.equalsIgnoreCase("showfinish")) { player.getRadar().addMarker(_randspawn[0], _randspawn[1], _randspawn[2]); return null; } - else if (event.equalsIgnoreCase("signup")) - { - if (_players.contains(player)) - { + else if (event.equalsIgnoreCase("signup")) { + if (_players.contains(player)) { return "900103-onlist.htm"; } _players.add(player); return "900103-signup.htm"; } - else if (event.equalsIgnoreCase("quit")) - { + else if (event.equalsIgnoreCase("quit")) { player.untransform(); - if (_players.contains(player)) - { + if (_players.contains(player)) { _players.remove(player); } return "900103-quit.htm"; } - else if (event.equalsIgnoreCase("finish")) - { - if (player.isAffectedBySkill(_skill)) - { + else if (event.equalsIgnoreCase("finish")) { + if (player.isAffectedBySkill(_skill)) { winRace(player); return "900104-winner.htm"; } @@ -323,45 +285,36 @@ public final class Race extends Event } @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { + public String onFirstTalk(L2Npc npc, L2PcInstance player) { getQuestState(player, true); - if (npc.getId() == _start_npc) - { - if (_isRaceStarted) - { - return _start_npc + "-started-" + isRacing(player) + ".htm"; + if (npc.getId() == START_NPC) { + if (_isRaceStarted) { + return START_NPC + "-started-" + isRacing(player) + ".htm"; } - return _start_npc + "-" + isRacing(player) + ".htm"; + return START_NPC + "-" + isRacing(player) + ".htm"; } - else if ((npc.getId() == _stop_npc) && _isRaceStarted) - { - return _stop_npc + "-" + isRacing(player) + ".htm"; + else if ((npc.getId() == STOP_NPC) && _isRaceStarted) { + return STOP_NPC + "-" + isRacing(player) + ".htm"; } return npc.getId() + ".htm"; } - private int isRacing(L2PcInstance player) - { + private int isRacing(L2PcInstance player) { return _players.contains(player) ? 1 : 0; } - private L2Npc recordSpawn(int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay) - { + private L2Npc recordSpawn(int npcId, int x, int y, int z, int heading, boolean randomOffSet, long despawnDelay) { final L2Npc npc = addSpawn(npcId, x, y, z, heading, randomOffSet, despawnDelay); _npcs.add(npc); return npc; } - private void transformPlayer(L2PcInstance player) - { - if (player.isTransformed() || player.isInStance()) - { + private void transformPlayer(L2PcInstance player) { + if (player.isTransformed() || player.isInStance()) { player.untransform(); } - if (player.isSitting()) - { + if (player.isSitting()) { player.standUp(); } @@ -371,35 +324,30 @@ public final class Race extends Event SkillData.getInstance().getSkill(_skill, 1).applyEffects(player, player); } - private void sendMessage(L2PcInstance player, String text) - { + private void sendMessage(L2PcInstance player, String text) { player.sendPacket(new CreatureSay(_npc.getObjectId(), 20, _npc.getName(), text)); } - private void showMenu(L2PcInstance activeChar) - { + private void showMenu(L2PcInstance activeChar) { final NpcHtmlMessage html = new NpcHtmlMessage(); String content = getHtm(activeChar.getHtmlPrefix(), "admin_menu.htm"); html.setHtml(content); activeChar.sendPacket(html); } - protected void timeUp() - { + protected void timeUp() { Broadcast.toAllOnlinePlayers("Time up, nobody wins!"); eventStop(); } - private void winRace(L2PcInstance player) - { - int[] _reward = _rewards[getRandom(_rewards.length - 1)]; + private void winRace(L2PcInstance player) { + int[] _reward = REWARDS[getRandom(REWARDS.length - 1)]; player.addItem("eventModRace", _reward[0], _reward[1], _npc, true); Broadcast.toAllOnlinePlayers(player.getName() + " is a winner!"); eventStop(); } - public static void main(String[] args) - { + public static void main(String[] args) { new Race(); } } \ No newline at end of file diff --git a/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java b/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java index 46da42204989f5c5a6a338abd73d099de81543b5..a41da6e27feb66af0ee4e12543f41de7deac5a82 100644 --- a/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java +++ b/dist/game/data/scripts/handlers/admincommandhandlers/AdminEditChar.java @@ -61,12 +61,10 @@ import com.l2jserver.util.StringUtil; /** * EditChar admin command implementation. */ -public class AdminEditChar implements IAdminCommandHandler -{ +public class AdminEditChar implements IAdminCommandHandler { private static Logger _log = Logger.getLogger(AdminEditChar.class.getName()); - private static final String[] ADMIN_COMMANDS = - { + private static final String[] ADMIN_COMMANDS = { "admin_edit_character", "admin_current_player", "admin_nokarma", // this is to remove karma from selected char... @@ -105,132 +103,104 @@ public class AdminEditChar implements IAdminCommandHandler }; @Override - public boolean useAdminCommand(String command, L2PcInstance activeChar) - { - if (command.equals("admin_current_player")) - { + public boolean useAdminCommand(String command, L2PcInstance activeChar) { + if (command.equals("admin_current_player")) { showCharacterInfo(activeChar, activeChar); } - else if (command.startsWith("admin_character_info")) - { + else if (command.startsWith("admin_character_info")) { String[] data = command.split(" "); - if ((data.length > 1)) - { + if ((data.length > 1)) { showCharacterInfo(activeChar, L2World.getInstance().getPlayer(data[1])); } - else if (activeChar.getTarget() instanceof L2PcInstance) - { + else if (activeChar.getTarget() instanceof L2PcInstance) { showCharacterInfo(activeChar, activeChar.getTarget().getActingPlayer()); } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } - else if (command.startsWith("admin_character_list")) - { + else if (command.startsWith("admin_character_list")) { listCharacters(activeChar, 0); } - else if (command.startsWith("admin_show_characters")) - { - try - { + else if (command.startsWith("admin_show_characters")) { + try { String val = command.substring(22); int page = Integer.parseInt(val); listCharacters(activeChar, page); } - catch (StringIndexOutOfBoundsException e) - { + catch (StringIndexOutOfBoundsException e) { // Case of empty page number activeChar.sendMessage("Usage: //show_characters <page_number>"); } } - else if (command.startsWith("admin_find_character")) - { - try - { + else if (command.startsWith("admin_find_character")) { + try { String val = command.substring(21); findCharacter(activeChar, val); } - catch (StringIndexOutOfBoundsException e) - { // Case of empty character name + catch (StringIndexOutOfBoundsException e) { + // Case of empty character name activeChar.sendMessage("Usage: //find_character <character_name>"); listCharacters(activeChar, 0); } } - else if (command.startsWith("admin_find_ip")) - { - try - { + else if (command.startsWith("admin_find_ip")) { + try { String val = command.substring(14); findCharactersPerIp(activeChar, val); } - catch (Exception e) - { // Case of empty or malformed IP number + catch (Exception e) { + // Case of empty or malformed IP number activeChar.sendMessage("Usage: //find_ip <www.xxx.yyy.zzz>"); listCharacters(activeChar, 0); } } - else if (command.startsWith("admin_find_account")) - { - try - { + else if (command.startsWith("admin_find_account")) { + try { String val = command.substring(19); findCharactersPerAccount(activeChar, val); } - catch (Exception e) - { // Case of empty or malformed player name + catch (Exception ex) { + // Case of empty or malformed player name activeChar.sendMessage("Usage: //find_account <player_name>"); listCharacters(activeChar, 0); } } - else if (command.startsWith("admin_edit_character")) - { + else if (command.startsWith("admin_edit_character")) { String[] data = command.split(" "); - if ((data.length > 1)) - { + if ((data.length > 1)) { editCharacter(activeChar, data[1]); } - else if (activeChar.getTarget() instanceof L2PcInstance) - { + else if (activeChar.getTarget() instanceof L2PcInstance) { editCharacter(activeChar, null); } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } // Karma control commands - else if (command.equals("admin_nokarma")) - { + else if (command.equals("admin_nokarma")) { setTargetKarma(activeChar, 0); } - else if (command.startsWith("admin_setkarma")) - { - try - { + else if (command.startsWith("admin_setkarma")) { + try { String val = command.substring(15); int karma = Integer.parseInt(val); setTargetKarma(activeChar, karma); } - catch (Exception e) - { - if (Config.DEVELOPER) - { + catch (Exception e) { + if (Config.DEVELOPER) { _log.warning("Set karma error: " + e); } activeChar.sendMessage("Usage: //setkarma <new_karma_value>"); } } - else if (command.startsWith("admin_setpk")) - { - try - { + else if (command.startsWith("admin_setpk")) { + try { String val = command.substring(12); int pk = Integer.parseInt(val); L2Object target = activeChar.getTarget(); - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { L2PcInstance player = (L2PcInstance) target; player.setPkKills(pk); player.broadcastUserInfo(); @@ -239,29 +209,23 @@ public class AdminEditChar implements IAdminCommandHandler player.sendMessage("A GM changed your PK count to " + pk); activeChar.sendMessage(player.getName() + "'s PK count changed to " + pk); } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } - catch (Exception e) - { - if (Config.DEVELOPER) - { + catch (Exception e) { + if (Config.DEVELOPER) { _log.warning("Set pk error: " + e); } activeChar.sendMessage("Usage: //setpk <pk_count>"); } } - else if (command.startsWith("admin_setpvp")) - { - try - { + else if (command.startsWith("admin_setpvp")) { + try { String val = command.substring(13); int pvp = Integer.parseInt(val); L2Object target = activeChar.getTarget(); - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { L2PcInstance player = (L2PcInstance) target; player.setPvpKills(pvp); player.broadcastUserInfo(); @@ -270,29 +234,23 @@ public class AdminEditChar implements IAdminCommandHandler player.sendMessage("A GM changed your PVP count to " + pvp); activeChar.sendMessage(player.getName() + "'s PVP count changed to " + pvp); } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } - catch (Exception e) - { - if (Config.DEVELOPER) - { + catch (Exception e) { + if (Config.DEVELOPER) { _log.warning("Set pvp error: " + e); } activeChar.sendMessage("Usage: //setpvp <pvp_count>"); } } - else if (command.startsWith("admin_setfame")) - { - try - { + else if (command.startsWith("admin_setfame")) { + try { String val = command.substring(14); int fame = Integer.parseInt(val); L2Object target = activeChar.getTarget(); - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { L2PcInstance player = (L2PcInstance) target; player.setFame(fame); player.broadcastUserInfo(); @@ -301,29 +259,23 @@ public class AdminEditChar implements IAdminCommandHandler player.sendMessage("A GM changed your Reputation points to " + fame); activeChar.sendMessage(player.getName() + "'s Fame changed to " + fame); } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } - catch (Exception e) - { - if (Config.DEVELOPER) - { + catch (Exception e) { + if (Config.DEVELOPER) { _log.warning("Set Fame error: " + e); } activeChar.sendMessage("Usage: //setfame <new_fame_value>"); } } - else if (command.startsWith("admin_rec")) - { - try - { + else if (command.startsWith("admin_rec")) { + try { String val = command.substring(10); int recVal = Integer.parseInt(val); L2Object target = activeChar.getTarget(); - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { L2PcInstance player = (L2PcInstance) target; player.setRecomHave(recVal); player.broadcastUserInfo(); @@ -333,46 +285,36 @@ public class AdminEditChar implements IAdminCommandHandler player.sendMessage("A GM changed your Recommend points to " + recVal); activeChar.sendMessage(player.getName() + "'s Recommend changed to " + recVal); } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } - catch (Exception e) - { + catch (Exception e) { activeChar.sendMessage("Usage: //rec number"); } } - else if (command.startsWith("admin_setclass")) - { - try - { + else if (command.startsWith("admin_setclass")) { + try { String val = command.substring(15).trim(); int classidval = Integer.parseInt(val); L2Object target = activeChar.getTarget(); L2PcInstance player = null; - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return false; } boolean valid = false; - for (ClassId classid : ClassId.values()) - { - if (classidval == classid.getId()) - { + for (ClassId classid : ClassId.values()) { + if (classidval == classid.getId()) { valid = true; } } - if (valid && (player.getClassId().getId() != classidval)) - { + if (valid && (player.getClassId().getId() != classidval)) { TransformData.getInstance().transformPlayer(255, player); player.setClassId(classidval); - if (!player.isSubClassActive()) - { + if (!player.isSubClassActive()) { player.setBaseClass(classidval); } String newclass = ClassListData.getInstance().getClass(player.getClassId()).getClassName(); @@ -384,61 +326,48 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.setTarget(player); activeChar.sendMessage(player.getName() + " is a " + newclass + "."); } - else - { + else { activeChar.sendMessage("Usage: //setclass <valid_new_classid>"); } } - catch (StringIndexOutOfBoundsException e) - { + catch (StringIndexOutOfBoundsException e) { AdminHtml.showAdminHtml(activeChar, "setclass/human_fighter.htm"); } - catch (NumberFormatException e) - { + catch (NumberFormatException e) { activeChar.sendMessage("Usage: //setclass <valid_new_classid>"); } } - else if (command.startsWith("admin_settitle")) - { - try - { + else if (command.startsWith("admin_settitle")) { + try { String val = command.substring(15); L2Object target = activeChar.getTarget(); L2PcInstance player = null; - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return false; } player.setTitle(val); player.sendMessage("Your title has been changed by a GM"); player.broadcastTitleInfo(); } - catch (StringIndexOutOfBoundsException e) - { // Case of empty character title + catch (StringIndexOutOfBoundsException e) { // Case of empty character title activeChar.sendMessage("You need to specify the new title."); } } - else if (command.startsWith("admin_changename")) - { - try - { + else if (command.startsWith("admin_changename")) { + try { String val = command.substring(17); L2Object target = activeChar.getTarget(); L2PcInstance player = null; - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return false; } - if (CharNameTable.getInstance().getIdByName(val) > 0) - { + if (CharNameTable.getInstance().getIdByName(val) > 0) { activeChar.sendMessage("Warning, player " + val + " already exists"); return false; } @@ -449,114 +378,93 @@ public class AdminEditChar implements IAdminCommandHandler player.sendMessage("Your name has been changed by a GM."); player.broadcastUserInfo(); - if (player.isInParty()) - { + if (player.isInParty()) { // Delete party window for other party members player.getParty().broadcastToPartyMembers(player, PartySmallWindowDeleteAll.STATIC_PACKET); - for (L2PcInstance member : player.getParty().getMembers()) - { + for (L2PcInstance member : player.getParty().getMembers()) { // And re-add - if (member != player) - { + if (member != player) { member.sendPacket(new PartySmallWindowAll(member, player.getParty())); } } } - if (player.getClan() != null) - { + if (player.getClan() != null) { player.getClan().broadcastClanStatus(); } } - catch (StringIndexOutOfBoundsException e) - { // Case of empty character name + catch (StringIndexOutOfBoundsException e) { + // Case of empty character name activeChar.sendMessage("Usage: //setname new_name_for_target"); } } - else if (command.startsWith("admin_setsex")) - { + else if (command.startsWith("admin_setsex")) { L2Object target = activeChar.getTarget(); L2PcInstance player = null; - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return false; } player.getAppearance().setSex(player.getAppearance().getSex() ? false : true); player.sendMessage("Your gender has been changed by a GM"); player.broadcastUserInfo(); } - else if (command.startsWith("admin_setcolor")) - { - try - { + else if (command.startsWith("admin_setcolor")) { + try { String val = command.substring(15); L2Object target = activeChar.getTarget(); L2PcInstance player = null; - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return false; } player.getAppearance().setNameColor(Integer.decode("0x" + val)); player.sendMessage("Your name color has been changed by a GM"); player.broadcastUserInfo(); } - catch (Exception e) - { // Case of empty color or invalid hex string + catch (Exception e) { + // Case of empty color or invalid hex string activeChar.sendMessage("You need to specify a valid new color."); } } - else if (command.startsWith("admin_settcolor")) - { - try - { + else if (command.startsWith("admin_settcolor")) { + try { String val = command.substring(16); L2Object target = activeChar.getTarget(); L2PcInstance player = null; - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return false; } player.getAppearance().setTitleColor(Integer.decode("0x" + val)); player.sendMessage("Your title color has been changed by a GM"); player.broadcastUserInfo(); } - catch (Exception e) - { // Case of empty color or invalid hex string + catch (Exception e) { + // Case of empty color or invalid hex string activeChar.sendMessage("You need to specify a valid new color."); } } - else if (command.startsWith("admin_fullfood")) - { + else if (command.startsWith("admin_fullfood")) { L2Object target = activeChar.getTarget(); - if (target instanceof L2PetInstance) - { + if (target instanceof L2PetInstance) { L2PetInstance targetPet = (L2PetInstance) target; targetPet.setCurrentFed(targetPet.getMaxFed()); targetPet.broadcastStatusUpdate(); } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } - else if (command.startsWith("admin_remove_clan_penalty")) - { - try - { + else if (command.startsWith("admin_remove_clan_penalty")) { + try { StringTokenizer st = new StringTokenizer(command, " "); - if (st.countTokens() != 3) - { + if (st.countTokens() != 3) { activeChar.sendMessage("Usage: //remove_clan_penalty join|create charname"); return false; } @@ -569,328 +477,256 @@ public class AdminEditChar implements IAdminCommandHandler L2PcInstance player = null; player = L2World.getInstance().getPlayer(playerName); - if (player == null) - { + if (player == null) { final String updateQuery = "UPDATE characters SET " + (changeCreateExpiryTime ? "clan_create_expiry_time" : "clan_join_expiry_time") + " WHERE char_name=? LIMIT 1"; try (Connection con = ConnectionFactory.getInstance().getConnection(); - PreparedStatement ps = con.prepareStatement(updateQuery)) - { + PreparedStatement ps = con.prepareStatement(updateQuery)) { ps.setString(1, playerName); ps.execute(); } } - else - { + else { // removing penalty - if (changeCreateExpiryTime) - { + if (changeCreateExpiryTime) { player.setClanCreateExpiryTime(0); } - else - { + else { player.setClanJoinExpiryTime(0); } } activeChar.sendMessage("Clan penalty successfully removed to character: " + playerName); } - catch (Exception e) - { + catch (Exception e) { e.printStackTrace(); } } - else if (command.startsWith("admin_find_dualbox")) - { + else if (command.startsWith("admin_find_dualbox")) { int multibox = 2; - try - { + try { String val = command.substring(19); multibox = Integer.parseInt(val); - if (multibox < 1) - { + if (multibox < 1) { activeChar.sendMessage("Usage: //find_dualbox [number > 0]"); return false; } } - catch (Exception e) - { + catch (Exception e) { } findDualbox(activeChar, multibox); } - else if (command.startsWith("admin_strict_find_dualbox")) - { + else if (command.startsWith("admin_strict_find_dualbox")) { int multibox = 2; - try - { + try { String val = command.substring(26); multibox = Integer.parseInt(val); - if (multibox < 1) - { + if (multibox < 1) { activeChar.sendMessage("Usage: //strict_find_dualbox [number > 0]"); return false; } } - catch (Exception e) - { + catch (Exception e) { } findDualboxStrict(activeChar, multibox); } - else if (command.startsWith("admin_tracert")) - { + else if (command.startsWith("admin_tracert")) { String[] data = command.split(" "); L2PcInstance pl = null; - if ((data.length > 1)) - { + if ((data.length > 1)) { pl = L2World.getInstance().getPlayer(data[1]); } - else - { + else { L2Object target = activeChar.getTarget(); - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { pl = (L2PcInstance) target; } } - if (pl == null) - { + if (pl == null) { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); return false; } final L2GameClient client = pl.getClient(); - if (client == null) - { + if (client == null) { activeChar.sendMessage("Client is null."); return false; } - if (client.isDetached()) - { + if (client.isDetached()) { activeChar.sendMessage("Client is detached."); return false; } String ip; int[][] trace = client.getTrace(); - for (int i = 0; i < trace.length; i++) - { + for (int i = 0; i < trace.length; i++) { ip = ""; - for (int o = 0; o < trace[0].length; o++) - { + for (int o = 0; o < trace[0].length; o++) { ip = ip + trace[i][o]; - if (o != (trace[0].length - 1)) - { + if (o != (trace[0].length - 1)) { ip = ip + "."; } } activeChar.sendMessage("Hop" + i + ": " + ip); } } - else if (command.startsWith("admin_summon_info")) - { + else if (command.startsWith("admin_summon_info")) { L2Object target = activeChar.getTarget(); - if (target instanceof L2Summon) - { + if (target instanceof L2Summon) { gatherSummonInfo((L2Summon) target, activeChar); } - else - { + else { activeChar.sendMessage("Invalid target."); } } - else if (command.startsWith("admin_unsummon")) - { + else if (command.startsWith("admin_unsummon")) { L2Object target = activeChar.getTarget(); - if (target instanceof L2Summon) - { + if (target instanceof L2Summon) { ((L2Summon) target).unSummon(((L2Summon) target).getOwner()); } - else - { + else { activeChar.sendMessage("Usable only with Pets/Summons"); } } - else if (command.startsWith("admin_summon_setlvl")) - { + else if (command.startsWith("admin_summon_setlvl")) { L2Object target = activeChar.getTarget(); - if (target instanceof L2PetInstance) - { + if (target instanceof L2PetInstance) { L2PetInstance pet = (L2PetInstance) target; - try - { + try { String val = command.substring(20); int level = Integer.parseInt(val); long newexp, oldexp = 0; oldexp = pet.getStat().getExp(); newexp = pet.getStat().getExpForLevel(level); - if (oldexp > newexp) - { + if (oldexp > newexp) { pet.getStat().removeExp(oldexp - newexp); } - else if (oldexp < newexp) - { + else if (oldexp < newexp) { pet.getStat().addExp(newexp - oldexp); } } - catch (Exception e) - { + catch (Exception e) { } } - else - { + else { activeChar.sendMessage("Usable only with Pets"); } } - else if (command.startsWith("admin_show_pet_inv")) - { + else if (command.startsWith("admin_show_pet_inv")) { L2Object target; - try - { + try { String val = command.substring(19); int objId = Integer.parseInt(val); target = L2World.getInstance().getPet(objId); } - catch (Exception e) - { + catch (Exception e) { target = activeChar.getTarget(); } - if (target instanceof L2PetInstance) - { + if (target instanceof L2PetInstance) { activeChar.sendPacket(new GMViewItemList((L2PetInstance) target)); } - else - { + else { activeChar.sendMessage("Usable only with Pets"); } - } - else if (command.startsWith("admin_partyinfo")) - { + else if (command.startsWith("admin_partyinfo")) { L2Object target; - try - { + try { String val = command.substring(16); target = L2World.getInstance().getPlayer(val); - if (target == null) - { + if (target == null) { target = activeChar.getTarget(); } } - catch (Exception e) - { + catch (Exception e) { target = activeChar.getTarget(); } - if (target instanceof L2PcInstance) - { - if (((L2PcInstance) target).isInParty()) - { + if (target instanceof L2PcInstance) { + if (((L2PcInstance) target).isInParty()) { gatherPartyInfo((L2PcInstance) target, activeChar); } - else - { + else { activeChar.sendMessage("Not in party."); } } - else - { + else { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); } } - else if (command.equals("admin_setnoble")) - { + else if (command.equals("admin_setnoble")) { L2PcInstance player = null; - if (activeChar.getTarget() == null) - { + if (activeChar.getTarget() == null) { player = activeChar; } - else if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance)) - { + else if ((activeChar.getTarget() != null) && (activeChar.getTarget() instanceof L2PcInstance)) { player = (L2PcInstance) activeChar.getTarget(); } - if (player != null) - { + if (player != null) { player.setNoble(!player.isNoble()); - if (player.getObjectId() != activeChar.getObjectId()) - { + if (player.getObjectId() != activeChar.getObjectId()) { activeChar.sendMessage("You've changed nobless status of: " + player.getName()); } player.sendMessage("GM changed your nobless status!"); } } - else if (command.startsWith("admin_set_hp")) - { + else if (command.startsWith("admin_set_hp")) { final String[] data = command.split(" "); - try - { + try { final L2Object target = activeChar.getTarget(); - if ((target == null) || !target.isCharacter()) - { + if ((target == null) || !target.isCharacter()) { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); return false; } ((L2Character) target).setCurrentHp(Double.parseDouble(data[1])); } - catch (Exception e) - { + catch (Exception e) { activeChar.sendMessage("Usage: //set_hp 1000"); } } - else if (command.startsWith("admin_set_mp")) - { + else if (command.startsWith("admin_set_mp")) { final String[] data = command.split(" "); - try - { + try { final L2Object target = activeChar.getTarget(); - if ((target == null) || !target.isCharacter()) - { + if ((target == null) || !target.isCharacter()) { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); return false; } ((L2Character) target).setCurrentMp(Double.parseDouble(data[1])); } - catch (Exception e) - { + catch (Exception e) { activeChar.sendMessage("Usage: //set_mp 1000"); } } - else if (command.startsWith("admin_set_cp")) - { + else if (command.startsWith("admin_set_cp")) { final String[] data = command.split(" "); - try - { + try { final L2Object target = activeChar.getTarget(); - if ((target == null) || !target.isCharacter()) - { + if ((target == null) || !target.isCharacter()) { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); return false; } ((L2Character) target).setCurrentCp(Double.parseDouble(data[1])); } - catch (Exception e) - { + catch (Exception e) { activeChar.sendMessage("Usage: //set_cp 1000"); } } - else if (command.startsWith("admin_set_pvp_flag")) - { - try - { + else if (command.startsWith("admin_set_pvp_flag")) { + try { final L2Object target = activeChar.getTarget(); - if ((target == null) || !target.isPlayable()) - { + if ((target == null) || !target.isPlayable()) { activeChar.sendPacket(SystemMessageId.INCORRECT_TARGET); return false; } final L2Playable playable = ((L2Playable) target); playable.updatePvPFlag(Math.abs(playable.getPvpFlag() - 1)); } - catch (Exception e) - { + catch (Exception e) { activeChar.sendMessage("Usage: //set_pvp_flag"); } } @@ -898,23 +734,19 @@ public class AdminEditChar implements IAdminCommandHandler } @Override - public String[] getAdminCommandList() - { + public String[] getAdminCommandList() { return ADMIN_COMMANDS; } - private void listCharacters(L2PcInstance activeChar, int page) - { + private void listCharacters(L2PcInstance activeChar, int page) { final L2PcInstance[] players = L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime)); final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/charlist.htm"); - final PageResult result = HtmlUtil.createPage(players, page, 20, i -> - { + final PageResult result = HtmlUtil.createPage(players, page, 20, i -> { return "<td align=center><a action=\"bypass -h admin_show_characters " + i + "\">Page " + (i + 1) + "</a></td>"; - } , player -> - { + }, player -> { StringBuilder sb = new StringBuilder(); sb.append("<tr>"); sb.append("<td width=80><a action=\"bypass -h admin_character_info " + player.getName() + "\">" + player.getName() + "</a></td>"); @@ -923,12 +755,10 @@ public class AdminEditChar implements IAdminCommandHandler return sb.toString(); }); - if (result.getPages() > 0) - { + if (result.getPages() > 0) { html.replace("%pages%", "<table width=280 cellspacing=0><tr>" + result.getPagerTemplate() + "</tr></table>"); } - else - { + else { html.replace("%pages%", ""); } @@ -936,22 +766,17 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.sendPacket(html); } - private void showCharacterInfo(L2PcInstance activeChar, L2PcInstance player) - { - if (player == null) - { + private void showCharacterInfo(L2PcInstance activeChar, L2PcInstance player) { + if (player == null) { L2Object target = activeChar.getTarget(); - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return; } } - else - { + else { activeChar.setTarget(player); } gatherCharacterInfo(activeChar, player, "charinfo.htm"); @@ -963,27 +788,22 @@ public class AdminEditChar implements IAdminCommandHandler * @param player * @param filename */ - private void gatherCharacterInfo(L2PcInstance activeChar, L2PcInstance player, String filename) - { + private void gatherCharacterInfo(L2PcInstance activeChar, L2PcInstance player, String filename) { String ip = "N/A"; - if (player == null) - { + if (player == null) { activeChar.sendMessage("Player is null."); return; } final L2GameClient client = player.getClient(); - if (client == null) - { + if (client == null) { activeChar.sendMessage("Client is null."); } - else if (client.isDetached()) - { + else if (client.isDetached()) { activeChar.sendMessage("Client is detached."); } - else - { + else { ip = client.getConnection().getInetAddress().getHostAddress(); } @@ -1033,22 +853,18 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - private void setTargetKarma(L2PcInstance activeChar, int newKarma) - { + private void setTargetKarma(L2PcInstance activeChar, int newKarma) { // function to change karma of selected char L2Object target = activeChar.getTarget(); L2PcInstance player = null; - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { player = (L2PcInstance) target; } - else - { + else { return; } - if (newKarma >= 0) - { + if (newKarma >= 0) { // for display int oldKarma = player.getKarma(); // update karma @@ -1059,47 +875,35 @@ public class AdminEditChar implements IAdminCommandHandler player.sendPacket(sm); // Admin information activeChar.sendMessage("Successfully Changed karma for " + player.getName() + " from (" + oldKarma + ") to (" + newKarma + ")."); - if (Config.DEBUG) - { + if (Config.DEBUG) { _log.fine("[SET KARMA] [GM]" + activeChar.getName() + " Changed karma for " + player.getName() + " from (" + oldKarma + ") to (" + newKarma + ")."); } } - else - { + else { // tell admin of mistake activeChar.sendMessage("You must enter a value for karma greater than or equal to 0."); - if (Config.DEBUG) - { + if (Config.DEBUG) { _log.fine("[SET KARMA] ERROR: [GM]" + activeChar.getName() + " entered an incorrect value for new karma: " + newKarma + " for " + player.getName() + "."); } } } - private void editCharacter(L2PcInstance activeChar, String targetName) - { + private void editCharacter(L2PcInstance activeChar, String targetName) { L2Object target = null; - if (targetName != null) - { + if (targetName != null) { target = L2World.getInstance().getPlayer(targetName); } - else - { + else { target = activeChar.getTarget(); } - if (target instanceof L2PcInstance) - { + if (target instanceof L2PcInstance) { L2PcInstance player = (L2PcInstance) target; gatherCharacterInfo(activeChar, player, "charedit.htm"); } } - /** - * @param activeChar - * @param CharacterToFind - */ - private void findCharacter(L2PcInstance activeChar, String CharacterToFind) - { + private void findCharacter(L2PcInstance activeChar, String CharacterToFind) { int CharactersFound = 0; String name; final NpcHtmlMessage adminReply = new NpcHtmlMessage(); @@ -1107,38 +911,30 @@ public class AdminEditChar implements IAdminCommandHandler final StringBuilder replyMSG = new StringBuilder(1000); - for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) - { // Add player info into new Table row + for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) { // Add player info into new Table row name = player.getName(); - if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) - { + if (name.toLowerCase().contains(CharacterToFind.toLowerCase())) { CharactersFound = CharactersFound + 1; StringUtil.append(replyMSG, "<tr><td width=80><a action=\"bypass -h admin_character_info ", name, "\">", name, "</a></td><td width=110>", ClassListData.getInstance().getClass(player.getClassId()).getClientCode(), "</td><td width=40>", String.valueOf(player.getLevel()), "</td></tr>"); } - if (CharactersFound > 20) - { + if (CharactersFound > 20) { break; } } adminReply.replace("%results%", replyMSG.toString()); final String replyMSG2; - - if (CharactersFound == 0) - { + if (CharactersFound == 0) { replyMSG2 = "s. Please try again."; } - else if (CharactersFound > 20) - { + else if (CharactersFound > 20) { adminReply.replace("%number%", " more than 20"); replyMSG2 = "s.<br>Please refine your search to see all of the results."; } - else if (CharactersFound == 1) - { + else if (CharactersFound == 1) { replyMSG2 = "."; } - else - { + else { replyMSG2 = "s."; } @@ -1147,23 +943,14 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - /** - * @param activeChar - * @param IpAdress - * @throws IllegalArgumentException - */ - private void findCharactersPerIp(L2PcInstance activeChar, String IpAdress) throws IllegalArgumentException - { + private void findCharactersPerIp(L2PcInstance activeChar, String IpAdress) throws IllegalArgumentException { boolean findDisconnected = false; - if (IpAdress.equals("disconnected")) - { + if (IpAdress.equals("disconnected")) { findDisconnected = true; } - else - { - if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$")) - { + else { + if (!IpAdress.matches("^(?:(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))\\.){3}(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2(?:[0-4][0-9]|5[0-5]))$")) { throw new IllegalArgumentException("Malformed IPv4 number"); } } @@ -1174,31 +961,24 @@ public class AdminEditChar implements IAdminCommandHandler final StringBuilder replyMSG = new StringBuilder(1000); final NpcHtmlMessage adminReply = new NpcHtmlMessage(); adminReply.setFile(activeChar.getHtmlPrefix(), "data/html/admin/ipfind.htm"); - for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) - { + for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) { client = player.getClient(); - if (client == null) - { + if (client == null) { continue; } - if (client.isDetached()) - { - if (!findDisconnected) - { + if (client.isDetached()) { + if (!findDisconnected) { continue; } } - else - { - if (findDisconnected) - { + else { + if (findDisconnected) { continue; } ip = client.getConnection().getInetAddress().getHostAddress(); - if (!ip.equals(IpAdress)) - { + if (!ip.equals(IpAdress)) { continue; } } @@ -1207,30 +987,24 @@ public class AdminEditChar implements IAdminCommandHandler CharactersFound = CharactersFound + 1; StringUtil.append(replyMSG, "<tr><td width=80><a action=\"bypass -h admin_character_info ", name, "\">", name, "</a></td><td width=110>", ClassListData.getInstance().getClass(player.getClassId()).getClientCode(), "</td><td width=40>", String.valueOf(player.getLevel()), "</td></tr>"); - if (CharactersFound > 20) - { + if (CharactersFound > 20) { break; } } adminReply.replace("%results%", replyMSG.toString()); final String replyMSG2; - - if (CharactersFound == 0) - { + if (CharactersFound == 0) { replyMSG2 = "s. Maybe they got d/c? :)"; } - else if (CharactersFound > 20) - { + else if (CharactersFound > 20) { adminReply.replace("%number%", " more than " + String.valueOf(CharactersFound)); replyMSG2 = "s.<br>In order to avoid you a client crash I won't <br1>display results beyond the 20th character."; } - else if (CharactersFound == 1) - { + else if (CharactersFound == 1) { replyMSG2 = "."; } - else - { + else { replyMSG2 = "s."; } adminReply.replace("%ip%", IpAdress); @@ -1239,16 +1013,9 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - /** - * @param activeChar - * @param characterName - * @throws IllegalArgumentException - */ - private void findCharactersPerAccount(L2PcInstance activeChar, String characterName) throws IllegalArgumentException - { + private void findCharactersPerAccount(L2PcInstance activeChar, String characterName) throws IllegalArgumentException { L2PcInstance player = L2World.getInstance().getPlayer(characterName); - if (player == null) - { + if (player == null) { throw new IllegalArgumentException("Player doesn't exist"); } @@ -1264,41 +1031,30 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - /** - * @param activeChar - * @param multibox - */ - private void findDualbox(L2PcInstance activeChar, int multibox) - { + private void findDualbox(L2PcInstance activeChar, int multibox) { Map<String, List<L2PcInstance>> ipMap = new HashMap<>(); String ip = "0.0.0.0"; L2GameClient client; final Map<String, Integer> dualboxIPs = new HashMap<>(); - for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) - { + for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) { client = player.getClient(); - if ((client == null) || client.isDetached()) - { + if ((client == null) || client.isDetached()) { continue; } ip = client.getConnection().getInetAddress().getHostAddress(); - if (ipMap.get(ip) == null) - { + if (ipMap.get(ip) == null) { ipMap.put(ip, new ArrayList<L2PcInstance>()); } ipMap.get(ip).add(player); - if (ipMap.get(ip).size() >= multibox) - { + if (ipMap.get(ip).size() >= multibox) { Integer count = dualboxIPs.get(ip); - if (count == null) - { + if (count == null) { dualboxIPs.put(ip, multibox); } - else - { + else { dualboxIPs.put(ip, count + 1); } } @@ -1308,8 +1064,7 @@ public class AdminEditChar implements IAdminCommandHandler keys.sort(Comparator.comparing(s -> dualboxIPs.get(s)).reversed()); final StringBuilder results = new StringBuilder(); - for (String dualboxIP : keys) - { + for (String dualboxIP : keys) { StringUtil.append(results, "<a action=\"bypass -h admin_find_ip " + dualboxIP + "\">" + dualboxIP + " (" + dualboxIPs.get(dualboxIP) + ")</a><br1>"); } @@ -1321,36 +1076,29 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - private void findDualboxStrict(L2PcInstance activeChar, int multibox) - { + private void findDualboxStrict(L2PcInstance activeChar, int multibox) { Map<IpPack, List<L2PcInstance>> ipMap = new HashMap<>(); L2GameClient client; final Map<IpPack, Integer> dualboxIPs = new HashMap<>(); - for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) - { + for (L2PcInstance player : L2World.getInstance().getPlayersSortedBy(Comparator.comparingLong(L2PcInstance::getUptime))) { client = player.getClient(); - if ((client == null) || client.isDetached()) - { + if ((client == null) || client.isDetached()) { continue; } IpPack pack = new IpPack(client.getConnection().getInetAddress().getHostAddress(), client.getTrace()); - if (ipMap.get(pack) == null) - { + if (ipMap.get(pack) == null) { ipMap.put(pack, new ArrayList<L2PcInstance>()); } ipMap.get(pack).add(player); - if (ipMap.get(pack).size() >= multibox) - { + if (ipMap.get(pack).size() >= multibox) { Integer count = dualboxIPs.get(pack); - if (count == null) - { + if (count == null) { dualboxIPs.put(pack, multibox); } - else - { + else { dualboxIPs.put(pack, count + 1); } } @@ -1360,9 +1108,8 @@ public class AdminEditChar implements IAdminCommandHandler keys.sort(Comparator.comparing(s -> dualboxIPs.get(s)).reversed()); final StringBuilder results = new StringBuilder(); - for (IpPack dualboxIP : keys) - { - StringUtil.append(results, "<a action=\"bypass -h admin_find_ip " + dualboxIP.ip + "\">" + dualboxIP.ip + " (" + dualboxIPs.get(dualboxIP) + ")</a><br1>"); + for (IpPack dualboxIP : keys) { + StringUtil.append(results, "<a action=\"bypass -h admin_find_ip " + dualboxIP._ip + "\">" + dualboxIP._ip + " (" + dualboxIPs.get(dualboxIP) + ")</a><br1>"); } final NpcHtmlMessage adminReply = new NpcHtmlMessage(); @@ -1373,67 +1120,52 @@ public class AdminEditChar implements IAdminCommandHandler activeChar.sendPacket(adminReply); } - private final class IpPack - { - String ip; - int[][] tracert; + private final class IpPack { + private final String _ip; + private final int[][] _tracert; - public IpPack(String ip, int[][] tracert) - { - this.ip = ip; - this.tracert = tracert; + public IpPack(String ip, int[][] tracert) { + _ip = ip; + _tracert = tracert; } @Override - public int hashCode() - { + public int hashCode() { final int prime = 31; int result = 1; - result = (prime * result) + ((ip == null) ? 0 : ip.hashCode()); - for (int[] array : tracert) - { + result = (prime * result) + ((_ip == null) ? 0 : _ip.hashCode()); + for (int[] array : _tracert) { result = (prime * result) + Arrays.hashCode(array); } return result; } @Override - public boolean equals(Object obj) - { - if (this == obj) - { + public boolean equals(Object obj) { + if (this == obj) { return true; } - if (obj == null) - { + if (obj == null) { return false; } - if (getClass() != obj.getClass()) - { + if (getClass() != obj.getClass()) { return false; } IpPack other = (IpPack) obj; - if (!getOuterType().equals(other.getOuterType())) - { + if (!getOuterType().equals(other.getOuterType())) { return false; } - if (ip == null) - { - if (other.ip != null) - { + if (_ip == null) { + if (other._ip != null) { return false; } } - else if (!ip.equals(other.ip)) - { + else if (!_ip.equals(other._ip)) { return false; } - for (int i = 0; i < tracert.length; i++) - { - for (int o = 0; o < tracert[0].length; o++) - { - if (tracert[i][o] != other.tracert[i][o]) - { + for (int i = 0; i < _tracert.length; i++) { + for (int o = 0; o < _tracert[0].length; o++) { + if (_tracert[i][o] != other._tracert[i][o]) { return false; } } @@ -1441,14 +1173,12 @@ public class AdminEditChar implements IAdminCommandHandler return true; } - private AdminEditChar getOuterType() - { + private AdminEditChar getOuterType() { return AdminEditChar.this; } } - private void gatherSummonInfo(L2Summon target, L2PcInstance activeChar) - { + private void gatherSummonInfo(L2Summon target, L2PcInstance activeChar) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/petinfo.htm"); String name = target.getName(); @@ -1463,42 +1193,34 @@ public class AdminEditChar implements IAdminCommandHandler html.replace("%mp%", (int) target.getStatus().getCurrentMp() + "/" + target.getStat().getMaxMp()); html.replace("%karma%", Integer.toString(target.getKarma())); html.replace("%race%", target.getTemplate().getRace().toString()); - if (target instanceof L2PetInstance) - { + if (target instanceof L2PetInstance) { int objId = target.getActingPlayer().getObjectId(); html.replace("%inv%", " <a action=\"bypass admin_show_pet_inv " + objId + "\">view</a>"); } - else - { + else { html.replace("%inv%", "none"); } - if (target instanceof L2PetInstance) - { + if (target instanceof L2PetInstance) { html.replace("%food%", ((L2PetInstance) target).getCurrentFed() + "/" + ((L2PetInstance) target).getPetLevelData().getPetMaxFeed()); html.replace("%load%", ((L2PetInstance) target).getInventory().getTotalWeight() + "/" + ((L2PetInstance) target).getMaxLoad()); } - else - { + else { html.replace("%food%", "N/A"); html.replace("%load%", "N/A"); } activeChar.sendPacket(html); } - private void gatherPartyInfo(L2PcInstance target, L2PcInstance activeChar) - { + private void gatherPartyInfo(L2PcInstance target, L2PcInstance activeChar) { boolean color = true; final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar.getHtmlPrefix(), "data/html/admin/partyinfo.htm"); StringBuilder text = new StringBuilder(400); - for (L2PcInstance member : target.getParty().getMembers()) - { - if (color) - { + for (L2PcInstance member : target.getParty().getMembers()) { + if (color) { text.append("<tr><td><table width=270 border=0 bgcolor=131210 cellpadding=2><tr><td width=30 align=right>"); } - else - { + else { text.append("<tr><td><table width=270 border=0 cellpadding=2><tr><td width=30 align=right>"); } text.append(member.getLevel() + "</td><td width=130><a action=\"bypass -h admin_character_info " + member.getName() + "\">" + member.getName() + "</a>"); diff --git a/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java b/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java index dc42054d3c3b0e3c1ccb794eeee87de7f4795c24..59c7d3dee3ac034509bac68d52a29e54f0d0839a 100644 --- a/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java +++ b/dist/game/data/scripts/handlers/bypasshandlers/NpcViewMod.java @@ -46,85 +46,68 @@ import com.l2jserver.gameserver.util.Util; /** * @author NosBit */ -public class NpcViewMod implements IBypassHandler -{ - private static final String[] COMMANDS = - { +public class NpcViewMod implements IBypassHandler { + private static final String[] COMMANDS = { "NpcViewMod" }; private static final int DROP_LIST_ITEMS_PER_PAGE = 10; @Override - public boolean useBypass(String command, L2PcInstance activeChar, L2Character bypassOrigin) - { + public boolean useBypass(String command, L2PcInstance activeChar, L2Character bypassOrigin) { final StringTokenizer st = new StringTokenizer(command); st.nextToken(); - if (!st.hasMoreTokens()) - { + if (!st.hasMoreTokens()) { _log.warning("Bypass[NpcViewMod] used without enough parameters."); return false; } final String actualCommand = st.nextToken(); - switch (actualCommand.toLowerCase()) - { - case "view": - { + switch (actualCommand.toLowerCase()) { + case "view": { final L2Object target; - if (st.hasMoreElements()) - { - try - { + if (st.hasMoreElements()) { + try { target = L2World.getInstance().findObject(Integer.parseInt(st.nextToken())); } - catch (NumberFormatException e) - { + catch (NumberFormatException e) { return false; } } - else - { + else { target = activeChar.getTarget(); } final L2Npc npc = target instanceof L2Npc ? (L2Npc) target : null; - if (npc == null) - { + if (npc == null) { return false; } NpcViewMod.sendNpcView(activeChar, npc); break; } - case "droplist": - { - if (st.countTokens() < 2) - { + case "droplist": { + if (st.countTokens() < 2) { _log.warning("Bypass[NpcViewMod] used without enough parameters."); return false; } final String dropListScopeString = st.nextToken(); - try - { + try { final DropListScope dropListScope = Enum.valueOf(DropListScope.class, dropListScopeString); final L2Object target = L2World.getInstance().findObject(Integer.parseInt(st.nextToken())); final L2Npc npc = target instanceof L2Npc ? (L2Npc) target : null; - if (npc == null) - { + if (npc == null) { return false; } final int page = st.hasMoreElements() ? Integer.parseInt(st.nextToken()) : 0; sendNpcDropList(activeChar, npc, dropListScope, page); } - catch (NumberFormatException e) - { + catch (NumberFormatException e) { return false; } - catch (IllegalArgumentException e) - { + catch (IllegalArgumentException e) { _log.warning("Bypass[NpcViewMod] unknown drop list scope: " + dropListScopeString); return false; } @@ -136,13 +119,11 @@ public class NpcViewMod implements IBypassHandler } @Override - public String[] getBypassList() - { + public String[] getBypassList() { return COMMANDS; } - public static void sendNpcView(L2PcInstance activeChar, L2Npc npc) - { + public static void sendNpcView(L2PcInstance activeChar, L2Npc npc) { final NpcHtmlMessage html = new NpcHtmlMessage(); html.setFile(activeChar.getHtmlPrefix(), "data/html/mods/NpcView/Info.htm"); html.replace("%name%", npc.getName()); @@ -150,22 +131,17 @@ public class NpcViewMod implements IBypassHandler html.replace("%mpGauge%", HtmlUtil.getMpGauge(250, (long) npc.getCurrentMp(), npc.getMaxMp(), false)); final L2Spawn npcSpawn = npc.getSpawn(); - if ((npcSpawn == null) || (npcSpawn.getRespawnMinDelay() == 0)) - { + if ((npcSpawn == null) || (npcSpawn.getRespawnMinDelay() == 0)) { html.replace("%respawn%", "None"); } - else - { + else { TimeUnit timeUnit = TimeUnit.MILLISECONDS; long min = Long.MAX_VALUE; - for (TimeUnit tu : TimeUnit.values()) - { + for (TimeUnit tu : TimeUnit.values()) { final long minTimeFromMillis = tu.convert(npcSpawn.getRespawnMinDelay(), TimeUnit.MILLISECONDS); final long maxTimeFromMillis = tu.convert(npcSpawn.getRespawnMaxDelay(), TimeUnit.MILLISECONDS); - if ((TimeUnit.MILLISECONDS.convert(minTimeFromMillis, tu) == npcSpawn.getRespawnMinDelay()) && (TimeUnit.MILLISECONDS.convert(maxTimeFromMillis, tu) == npcSpawn.getRespawnMaxDelay())) - { - if (min > minTimeFromMillis) - { + if ((TimeUnit.MILLISECONDS.convert(minTimeFromMillis, tu) == npcSpawn.getRespawnMinDelay()) && (TimeUnit.MILLISECONDS.convert(maxTimeFromMillis, tu) == npcSpawn.getRespawnMaxDelay())) { + if (min > minTimeFromMillis) { min = minTimeFromMillis; timeUnit = tu; } @@ -174,12 +150,10 @@ public class NpcViewMod implements IBypassHandler final long minRespawnDelay = timeUnit.convert(npcSpawn.getRespawnMinDelay(), TimeUnit.MILLISECONDS); final long maxRespawnDelay = timeUnit.convert(npcSpawn.getRespawnMaxDelay(), TimeUnit.MILLISECONDS); final String timeUnitName = timeUnit.name().charAt(0) + timeUnit.name().toLowerCase().substring(1); - if (npcSpawn.hasRespawnRandom()) - { + if (npcSpawn.hasRespawnRandom()) { html.replace("%respawn%", minRespawnDelay + "-" + maxRespawnDelay + " " + timeUnitName); } - else - { + else { html.replace("%respawn%", minRespawnDelay + " " + timeUnitName); } } @@ -216,20 +190,16 @@ public class NpcViewMod implements IBypassHandler activeChar.sendPacket(html); } - public static String getDropListButtons(L2Npc npc) - { + public static String getDropListButtons(L2Npc npc) { final StringBuilder sb = new StringBuilder(); final Map<DropListScope, List<IDropItem>> dropLists = npc.getTemplate().getDropLists(); - if ((dropLists != null) && !dropLists.isEmpty() && (dropLists.containsKey(DropListScope.DEATH) || dropLists.containsKey(DropListScope.CORPSE))) - { + if ((dropLists != null) && !dropLists.isEmpty() && (dropLists.containsKey(DropListScope.DEATH) || dropLists.containsKey(DropListScope.CORPSE))) { sb.append("<table width=275 cellpadding=0 cellspacing=0><tr>"); - if (dropLists.containsKey(DropListScope.DEATH)) - { + if (dropLists.containsKey(DropListScope.DEATH)) { sb.append("<td align=center><button value=\"Show Drop\" width=100 height=25 action=\"bypass NpcViewMod dropList DEATH " + npc.getObjectId() + "\" back=\"L2UI_CT1.Button_DF_Calculator_Down\" fore=\"L2UI_CT1.Button_DF_Calculator\"></td>"); } - if (dropLists.containsKey(DropListScope.CORPSE)) - { + if (dropLists.containsKey(DropListScope.CORPSE)) { sb.append("<td align=center><button value=\"Show Spoil\" width=100 height=25 action=\"bypass NpcViewMod dropList CORPSE " + npc.getObjectId() + "\" back=\"L2UI_CT1.Button_DF_Calculator_Down\" fore=\"L2UI_CT1.Button_DF_Calculator\"></td>"); } sb.append("</tr></table>"); @@ -237,41 +207,34 @@ public class NpcViewMod implements IBypassHandler return sb.toString(); } - public static void sendNpcDropList(L2PcInstance activeChar, L2Npc npc, DropListScope dropListScope, int page) - { + public static void sendNpcDropList(L2PcInstance activeChar, L2Npc npc, DropListScope dropListScope, int page) { final List<IDropItem> dropList = npc.getTemplate().getDropList(dropListScope); - if ((dropList == null) || dropList.isEmpty()) - { + if ((dropList == null) || dropList.isEmpty()) { return; } int pages = dropList.size() / DROP_LIST_ITEMS_PER_PAGE; - if ((DROP_LIST_ITEMS_PER_PAGE * pages) < dropList.size()) - { + if ((DROP_LIST_ITEMS_PER_PAGE * pages) < dropList.size()) { pages++; } final StringBuilder pagesSb = new StringBuilder(); - if (pages > 1) - { + if (pages > 1) { pagesSb.append("<table><tr>"); - for (int i = 0; i < pages; i++) - { + for (int i = 0; i < pages; i++) { pagesSb.append("<td align=center><button value=\"" + (i + 1) + "\" width=20 height=20 action=\"bypass NpcViewMod dropList " + dropListScope + " " + npc.getObjectId() + " " + i + "\" back=\"L2UI_CT1.Button_DF_Calculator_Down\" fore=\"L2UI_CT1.Button_DF_Calculator\"></td>"); } pagesSb.append("</tr></table>"); } - if (page >= pages) - { + if (page >= pages) { page = pages - 1; } final int start = page > 0 ? page * DROP_LIST_ITEMS_PER_PAGE : 0; int end = (page * DROP_LIST_ITEMS_PER_PAGE) + DROP_LIST_ITEMS_PER_PAGE; - if (end > dropList.size()) - { + if (end > dropList.size()) { end = dropList.size(); } @@ -282,27 +245,22 @@ public class NpcViewMod implements IBypassHandler int rightHeight = 0; final StringBuilder leftSb = new StringBuilder(); final StringBuilder rightSb = new StringBuilder(); - for (int i = start; i < end; i++) - { + for (int i = start; i < end; i++) { final StringBuilder sb = new StringBuilder(); int height = 64; final IDropItem dropItem = dropList.get(i); - if (dropItem instanceof GeneralDropItem) - { + if (dropItem instanceof GeneralDropItem) { addGeneralDropItem(activeChar, npc, amountFormat, chanceFormat, sb, (GeneralDropItem) dropItem); } - else if (dropItem instanceof GroupedGeneralDropItem) - { + else if (dropItem instanceof GroupedGeneralDropItem) { final GroupedGeneralDropItem generalGroupedDropItem = (GroupedGeneralDropItem) dropItem; - if (generalGroupedDropItem.getItems().size() == 1) - { + if (generalGroupedDropItem.getItems().size() == 1) { final GeneralDropItem generalDropItem = generalGroupedDropItem.getItems().get(0); addGeneralDropItem(activeChar, npc, amountFormat, chanceFormat, sb, new GeneralDropItem(generalDropItem.getItemId(), generalDropItem.getMin(), generalDropItem.getMax(), (generalDropItem.getChance() * generalGroupedDropItem.getChance()) / 100, generalDropItem.getAmountStrategy(), generalDropItem.getChanceStrategy(), generalGroupedDropItem.getPreciseStrategy(), generalGroupedDropItem.getKillerChanceModifierStrategy(), generalDropItem.getDropCalculationStrategy())); } - else - { + else { GroupedGeneralDropItem normalized = generalGroupedDropItem.normalizeMe(npc, activeChar); sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">"); sb.append("<tr><td width=32 valign=top><img src=\"L2UI_CT1.ICON_DF_premiumItem\" width=32 height=32></td>"); @@ -313,14 +271,12 @@ public class NpcViewMod implements IBypassHandler sb.append(chanceFormat.format(Math.min(normalized.getChance(), 100))); sb.append("%</td></tr></table><br>"); - for (GeneralDropItem generalDropItem : normalized.getItems()) - { + for (GeneralDropItem generalDropItem : normalized.getItems()) { final L2Item item = ItemTable.getInstance().getTemplate(generalDropItem.getItemId()); sb.append("<table width=291 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">"); sb.append("<tr><td width=32 valign=top>"); String icon = item.getIcon(); - if (icon == null) - { + if (icon == null) { icon = "icon.etc_question_mark_i00"; } sb.append("<img src=\"" + icon + "\" width=32 height=32>"); @@ -329,14 +285,12 @@ public class NpcViewMod implements IBypassHandler sb.append("</font></td></tr><tr><td width=32></td><td width=259><table width=253 cellpadding=0 cellspacing=0>"); sb.append("<tr><td width=48 align=right valign=top><font color=\"LEVEL\">Amount:</font></td><td width=205 align=center>"); MinMax minMax = getPreciseMinMax(normalized.getChance(), generalDropItem.getMin(npc), generalDropItem.getMax(npc), generalDropItem.isPreciseCalculated()); - final long min = minMax.min; - final long max = minMax.max; - if (min == max) - { + final long min = minMax._min; + final long max = minMax._max; + if (min == max) { sb.append(amountFormat.format(min)); } - else - { + else { sb.append(amountFormat.format(min)); sb.append(" - "); sb.append(amountFormat.format(max)); @@ -354,13 +308,11 @@ public class NpcViewMod implements IBypassHandler } } - if (leftHeight >= (rightHeight + height)) - { + if (leftHeight >= (rightHeight + height)) { rightSb.append(sb); rightHeight += height; } - else - { + else { leftSb.append(sb); leftHeight += height; } @@ -376,8 +328,7 @@ public class NpcViewMod implements IBypassHandler bodySb.append("</tr></table>"); String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/mods/NpcView/DropList.htm"); - if (html == null) - { + if (html == null) { _log.warning(NpcViewMod.class.getSimpleName() + ": The html file data/html/mods/NpcView/DropList.htm could not be found."); return; } @@ -396,8 +347,7 @@ public class NpcViewMod implements IBypassHandler * @param sb * @param dropItem */ - private static void addGeneralDropItem(L2PcInstance activeChar, L2Npc npc, final DecimalFormat amountFormat, final DecimalFormat chanceFormat, final StringBuilder sb, final GeneralDropItem dropItem) - { + private static void addGeneralDropItem(L2PcInstance activeChar, L2Npc npc, final DecimalFormat amountFormat, final DecimalFormat chanceFormat, final StringBuilder sb, final GeneralDropItem dropItem) { final L2Item item = ItemTable.getInstance().getTemplate(dropItem.getItemId()); sb.append("<table width=332 cellpadding=2 cellspacing=0 background=\"L2UI_CT1.Windows.Windows_DF_TooltipBG\">"); sb.append("<tr><td width=32 valign=top>"); @@ -409,14 +359,12 @@ public class NpcViewMod implements IBypassHandler sb.append("<td width=247 align=center>"); MinMax minMax = getPreciseMinMax(dropItem.getChance(npc, activeChar), dropItem.getMin(npc), dropItem.getMax(npc), dropItem.isPreciseCalculated()); - final long min = minMax.min; - final long max = minMax.max; - if (min == max) - { + final long min = minMax._min; + final long max = minMax._max; + if (min == max) { sb.append(amountFormat.format(min)); } - else - { + else { sb.append(amountFormat.format(min)); sb.append(" - "); sb.append(amountFormat.format(max)); @@ -428,23 +376,18 @@ public class NpcViewMod implements IBypassHandler sb.append("%</td></tr></table></td></tr><tr><td width=32></td><td width=300> </td></tr></table>"); } - private static class MinMax - { - public final long min, max; + private static class MinMax { + private final long _min; + private final long _max; - public MinMax(long min, long max) - { - this.min = min; - this.max = max; - + public MinMax(long min, long max) { + _min = min; + _max = max; } - } - private static MinMax getPreciseMinMax(double chance, long min, long max, boolean isPrecise) - { - if (!isPrecise || (chance <= 100)) - { + private static MinMax getPreciseMinMax(double chance, long min, long max, boolean isPrecise) { + if (!isPrecise || (chance <= 100)) { return new MinMax(min, max); } diff --git a/dist/game/data/scripts/handlers/telnethandlers/DebugHandler.java b/dist/game/data/scripts/handlers/telnethandlers/DebugHandler.java index 8c07df3cf9f3777ff1ed65ddf30419bfaf54d593..d62f93f81dcd8cd4f17aaf5191ccdb8a30393104 100644 --- a/dist/game/data/scripts/handlers/telnethandlers/DebugHandler.java +++ b/dist/game/data/scripts/handlers/telnethandlers/DebugHandler.java @@ -56,54 +56,43 @@ import com.l2jserver.gameserver.taskmanager.DecayTaskManager; /** * @author UnAfraid */ -public class DebugHandler implements ITelnetHandler -{ - private final String[] _commands = - { +public class DebugHandler implements ITelnetHandler { + private final String[] _commands = { "debug" }; - private int uptime = 0; + private int _uptime = 0; @Override - public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime) - { - if (command.startsWith("debug") && (command.length() > 6)) - { + public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int uptime) { + if (command.startsWith("debug") && (command.length() > 6)) { StringTokenizer st = new StringTokenizer(command.substring(6)); // TODO: Rewrite to use ARM. FileOutputStream fos = null; OutputStreamWriter out = null; - try - { + try { String dbg = st.nextToken(); - if (dbg.equals("decay")) - { + if (dbg.equals("decay")) { _print.print(DecayTaskManager.getInstance().toString()); } - else if (dbg.equals("packetsend")) - { - if (st.countTokens() < 2) - { + else if (dbg.equals("packetsend")) { + if (st.countTokens() < 2) { _print.println("Usage: debug packetsend <charName> <packetData>"); return false; } String charName = st.nextToken(); L2PcInstance targetPlayer = L2World.getInstance().getPlayer(charName); - if (targetPlayer == null) - { + if (targetPlayer == null) { _print.println("Player " + charName + " cannot be found online"); return false; } AdminForgePacket sp = new AdminForgePacket(); - while (st.hasMoreTokens()) - { + while (st.hasMoreTokens()) { String b = st.nextToken(); - if (!b.isEmpty()) - { + if (!b.isEmpty()) { sp.addPart("C".getBytes()[0], "0x" + b); } } @@ -111,14 +100,12 @@ public class DebugHandler implements ITelnetHandler targetPlayer.sendPacket(sp); _print.println("Packet sent to player " + charName); } - else if (dbg.equals("PacketTP")) - { + else if (dbg.equals("PacketTP")) { String str = ThreadPoolManager.getInstance().getPacketStats(); _print.println(str); int i = 0; File f = new File("./log/StackTrace-PacketTP-" + i + ".txt"); - while (f.exists()) - { + while (f.exists()) { i++; f = new File("./log/StackTrace-PacketTP-" + i + ".txt"); } @@ -127,14 +114,12 @@ public class DebugHandler implements ITelnetHandler out = new OutputStreamWriter(fos, "UTF-8"); out.write(str); } - else if (dbg.equals("IOPacketTP")) - { + else if (dbg.equals("IOPacketTP")) { String str = ThreadPoolManager.getInstance().getIOPacketStats(); _print.println(str); int i = 0; File f = new File("./log/StackTrace-IOPacketTP-" + i + ".txt"); - while (f.exists()) - { + while (f.exists()) { i++; f = new File("./log/StackTrace-IOPacketTP-" + i + ".txt"); } @@ -143,14 +128,12 @@ public class DebugHandler implements ITelnetHandler out = new OutputStreamWriter(fos, "UTF-8"); out.write(str); } - else if (dbg.equals("GeneralTP")) - { + else if (dbg.equals("GeneralTP")) { String str = ThreadPoolManager.getInstance().getGeneralStats(); _print.println(str); int i = 0; File f = new File("./log/StackTrace-GeneralTP-" + i + ".txt"); - while (f.exists()) - { + while (f.exists()) { i++; f = new File("./log/StackTrace-GeneralTP-" + i + ".txt"); } @@ -159,15 +142,15 @@ public class DebugHandler implements ITelnetHandler out = new OutputStreamWriter(fos, "UTF-8"); out.write(str); } - else if (dbg.equals("full")) - { - Calendar cal = Calendar.getInstance(); - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); + else if (dbg.equals("full")) { + _uptime = uptime; - StringBuilder sb = new StringBuilder(); + final Calendar cal = Calendar.getInstance(); + final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); + + final StringBuilder sb = new StringBuilder(); sb.append(sdf.format(cal.getTime())); sb.append("\n\n"); - uptime = _uptime; sb.append(getServerStatus()); sb.append("\n\n"); sb.append("\n## Java Platform Information ##"); @@ -196,8 +179,7 @@ public class DebugHandler implements ITelnetHandler sb.append("\n## Class Path Information ##\n"); String cp = System.getProperty("java.class.path"); String[] libs = cp.split(File.pathSeparator); - for (String lib : libs) - { + for (String lib : libs) { sb.append(lib); sb.append('\n'); } @@ -209,8 +191,7 @@ public class DebugHandler implements ITelnetHandler final List<Entry<Thread, StackTraceElement[]>> entries = new ArrayList<>(allThread.entrySet()); Collections.sort(entries, (e1, e2) -> e1.getKey().getName().compareTo(e2.getKey().getName())); - for (Entry<Thread, StackTraceElement[]> entry : entries) - { + for (Entry<Thread, StackTraceElement[]> entry : entries) { StackTraceElement[] stes = entry.getValue(); Thread t = entry.getKey(); sb.append("--------------\n"); @@ -218,8 +199,7 @@ public class DebugHandler implements ITelnetHandler sb.append("State: " + t.getState() + '\n'); sb.append("isAlive: " + t.isAlive() + " | isDaemon: " + t.isDaemon() + " | isInterrupted: " + t.isInterrupted() + '\n'); sb.append('\n'); - for (StackTraceElement ste : stes) - { + for (StackTraceElement ste : stes) { sb.append(ste.toString()); sb.append('\n'); } @@ -229,20 +209,16 @@ public class DebugHandler implements ITelnetHandler sb.append('\n'); ThreadMXBean mbean = ManagementFactory.getThreadMXBean(); long[] ids = findDeadlockedThreads(mbean); - if ((ids != null) && (ids.length > 0)) - { + if ((ids != null) && (ids.length > 0)) { Thread[] threads = new Thread[ids.length]; - for (int i = 0; i < threads.length; i++) - { + for (int i = 0; i < threads.length; i++) { threads[i] = findMatchingThread(mbean.getThreadInfo(ids[i])); } sb.append("Deadlocked Threads:\n"); sb.append("-------------------\n"); - for (Thread thread : threads) - { + for (Thread thread : threads) { System.err.println(thread); - for (StackTraceElement ste : thread.getStackTrace()) - { + for (StackTraceElement ste : thread.getStackTrace()) { sb.append("\t" + ste); sb.append('\n'); } @@ -250,16 +226,14 @@ public class DebugHandler implements ITelnetHandler } sb.append("\n\n## Thread Pool Manager Statistics ##\n"); - for (String line : ThreadPoolManager.getInstance().getStats()) - { + for (String line : ThreadPoolManager.getInstance().getStats()) { sb.append(line); sb.append('\n'); } int i = 0; File f = new File("./log/Debug-" + i + ".txt"); - while (f.exists()) - { + while (f.exists()) { i++; f = new File("./log/Debug-" + i + ".txt"); } @@ -275,31 +249,23 @@ public class DebugHandler implements ITelnetHandler _print.flush(); } } - catch (Exception e) - { + catch (Exception e) { } - finally - { - try - { - if (out != null) - { + finally { + try { + if (out != null) { out.close(); } } - catch (Exception e) - { + catch (Exception e) { } - try - { - if (fos != null) - { + try { + if (fos != null) { fos.close(); } } - catch (Exception e) - { + catch (Exception e) { } } @@ -307,31 +273,25 @@ public class DebugHandler implements ITelnetHandler return false; } - private long[] findDeadlockedThreads(ThreadMXBean mbean) - { + private long[] findDeadlockedThreads(ThreadMXBean mbean) { // JDK 1.5 only supports the findMonitorDeadlockedThreads() // method, so you need to comment out the following three lines - if (mbean.isSynchronizerUsageSupported()) - { + if (mbean.isSynchronizerUsageSupported()) { return mbean.findDeadlockedThreads(); } return mbean.findMonitorDeadlockedThreads(); } - private Thread findMatchingThread(ThreadInfo inf) - { - for (Thread thread : Thread.getAllStackTraces().keySet()) - { - if (thread.getId() == inf.getThreadId()) - { + private Thread findMatchingThread(ThreadInfo inf) { + for (Thread thread : Thread.getAllStackTraces().keySet()) { + if (thread.getId() == inf.getThreadId()) { return thread; } } throw new IllegalStateException("Deadlocked Thread not found"); } - public String getServerStatus() - { + public String getServerStatus() { int playerCount = 0, objectCount = 0; int max = LoginServerThread.getInstance().getMaxPlayer(); @@ -351,61 +311,46 @@ public class DebugHandler implements ITelnetHandler int summonCount = 0; int AICount = 0; - for (L2Object obj : L2World.getInstance().getVisibleObjects()) - { - if (obj == null) - { + for (L2Object obj : L2World.getInstance().getVisibleObjects()) { + if (obj == null) { continue; } - if (obj instanceof L2Character) - { - if (((L2Character) obj).hasAI()) - { + if (obj instanceof L2Character) { + if (((L2Character) obj).hasAI()) { AICount++; } } - if (obj instanceof L2ItemInstance) - { - if (((L2ItemInstance) obj).getItemLocation() == ItemLocation.VOID) - { + if (obj instanceof L2ItemInstance) { + if (((L2ItemInstance) obj).getItemLocation() == ItemLocation.VOID) { itemVoidCount++; } - else - { + else { itemCount++; } } - else if (obj instanceof L2MonsterInstance) - { + else if (obj instanceof L2MonsterInstance) { monsterCount++; - if (((L2MonsterInstance) obj).hasMinions()) - { + if (((L2MonsterInstance) obj).hasMinions()) { minionCount += ((L2MonsterInstance) obj).getMinionList().countSpawnedMinions(); minionsGroupCount += ((L2MonsterInstance) obj).getMinionList().lazyCountSpawnedMinionsGroups(); } } - else if (obj instanceof L2Npc) - { + else if (obj instanceof L2Npc) { npcCount++; } - else if (obj instanceof L2PcInstance) - { + else if (obj instanceof L2PcInstance) { pcCount++; - if ((((L2PcInstance) obj).getClient() != null) && ((L2PcInstance) obj).getClient().isDetached()) - { + if ((((L2PcInstance) obj).getClient() != null) && ((L2PcInstance) obj).getClient().isDetached()) { detachedCount++; } } - else if (obj instanceof L2Summon) - { + else if (obj instanceof L2Summon) { summonCount++; } - else if (obj instanceof L2DoorInstance) - { + else if (obj instanceof L2DoorInstance) { doorCount++; } - else if (obj instanceof L2Character) - { + else if (obj instanceof L2Character) { charCount++; } } @@ -426,7 +371,7 @@ public class DebugHandler implements ITelnetHandler sb.append("\r\n +.......... L2Door: " + doorCount); sb.append("\r\n +.......... L2Char: " + charCount); sb.append("\r\n ---> Ingame Time: " + gameTime()); - sb.append("\r\n ---> Server Uptime: " + getUptime(uptime)); + sb.append("\r\n ---> Server Uptime: " + getUptime(_uptime)); sb.append("\r\n ---> GM Count: " + getOnlineGMS()); sb.append("\r\n ---> Threads: " + Thread.activeCount()); sb.append("\r\n RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576)); // 1024 * 1024 = 1048576 @@ -435,23 +380,19 @@ public class DebugHandler implements ITelnetHandler return sb.toString(); } - private int getOnlineGMS() - { + private int getOnlineGMS() { return AdminData.getInstance().getAllGms(true).size(); } - private String getUptime(int time) - { - int uptime = (int) System.currentTimeMillis() - time; - uptime = uptime / 1000; - int h = uptime / 3600; - int m = (uptime - (h * 3600)) / 60; - int s = ((uptime - (h * 3600)) - (m * 60)); + private String getUptime(int time) { + final int uptime = (int) (System.currentTimeMillis() - time) / 1000; + final int h = uptime / 3600; + final int m = (uptime - (h * 3600)) / 60; + final int s = ((uptime - (h * 3600)) - (m * 60)); return h + "hrs " + m + "mins " + s + "secs"; } - private String gameTime() - { + private String gameTime() { int t = GameTimeController.getInstance().getGameTime(); int h = t / 60; int m = t % 60; @@ -463,8 +404,7 @@ public class DebugHandler implements ITelnetHandler } @Override - public String[] getCommandList() - { + public String[] getCommandList() { return _commands; } } diff --git a/dist/game/data/scripts/handlers/telnethandlers/StatusHandler.java b/dist/game/data/scripts/handlers/telnethandlers/StatusHandler.java index 5b366097fdaaf4450b4faf0a244fd83a07465191..3e65751f958504d3f59fe8d2b59d92f087ab6d68 100644 --- a/dist/game/data/scripts/handlers/telnethandlers/StatusHandler.java +++ b/dist/game/data/scripts/handlers/telnethandlers/StatusHandler.java @@ -42,36 +42,30 @@ import com.l2jserver.gameserver.model.items.instance.L2ItemInstance; /** * @author UnAfraid */ -public class StatusHandler implements ITelnetHandler -{ - private final String[] _commands = - { +public class StatusHandler implements ITelnetHandler { + private final String[] _commands = { "status", "forcegc", "memusage", "gmlist" }; - private int uptime; + private int _uptime; @Override - public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int _uptime) - { - if (command.equals("status")) - { - uptime = _uptime; + public boolean useCommand(String command, PrintWriter _print, Socket _cSocket, int uptime) { + if (command.equals("status")) { + _uptime = uptime; _print.print(getServerStatus()); _print.flush(); } - else if (command.equals("forcegc")) - { + else if (command.equals("forcegc")) { System.gc(); StringBuilder sb = new StringBuilder(); sb.append("RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576)); // 1024 * 1024 = 1048576 _print.println(sb.toString()); } - else if (command.startsWith("memusage")) - { + else if (command.startsWith("memusage")) { double max = Runtime.getRuntime().maxMemory() / 1024; // maxMemory is the upper // limit the jvm can use double allocated = Runtime.getRuntime().totalMemory() / 1024; // totalMemory the @@ -98,27 +92,23 @@ public class StatusHandler implements ITelnetHandler _print.println("| Useable Memory:" + df2.format(useable) + df.format((useable / max) * 100)); // ... _print.println("+----"); } - else if (command.equals("gmlist")) - { + else if (command.equals("gmlist")) { int igm = 0; String gmList = ""; - for (String player : AdminData.getInstance().getAllGmNames(true)) - { + for (String player : AdminData.getInstance().getAllGmNames(true)) { gmList = gmList + ", " + player; igm++; } _print.println("There are currently " + igm + " GM(s) online..."); - if (!gmList.isEmpty()) - { + if (!gmList.isEmpty()) { _print.println(gmList); } } return false; } - public String getServerStatus() - { + public String getServerStatus() { int playerCount = 0, objectCount = 0; int max = LoginServerThread.getInstance().getMaxPlayer(); @@ -138,61 +128,46 @@ public class StatusHandler implements ITelnetHandler int summonCount = 0; int AICount = 0; - for (L2Object obj : L2World.getInstance().getVisibleObjects()) - { - if (obj == null) - { + for (L2Object obj : L2World.getInstance().getVisibleObjects()) { + if (obj == null) { continue; } - if (obj instanceof L2Character) - { - if (((L2Character) obj).hasAI()) - { + if (obj instanceof L2Character) { + if (((L2Character) obj).hasAI()) { AICount++; } } - if (obj instanceof L2ItemInstance) - { - if (((L2ItemInstance) obj).getItemLocation() == ItemLocation.VOID) - { + if (obj instanceof L2ItemInstance) { + if (((L2ItemInstance) obj).getItemLocation() == ItemLocation.VOID) { itemVoidCount++; } - else - { + else { itemCount++; } } - else if (obj instanceof L2MonsterInstance) - { + else if (obj instanceof L2MonsterInstance) { monsterCount++; - if (((L2MonsterInstance) obj).hasMinions()) - { + if (((L2MonsterInstance) obj).hasMinions()) { minionCount += ((L2MonsterInstance) obj).getMinionList().countSpawnedMinions(); minionsGroupCount += ((L2MonsterInstance) obj).getMinionList().lazyCountSpawnedMinionsGroups(); } } - else if (obj instanceof L2Npc) - { + else if (obj instanceof L2Npc) { npcCount++; } - else if (obj instanceof L2PcInstance) - { + else if (obj instanceof L2PcInstance) { pcCount++; - if ((((L2PcInstance) obj).getClient() != null) && ((L2PcInstance) obj).getClient().isDetached()) - { + if ((((L2PcInstance) obj).getClient() != null) && ((L2PcInstance) obj).getClient().isDetached()) { detachedCount++; } } - else if (obj instanceof L2Summon) - { + else if (obj instanceof L2Summon) { summonCount++; } - else if (obj instanceof L2DoorInstance) - { + else if (obj instanceof L2DoorInstance) { doorCount++; } - else if (obj instanceof L2Character) - { + else if (obj instanceof L2Character) { charCount++; } } @@ -213,7 +188,7 @@ public class StatusHandler implements ITelnetHandler sb.append("\r\n +.......... L2Door: " + doorCount); sb.append("\r\n +.......... L2Char: " + charCount); sb.append("\r\n ---> Ingame Time: " + gameTime()); - sb.append("\r\n ---> Server Uptime: " + getUptime(uptime)); + sb.append("\r\n ---> Server Uptime: " + getUptime(_uptime)); sb.append("\r\n ---> GM Count: " + getOnlineGMS()); sb.append("\r\n ---> Threads: " + Thread.activeCount()); sb.append("\r\n RAM Used: " + ((Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / 1048576)); // 1024 * 1024 = 1048576 @@ -222,23 +197,19 @@ public class StatusHandler implements ITelnetHandler return sb.toString(); } - private int getOnlineGMS() - { + private int getOnlineGMS() { return AdminData.getInstance().getAllGms(true).size(); } - private String getUptime(int time) - { - int uptime = (int) System.currentTimeMillis() - time; - uptime = uptime / 1000; + private String getUptime(int time) { + int uptime = (int) (System.currentTimeMillis() - time) / 1000; int h = uptime / 3600; int m = (uptime - (h * 3600)) / 60; int s = ((uptime - (h * 3600)) - (m * 60)); return h + "hrs " + m + "mins " + s + "secs"; } - private String gameTime() - { + private String gameTime() { int t = GameTimeController.getInstance().getGameTime(); int h = t / 60; int m = t % 60; @@ -250,8 +221,7 @@ public class StatusHandler implements ITelnetHandler } @Override - public String[] getCommandList() - { + public String[] getCommandList() { return _commands; } } diff --git a/dist/game/data/scripts/quests/AbstractSagaQuest.java b/dist/game/data/scripts/quests/AbstractSagaQuest.java index a6c401e51ddcdfb4551b00b40b6c7596551240af..6c7aa164a29cc6a157c2f9c4a2b97a5dd2fff721 100644 --- a/dist/game/data/scripts/quests/AbstractSagaQuest.java +++ b/dist/game/data/scripts/quests/AbstractSagaQuest.java @@ -43,18 +43,17 @@ import com.l2jserver.gameserver.network.serverpackets.NpcSay; * Abstract Saga quest. * @author Kerberos */ -public abstract class AbstractSagaQuest extends Quest -{ +public abstract class AbstractSagaQuest extends Quest { protected int[] _npc; - protected int[] Items; - protected int[] Mob; - protected int[] classid; - protected int[] prevclass; - protected Location[] npcSpawnLocations; - protected String[] Text; + protected int[] _items; + protected int[] _mob; + protected int[] _classId; + protected int[] _previousClass; + protected Location[] _npcSpawnLocations; + protected String[] _text; private static final Map<L2Npc, Integer> SPAWN_LIST = new HashMap<>(); // @formatter:off - private static int[][] QuestClass = + private static final int[][] QUEST_CLASS = { { 0x7f }, { 0x80, 0x81 }, { 0x82 }, { 0x05 }, { 0x14 }, { 0x15 }, { 0x02 }, { 0x03 }, { 0x2e }, { 0x30 }, { 0x33 }, { 0x34 }, { 0x08 }, @@ -64,105 +63,83 @@ public abstract class AbstractSagaQuest extends Quest }; // @formatter:on - public AbstractSagaQuest(int questId, String name, String descr) - { + public AbstractSagaQuest(int questId, String name, String descr) { super(questId, name, descr); } - private QuestState findQuest(L2PcInstance player) - { + private QuestState findQuest(L2PcInstance player) { QuestState st = getQuestState(player, false); - if (st != null) - { - if (getId() == 68) - { - for (int q = 0; q < 2; q++) - { - if (player.getClassId().getId() == QuestClass[1][q]) - { + if (st != null) { + if (getId() == 68) { + for (int q = 0; q < 2; q++) { + if (player.getClassId().getId() == QUEST_CLASS[1][q]) { return st; } } } - else if (player.getClassId().getId() == QuestClass[getId() - 67][0]) - { + else if (player.getClassId().getId() == QUEST_CLASS[getId() - 67][0]) { return st; } } return null; } - private QuestState findRightState(L2Npc npc) - { + private QuestState findRightState(L2Npc npc) { L2PcInstance player = null; QuestState st = null; - if (SPAWN_LIST.containsKey(npc)) - { + if (SPAWN_LIST.containsKey(npc)) { player = L2World.getInstance().getPlayer(SPAWN_LIST.get(npc)); - if (player != null) - { + if (player != null) { st = player.getQuestState(getName()); } } return st; } - private int getClassId(L2PcInstance player) - { - if (player.getClassId().getId() == 0x81) - { - return classid[1]; + private int getClassId(L2PcInstance player) { + if (player.getClassId().getId() == 0x81) { + return _classId[1]; } - return classid[0]; + return _classId[0]; } - private int getPrevClass(L2PcInstance player) - { - if (player.getClassId().getId() == 0x81) - { - if (prevclass.length == 1) - { + private int getPrevClass(L2PcInstance player) { + if (player.getClassId().getId() == 0x81) { + if (_previousClass.length == 1) { return -1; } - return prevclass[1]; + return _previousClass[1]; } - return prevclass[0]; + return _previousClass[0]; } - private void giveHalishaMark(QuestState st2) - { - if (st2.getInt("spawned") == 0) - { - if (st2.getQuestItemsCount(Items[3]) >= 700) - { - st2.takeItems(Items[3], 20); + private void giveHalishaMark(QuestState st2) { + if (st2.getInt("spawned") == 0) { + if (st2.getQuestItemsCount(_items[3]) >= 700) { + st2.takeItems(_items[3], 20); int xx = st2.getPlayer().getX(); int yy = st2.getPlayer().getY(); int zz = st2.getPlayer().getZ(); - L2Npc Archon = st2.addSpawn(Mob[1], xx, yy, zz); + L2Npc Archon = st2.addSpawn(_mob[1], xx, yy, zz); addSpawn(st2, Archon); st2.set("spawned", "1"); st2.startQuestTimer("Archon Hellisha has despawned", 600000, Archon); - autoChat(Archon, Text[13].replace("PLAYERNAME", st2.getPlayer().getName())); + autoChat(Archon, _text[13].replace("PLAYERNAME", st2.getPlayer().getName())); ((L2Attackable) Archon).addDamageHate(st2.getPlayer(), 0, 99999); Archon.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, st2.getPlayer(), null); } - else - { - st2.giveItems(Items[3], getRandom(1, 4)); + else { + st2.giveItems(_items[3], getRandom(1, 4)); } } } @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { QuestState st = getQuestState(player, false); String htmltext = null; - if (st != null) - { - switch (event) - { + if (st != null) { + switch (event) { case "0-011.htm": case "0-012.htm": case "0-013.htm": @@ -172,41 +149,35 @@ public abstract class AbstractSagaQuest extends Quest break; case "accept": st.startQuest(); - giveItems(player, Items[10], 1); + giveItems(player, _items[10], 1); htmltext = "0-03.htm"; break; case "0-1": - if (player.getLevel() < 76) - { + if (player.getLevel() < 76) { htmltext = "0-02.htm"; - if (st.isCreated()) - { + if (st.isCreated()) { st.exitQuest(true); } } - else - { + else { htmltext = "0-05.htm"; } break; case "0-2": - if (player.getLevel() < 76) - { - takeItems(player, Items[10], -1); + if (player.getLevel() < 76) { + takeItems(player, _items[10], -1); st.setCond(20, true); htmltext = "0-08.htm"; } - else - { - takeItems(player, Items[10], -1); + else { + takeItems(player, _items[10], -1); addExpAndSp(player, 2299404, 0); giveAdena(player, 5000000, true); giveItems(player, 6622, 1); int Class = getClassId(player); int prevClass = getPrevClass(player); player.setClassId(Class); - if (!player.isSubClassActive() && (player.getBaseClass() == prevClass)) - { + if (!player.isSubClassActive() && (player.getBaseClass() == prevClass)) { player.setBaseClass(Class); } player.broadcastUserInfo(); @@ -221,12 +192,11 @@ public abstract class AbstractSagaQuest extends Quest break; case "1-4": st.setCond(4); - takeItems(player, Items[0], 1); - if (Items[11] != 0) - { - takeItems(player, Items[11], 1); + takeItems(player, _items[0], 1); + if (_items[11] != 0) { + takeItems(player, _items[11], 1); } - giveItems(player, Items[1], 1); + giveItems(player, _items[1], 1); htmltext = "1-06.htm"; break; case "2-1": @@ -235,8 +205,8 @@ public abstract class AbstractSagaQuest extends Quest break; case "2-2": st.setCond(5); - takeItems(player, Items[1], 1); - giveItems(player, Items[4], 1); + takeItems(player, _items[1], 1); + giveItems(player, _items[4], 1); htmltext = "2-06.htm"; break; case "3-5": @@ -252,67 +222,64 @@ public abstract class AbstractSagaQuest extends Quest break; case "3-8": st.setCond(13); - takeItems(player, Items[2], 1); - giveItems(player, Items[7], 1); + takeItems(player, _items[2], 1); + giveItems(player, _items[7], 1); htmltext = "3-08.htm"; break; case "4-1": htmltext = "4-010.htm"; break; case "4-2": - giveItems(player, Items[9], 1); + giveItems(player, _items[9], 1); st.setCond(18, true); htmltext = "4-011.htm"; break; case "4-3": - giveItems(player, Items[9], 1); + giveItems(player, _items[9], 1); st.setCond(18, true); - autoChat(npc, Text[13].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[13].replace("PLAYERNAME", player.getName())); st.set("Quest0", "0"); cancelQuestTimer("Mob_2 has despawned", npc, player); DeleteSpawn(st, npc); return null; case "5-1": st.setCond(6, true); - takeItems(player, Items[4], 1); + takeItems(player, _items[4], 1); cast(npc, player, 4546, 1); htmltext = "5-02.htm"; break; case "6-1": st.setCond(8, true); st.set("spawned", "0"); - takeItems(player, Items[5], 1); + takeItems(player, _items[5], 1); cast(npc, player, 4546, 1); htmltext = "6-03.htm"; break; case "7-1": - if (st.getInt("spawned") == 1) - { + if (st.getInt("spawned") == 1) { htmltext = "7-03.htm"; } - else if (st.getInt("spawned") == 0) - { - L2Npc Mob_1 = addSpawn(Mob[0], npcSpawnLocations[0], false, 0); + else if (st.getInt("spawned") == 0) { + L2Npc Mob_1 = addSpawn(_mob[0], _npcSpawnLocations[0], false, 0); st.set("spawned", "1"); st.startQuestTimer("Mob_1 Timer 1", 500, Mob_1); st.startQuestTimer("Mob_1 has despawned", 300000, Mob_1); addSpawn(st, Mob_1); htmltext = "7-02.htm"; } - else - { + else { htmltext = "7-04.htm"; } break; case "7-2": st.setCond(10, true); - takeItems(player, Items[6], 1); + takeItems(player, _items[6], 1); cast(npc, player, 4546, 1); htmltext = "7-06.htm"; break; case "8-1": st.setCond(14, true); - takeItems(player, Items[7], 1); + takeItems(player, _items[7], 1); cast(npc, player, 4546, 1); htmltext = "8-02.htm"; break; @@ -320,15 +287,14 @@ public abstract class AbstractSagaQuest extends Quest st.setCond(17, true); st.set("Quest0", "0"); st.set("Tab", "0"); - takeItems(player, Items[8], 1); + takeItems(player, _items[8], 1); cast(npc, player, 4546, 1); htmltext = "9-03.htm"; break; case "10-1": - if (st.getInt("Quest0") == 0) - { - L2Npc Mob_3 = addSpawn(Mob[2], npcSpawnLocations[1], false, 0); - L2Npc Mob_2 = addSpawn(_npc[4], npcSpawnLocations[2], false, 0); + if (st.getInt("Quest0") == 0) { + L2Npc Mob_3 = addSpawn(_mob[2], _npcSpawnLocations[1], false, 0); + L2Npc Mob_2 = addSpawn(_npc[4], _npcSpawnLocations[2], false, 0); addSpawn(st, Mob_3); addSpawn(st, Mob_2); st.set("Mob_2", String.valueOf(Mob_2.getObjectId())); @@ -340,18 +306,16 @@ public abstract class AbstractSagaQuest extends Quest st.startQuestTimer("Mob_2 has despawned", 60000, Mob_2); htmltext = "10-02.htm"; } - else if (st.getInt("Quest1") == 45) - { + else if (st.getInt("Quest1") == 45) { htmltext = "10-03.htm"; } - else - { + else { htmltext = "10-04.htm"; } break; case "10-2": st.setCond(19, true); - takeItems(player, Items[9], 1); + takeItems(player, _items[9], 1); cast(npc, player, 4546, 1); htmltext = "10-06.htm"; break; @@ -360,78 +324,69 @@ public abstract class AbstractSagaQuest extends Quest htmltext = "11-03.htm"; break; case "Mob_1 Timer 1": - autoChat(npc, Text[0].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[0].replace("PLAYERNAME", player.getName())); return null; case "Mob_1 has despawned": - autoChat(npc, Text[1].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[1].replace("PLAYERNAME", player.getName())); st.set("spawned", "0"); DeleteSpawn(st, npc); return null; case "Archon Hellisha has despawned": - autoChat(npc, Text[6].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[6].replace("PLAYERNAME", player.getName())); st.set("spawned", "0"); DeleteSpawn(st, npc); return null; case "Mob_3 Timer 1": L2Npc Mob_2 = FindSpawn(player, (L2Npc) L2World.getInstance().findObject(st.getInt("Mob_2"))); - if (npc.getKnownList().knowsObject(Mob_2)) - { + if (npc.getKnownList().knowsObject(Mob_2)) { ((L2Attackable) npc).addDamageHate(Mob_2, 0, 99999); npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, Mob_2, null); Mob_2.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, npc, null); - autoChat(npc, Text[14].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[14].replace("PLAYERNAME", player.getName())); cancelQuestTimer("Mob_3 Timer 1", npc, player); } return null; case "Mob_3 has despawned": - autoChat(npc, Text[15].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[15].replace("PLAYERNAME", player.getName())); st.set("Quest0", "2"); DeleteSpawn(st, npc); return null; case "Mob_2 Timer 1": - autoChat(npc, Text[7].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[7].replace("PLAYERNAME", player.getName())); st.startQuestTimer("Mob_2 Timer 2", 1500, npc); - if (st.getInt("Quest1") == 45) - { + if (st.getInt("Quest1") == 45) { st.set("Quest1", "0"); } return null; case "Mob_2 Timer 2": - autoChat(npc, Text[8].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[8].replace("PLAYERNAME", player.getName())); st.startQuestTimer("Mob_2 Timer 3", 10000, npc); return null; case "Mob_2 Timer 3": - if (st.getInt("Quest0") == 0) - { + if (st.getInt("Quest0") == 0) { st.startQuestTimer("Mob_2 Timer 3", 13000, npc); - if (getRandomBoolean()) - { - autoChat(npc, Text[9].replace("PLAYERNAME", player.getName())); + if (getRandomBoolean()) { + autoChat(npc, _text[9].replace("PLAYERNAME", player.getName())); } - else - { - autoChat(npc, Text[10].replace("PLAYERNAME", player.getName())); + else { + autoChat(npc, _text[10].replace("PLAYERNAME", player.getName())); } } return null; case "Mob_2 has despawned": st.set("Quest1", String.valueOf(st.getInt("Quest1") + 1)); - if ((st.getInt("Quest0") == 1) || (st.getInt("Quest0") == 2) || (st.getInt("Quest1") > 3)) - { + if ((st.getInt("Quest0") == 1) || (st.getInt("Quest0") == 2) || (st.getInt("Quest1") > 3)) { st.set("Quest0", "0"); // TODO this IF will never be true - if (st.getInt("Quest0") == 1) - { - autoChat(npc, Text[11].replace("PLAYERNAME", player.getName())); + if (st.getInt("Quest0") == 1) { + autoChat(npc, _text[11].replace("PLAYERNAME", player.getName())); } - else - { - autoChat(npc, Text[12].replace("PLAYERNAME", player.getName())); + else { + autoChat(npc, _text[12].replace("PLAYERNAME", player.getName())); } DeleteSpawn(st, npc); } - else - { + else { st.startQuestTimer("Mob_2 has despawned", 1000, npc); } return null; @@ -441,26 +396,21 @@ public abstract class AbstractSagaQuest extends Quest } @Override - public String onAttack(L2Npc npc, L2PcInstance player, int damage, boolean isSummon) - { + public String onAttack(L2Npc npc, L2PcInstance player, int damage, boolean isSummon) { QuestState st2 = findRightState(npc); - if (st2 != null) - { + if (st2 != null) { int cond = st2.getCond(); QuestState st = getQuestState(player, false); int npcId = npc.getId(); - if ((npcId == Mob[2]) && (st == st2) && (cond == 17)) - { + if ((npcId == _mob[2]) && (st == st2) && (cond == 17)) { int quest0 = st.getInt("Quest0") + 1; - if (quest0 == 1) - { - autoChat(npc, Text[16].replace("PLAYERNAME", player.getName())); + if (quest0 == 1) { + autoChat(npc, _text[16].replace("PLAYERNAME", player.getName())); } - if (quest0 > 15) - { + if (quest0 > 15) { quest0 = 1; - autoChat(npc, Text[17].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[17].replace("PLAYERNAME", player.getName())); cancelQuestTimer("Mob_3 has despawned", npc, st2.getPlayer()); st.set("Tab", "1"); DeleteSpawn(st, npc); @@ -468,11 +418,9 @@ public abstract class AbstractSagaQuest extends Quest st.set("Quest0", Integer.toString(quest0)); } - else if ((npcId == Mob[1]) && (cond == 15)) - { - if ((st != st2) || ((st == st2) && player.isInParty())) - { - autoChat(npc, Text[5].replace("PLAYERNAME", player.getName())); + else if ((npcId == _mob[1]) && (cond == 15)) { + if ((st != st2) || ((st == st2) && player.isInParty())) { + autoChat(npc, _text[5].replace("PLAYERNAME", player.getName())); cancelQuestTimer("Archon Hellisha has despawned", npc, st2.getPlayer()); st2.set("spawned", "0"); DeleteSpawn(st2, npc); @@ -483,114 +431,86 @@ public abstract class AbstractSagaQuest extends Quest } @Override - public String onFirstTalk(L2Npc npc, L2PcInstance player) - { + public String onFirstTalk(L2Npc npc, L2PcInstance player) { String htmltext = ""; QuestState st = getQuestState(player, false); int npcId = npc.getId(); - if (st != null) - { - if (npcId == _npc[4]) - { + if (st != null) { + if (npcId == _npc[4]) { int cond = st.getCond(); - if (cond == 17) - { + if (cond == 17) { QuestState st2 = findRightState(npc); - if (st2 != null) - { + if (st2 != null) { player.setLastQuestNpcObject(npc.getObjectId()); int tab = st.getInt("Tab"); int quest0 = st.getInt("Quest0"); - if (st == st2) - { - if (tab == 1) - { - if (quest0 == 0) - { + if (st == st2) { + if (tab == 1) { + if (quest0 == 0) { htmltext = "4-04.htm"; } - else if (quest0 == 1) - { + else if (quest0 == 1) { htmltext = "4-06.htm"; } } - else if (quest0 == 0) - { + else if (quest0 == 0) { htmltext = "4-01.htm"; } - else if (quest0 == 1) - { + else if (quest0 == 1) { htmltext = "4-03.htm"; } } - else if (tab == 1) - { - if (quest0 == 0) - { + else if (tab == 1) { + if (quest0 == 0) { htmltext = "4-05.htm"; } - else if (quest0 == 1) - { + else if (quest0 == 1) { htmltext = "4-07.htm"; } } - else if (quest0 == 0) - { + else if (quest0 == 0) { htmltext = "4-02.htm"; } } } - else if (cond == 18) - { + else if (cond == 18) { htmltext = "4-08.htm"; } } } - if (htmltext == "") - { + if (htmltext == "") { npc.showChatWindow(player); } return htmltext; } @Override - public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) - { + public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) { int npcId = npc.getId(); QuestState st = getQuestState(player, false); - for (int Archon_Minion = 21646; Archon_Minion < 21652; Archon_Minion++) - { - if (npcId == Archon_Minion) - { + for (int Archon_Minion = 21646; Archon_Minion < 21652; Archon_Minion++) { + if (npcId == Archon_Minion) { L2Party party = player.getParty(); - if (party != null) - { + if (party != null) { List<QuestState> partyQuestMembers = new ArrayList<>(); - for (L2PcInstance player1 : party.getMembers()) - { + for (L2PcInstance player1 : party.getMembers()) { QuestState st1 = findQuest(player1); - if ((st1 != null) && player1.isInsideRadius(player, Config.ALT_PARTY_RANGE2, false, false)) - { - if (st1.isCond(15)) - { + if ((st1 != null) && player1.isInsideRadius(player, Config.ALT_PARTY_RANGE2, false, false)) { + if (st1.isCond(15)) { partyQuestMembers.add(st1); } } } - if (partyQuestMembers.size() > 0) - { + if (partyQuestMembers.size() > 0) { QuestState st2 = partyQuestMembers.get(getRandom(partyQuestMembers.size())); giveHalishaMark(st2); } } - else - { + else { QuestState st1 = findQuest(player); - if (st1 != null) - { - if (st1.isCond(15)) - { + if (st1 != null) { + if (st1.isCond(15)) { giveHalishaMark(st1); } } @@ -599,27 +519,22 @@ public abstract class AbstractSagaQuest extends Quest } } - int[] Archon_Hellisha_Norm = - { + int[] Archon_Hellisha_Norm = { 18212, 18214, 18215, 18216, 18218 }; - for (int element : Archon_Hellisha_Norm) - { - if (npcId == element) - { + for (int element : Archon_Hellisha_Norm) { + if (npcId == element) { QuestState st1 = findQuest(player); - if (st1 != null) - { - if (st1.isCond(15)) - { + if (st1 != null) { + if (st1.isCond(15)) { // This is just a guess....not really sure what it actually says, if anything - autoChat(npc, Text[4].replace("PLAYERNAME", st1.getPlayer().getName())); - st1.giveItems(Items[8], 1); - st1.takeItems(Items[3], -1); + autoChat(npc, _text[4].replace("PLAYERNAME", st1.getPlayer().getName())); + st1.giveItems(_items[8], 1); + st1.takeItems(_items[3], -1); st1.setCond(16, true); } } @@ -627,41 +542,31 @@ public abstract class AbstractSagaQuest extends Quest } } - for (int Guardian_Angel = 27214; Guardian_Angel < 27217; Guardian_Angel++) - { - if (npcId == Guardian_Angel) - { + for (int Guardian_Angel = 27214; Guardian_Angel < 27217; Guardian_Angel++) { + if (npcId == Guardian_Angel) { QuestState st1 = findQuest(player); - if ((st1 != null) && st1.isCond(6)) - { + if ((st1 != null) && st1.isCond(6)) { int kills = st1.getInt("kills"); - if (kills < 9) - { + if (kills < 9) { st1.set("kills", Integer.toString(kills + 1)); } - else - { - st1.giveItems(Items[5], 1); + else { + st1.giveItems(_items[5], 1); st.setCond(7, true); } } return super.onKill(npc, player, isSummon); } } - if ((st != null) && (npcId != Mob[2])) - { + if ((st != null) && (npcId != _mob[2])) { QuestState st2 = findRightState(npc); - if (st2 != null) - { + if (st2 != null) { int cond = st.getCond(); - if ((npcId == Mob[0]) && (cond == 8)) - { - if (!player.isInParty()) - { - if (st == st2) - { - autoChat(npc, Text[12].replace("PLAYERNAME", player.getName())); - giveItems(player, Items[6], 1); + if ((npcId == _mob[0]) && (cond == 8)) { + if (!player.isInParty()) { + if (st == st2) { + autoChat(npc, _text[12].replace("PLAYERNAME", player.getName())); + giveItems(player, _items[6], 1); st.setCond(9, true); } } @@ -669,20 +574,16 @@ public abstract class AbstractSagaQuest extends Quest st2.set("spawned", "0"); DeleteSpawn(st2, npc); } - else if ((npcId == Mob[1]) && (cond == 15)) - { - if (!player.isInParty()) - { - if (st == st2) - { - autoChat(npc, Text[4].replace("PLAYERNAME", player.getName())); - giveItems(player, Items[8], 1); - takeItems(player, Items[3], -1); + else if ((npcId == _mob[1]) && (cond == 15)) { + if (!player.isInParty()) { + if (st == st2) { + autoChat(npc, _text[4].replace("PLAYERNAME", player.getName())); + giveItems(player, _items[8], 1); + takeItems(player, _items[3], -1); st.setCond(16, true); } - else - { - autoChat(npc, Text[5].replace("PLAYERNAME", player.getName())); + else { + autoChat(npc, _text[5].replace("PLAYERNAME", player.getName())); } } cancelQuestTimer("Archon Hellisha has despawned", npc, st2.getPlayer()); @@ -691,21 +592,17 @@ public abstract class AbstractSagaQuest extends Quest } } } - else if (npcId == Mob[0]) - { + else if (npcId == _mob[0]) { st = findRightState(npc); - if (st != null) - { + if (st != null) { cancelQuestTimer("Mob_1 has despawned", npc, st.getPlayer()); st.set("spawned", "0"); DeleteSpawn(st, npc); } } - else if (npcId == Mob[1]) - { + else if (npcId == _mob[1]) { st = findRightState(npc); - if (st != null) - { + if (st != null) { cancelQuestTimer("Archon Hellisha has despawned", npc, st.getPlayer()); st.set("spawned", "0"); DeleteSpawn(st, npc); @@ -715,26 +612,20 @@ public abstract class AbstractSagaQuest extends Quest } @Override - public String onSkillSee(L2Npc npc, L2PcInstance player, Skill skill, L2Object[] targets, boolean isSummon) - { - if (SPAWN_LIST.containsKey(npc) && (SPAWN_LIST.get(npc) != player.getObjectId())) - { + public String onSkillSee(L2Npc npc, L2PcInstance player, Skill skill, L2Object[] targets, boolean isSummon) { + if (SPAWN_LIST.containsKey(npc) && (SPAWN_LIST.get(npc) != player.getObjectId())) { L2PcInstance quest_player = (L2PcInstance) L2World.getInstance().findObject(SPAWN_LIST.get(npc)); - if (quest_player == null) - { + if (quest_player == null) { return null; } - for (L2Object obj : targets) - { - if ((obj == quest_player) || (obj == npc)) - { + for (L2Object obj : targets) { + if ((obj == quest_player) || (obj == npc)) { QuestState st2 = findRightState(npc); - if (st2 == null) - { + if (st2 == null) { return null; } - autoChat(npc, Text[5].replace("PLAYERNAME", player.getName())); + autoChat(npc, _text[5].replace("PLAYERNAME", player.getName())); cancelQuestTimer("Archon Hellisha has despawned", npc, st2.getPlayer()); st2.set("spawned", "0"); DeleteSpawn(st2, npc); @@ -745,201 +636,160 @@ public abstract class AbstractSagaQuest extends Quest } @Override - public String onTalk(L2Npc npc, L2PcInstance player) - { + public String onTalk(L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(player); final QuestState st = getQuestState(player, true); int npcId = npc.getId(); - if ((npcId == _npc[0]) && st.isCompleted()) - { + if ((npcId == _npc[0]) && st.isCompleted()) { htmltext = getAlreadyCompletedMsg(player); } - else if (player.getClassId().getId() == getPrevClass(player)) - { - switch (st.getCond()) - { + else if (player.getClassId().getId() == getPrevClass(player)) { + switch (st.getCond()) { case 0: - if (npcId == _npc[0]) - { + if (npcId == _npc[0]) { htmltext = "0-01.htm"; } break; case 1: - if (npcId == _npc[0]) - { + if (npcId == _npc[0]) { htmltext = "0-04.htm"; } - else if (npcId == _npc[2]) - { + else if (npcId == _npc[2]) { htmltext = "2-01.htm"; } break; case 2: - if (npcId == _npc[2]) - { + if (npcId == _npc[2]) { htmltext = "2-02.htm"; } - else if (npcId == _npc[1]) - { + else if (npcId == _npc[1]) { htmltext = "1-01.htm"; } break; case 3: - if ((npcId == _npc[1]) && hasQuestItems(player, Items[0])) - { - if ((Items[11] == 0) || hasQuestItems(player, Items[11])) - { + if ((npcId == _npc[1]) && hasQuestItems(player, _items[0])) { + if ((_items[11] == 0) || hasQuestItems(player, _items[11])) { htmltext = "1-03.htm"; } - else - { + else { htmltext = "1-02.htm"; } } break; case 4: - if (npcId == _npc[1]) - { + if (npcId == _npc[1]) { htmltext = "1-04.htm"; } - else if (npcId == _npc[2]) - { + else if (npcId == _npc[2]) { htmltext = "2-03.htm"; } break; case 5: - if (npcId == _npc[2]) - { + if (npcId == _npc[2]) { htmltext = "2-04.htm"; } - else if (npcId == _npc[5]) - { + else if (npcId == _npc[5]) { htmltext = "5-01.htm"; } break; case 6: - if (npcId == _npc[5]) - { + if (npcId == _npc[5]) { htmltext = "5-03.htm"; } - else if (npcId == _npc[6]) - { + else if (npcId == _npc[6]) { htmltext = "6-01.htm"; } break; case 7: - if (npcId == _npc[6]) - { + if (npcId == _npc[6]) { htmltext = "6-02.htm"; } break; case 8: - if (npcId == _npc[6]) - { + if (npcId == _npc[6]) { htmltext = "6-04.htm"; } - else if (npcId == _npc[7]) - { + else if (npcId == _npc[7]) { htmltext = "7-01.htm"; } break; case 9: - if (npcId == _npc[7]) - { + if (npcId == _npc[7]) { htmltext = "7-05.htm"; } break; case 10: - if (npcId == _npc[7]) - { + if (npcId == _npc[7]) { htmltext = "7-07.htm"; } - else if (npcId == _npc[3]) - { + else if (npcId == _npc[3]) { htmltext = "3-01.htm"; } break; case 11: case 12: - if (npcId == _npc[3]) - { - if (hasQuestItems(player, Items[2])) - { + if (npcId == _npc[3]) { + if (hasQuestItems(player, _items[2])) { htmltext = "3-05.htm"; } - else - { + else { htmltext = "3-04.htm"; } } break; case 13: - if (npcId == _npc[3]) - { + if (npcId == _npc[3]) { htmltext = "3-06.htm"; } - else if (npcId == _npc[8]) - { + else if (npcId == _npc[8]) { htmltext = "8-01.htm"; } break; case 14: - if (npcId == _npc[8]) - { + if (npcId == _npc[8]) { htmltext = "8-03.htm"; } - else if (npcId == _npc[11]) - { + else if (npcId == _npc[11]) { htmltext = "11-01.htm"; } break; case 15: - if (npcId == _npc[11]) - { + if (npcId == _npc[11]) { htmltext = "11-02.htm"; } - else if (npcId == _npc[9]) - { + else if (npcId == _npc[9]) { htmltext = "9-01.htm"; } break; case 16: - if (npcId == _npc[9]) - { + if (npcId == _npc[9]) { htmltext = "9-02.htm"; } break; case 17: - if (npcId == _npc[9]) - { + if (npcId == _npc[9]) { htmltext = "9-04.htm"; } - else if (npcId == _npc[10]) - { + else if (npcId == _npc[10]) { htmltext = "10-01.htm"; } break; case 18: - if (npcId == _npc[10]) - { + if (npcId == _npc[10]) { htmltext = "10-05.htm"; } break; case 19: - if (npcId == _npc[10]) - { + if (npcId == _npc[10]) { htmltext = "10-07.htm"; } - else if (npcId == _npc[0]) - { + else if (npcId == _npc[0]) { htmltext = "0-06.htm"; } break; case 20: - if (npcId == _npc[0]) - { - if (player.getLevel() >= 76) - { + if (npcId == _npc[0]) { + if (player.getLevel() >= 76) { htmltext = "0-09.htm"; if ((getClassId(player) < 131) || (getClassId(player) > 135)) // in Kamael quests, npc wants to chat for a bit before changing class { @@ -950,16 +800,14 @@ public abstract class AbstractSagaQuest extends Quest int classId = getClassId(player); int prevClass = getPrevClass(player); player.setClassId(classId); - if (!player.isSubClassActive() && (player.getBaseClass() == prevClass)) - { + if (!player.isSubClassActive() && (player.getBaseClass() == prevClass)) { player.setBaseClass(classId); } player.broadcastUserInfo(); cast(npc, player, 4339, 1); } } - else - { + else { htmltext = "0-010.htm"; } } @@ -969,24 +817,21 @@ public abstract class AbstractSagaQuest extends Quest return htmltext; } - public void registerNPCs() - { + public void registerNPCs() { addStartNpc(_npc[0]); - addAttackId(Mob[2], Mob[1]); - addSkillSeeId(Mob[1]); + addAttackId(_mob[2], _mob[1]); + addSkillSeeId(_mob[1]); addFirstTalkId(_npc[4]); addTalkId(_npc); - addKillId(Mob); - final int[] questItemIds = Items.clone(); + addKillId(_mob); + final int[] questItemIds = _items.clone(); questItemIds[0] = 0; questItemIds[2] = 0; // remove Ice Crystal and Divine Stone of Wisdom registerQuestItems(questItemIds); - for (int Archon_Minion = 21646; Archon_Minion < 21652; Archon_Minion++) - { + for (int Archon_Minion = 21646; Archon_Minion < 21652; Archon_Minion++) { addKillId(Archon_Minion); } - int[] Archon_Hellisha_Norm = - { + int[] Archon_Hellisha_Norm = { 18212, 18214, 18215, @@ -994,41 +839,33 @@ public abstract class AbstractSagaQuest extends Quest 18218 }; addKillId(Archon_Hellisha_Norm); - for (int Guardian_Angel = 27214; Guardian_Angel < 27217; Guardian_Angel++) - { + for (int Guardian_Angel = 27214; Guardian_Angel < 27217; Guardian_Angel++) { addKillId(Guardian_Angel); } } - private static void addSpawn(QuestState st, L2Npc mob) - { + private static void addSpawn(QuestState st, L2Npc mob) { SPAWN_LIST.put(mob, st.getPlayer().getObjectId()); } - private static void autoChat(L2Npc npc, String text) - { + private static void autoChat(L2Npc npc, String text) { npc.broadcastPacket(new NpcSay(npc.getObjectId(), 0, npc.getId(), text)); } - private static void cast(L2Npc npc, L2Character target, int skillId, int level) - { + private static void cast(L2Npc npc, L2Character target, int skillId, int level) { target.broadcastPacket(new MagicSkillUse(target, target, skillId, level, 6000, 1)); target.broadcastPacket(new MagicSkillUse(npc, npc, skillId, level, 6000, 1)); } - private static void DeleteSpawn(QuestState st, L2Npc npc) - { - if (SPAWN_LIST.containsKey(npc)) - { + private static void DeleteSpawn(QuestState st, L2Npc npc) { + if (SPAWN_LIST.containsKey(npc)) { SPAWN_LIST.remove(npc); npc.deleteMe(); } } - private static L2Npc FindSpawn(L2PcInstance player, L2Npc npc) - { - if (SPAWN_LIST.containsKey(npc) && (SPAWN_LIST.get(npc) == player.getObjectId())) - { + private static L2Npc FindSpawn(L2PcInstance player, L2Npc npc) { + if (SPAWN_LIST.containsKey(npc) && (SPAWN_LIST.get(npc) == player.getObjectId())) { return npc; } return null; diff --git a/dist/game/data/scripts/quests/Q00067_SagaOfTheDoombringer/Q00067_SagaOfTheDoombringer.java b/dist/game/data/scripts/quests/Q00067_SagaOfTheDoombringer/Q00067_SagaOfTheDoombringer.java index f35dc4388dee705cca7476644178d1b02954ad3d..5c82b546a7d93a21cd941dcdeda3ec27da550e8b 100644 --- a/dist/game/data/scripts/quests/Q00067_SagaOfTheDoombringer/Q00067_SagaOfTheDoombringer.java +++ b/dist/game/data/scripts/quests/Q00067_SagaOfTheDoombringer/Q00067_SagaOfTheDoombringer.java @@ -46,7 +46,7 @@ public final class Q00067_SagaOfTheDoombringer extends AbstractSagaQuest 31656, 32227 }; - Items = new int[] + _items = new int[] { 7080, 9721, @@ -61,27 +61,27 @@ public final class Q00067_SagaOfTheDoombringer extends AbstractSagaQuest 9717, 0 }; - Mob = new int[] + _mob = new int[] { 27324, 27325, 27326 }; - classid = new int[] + _classId = new int[] { 131 }; - prevclass = new int[] + _previousClass = new int[] { 0x7f }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(47429, -56923, -2383), new Location(47391, -56929, -2370) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00068_SagaOfTheSoulHound/Q00068_SagaOfTheSoulHound.java b/dist/game/data/scripts/quests/Q00068_SagaOfTheSoulHound/Q00068_SagaOfTheSoulHound.java index f55425efd0464b6e1fcd25397994dfb9e58970f5..496def20f957bfeade6ca7abcdd4bf6c4df4e1e9 100644 --- a/dist/game/data/scripts/quests/Q00068_SagaOfTheSoulHound/Q00068_SagaOfTheSoulHound.java +++ b/dist/game/data/scripts/quests/Q00068_SagaOfTheSoulHound/Q00068_SagaOfTheSoulHound.java @@ -46,7 +46,7 @@ public class Q00068_SagaOfTheSoulHound extends AbstractSagaQuest 31657, 32241 }; - Items = new int[] + _items = new int[] { 7080, 9802, @@ -61,29 +61,29 @@ public class Q00068_SagaOfTheSoulHound extends AbstractSagaQuest 9719, 0 }; - Mob = new int[] + _mob = new int[] { 27327, 27329, 27328 }; - classid = new int[] + _classId = new int[] { 132, 133 }; - prevclass = new int[] + _previousClass = new int[] { 0x80, 0x81 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(46087, -36372, -1685), new Location(46066, -36396, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00069_SagaOfTheTrickster/Q00069_SagaOfTheTrickster.java b/dist/game/data/scripts/quests/Q00069_SagaOfTheTrickster/Q00069_SagaOfTheTrickster.java index 5722e13533b356756b6376e6e3f31bcb3f35f57e..649e9e35556c46f9aff0f52e69be52e72a1fdcdb 100644 --- a/dist/game/data/scripts/quests/Q00069_SagaOfTheTrickster/Q00069_SagaOfTheTrickster.java +++ b/dist/game/data/scripts/quests/Q00069_SagaOfTheTrickster/Q00069_SagaOfTheTrickster.java @@ -46,7 +46,7 @@ public class Q00069_SagaOfTheTrickster extends AbstractSagaQuest 31659, 31283 }; - Items = new int[] + _items = new int[] { 7080, 9761, @@ -61,27 +61,27 @@ public class Q00069_SagaOfTheTrickster extends AbstractSagaQuest 9718, 0 }; - Mob = new int[] + _mob = new int[] { 27333, 27334, 27335 }; - classid = new int[] + _classId = new int[] { 134 }; - prevclass = new int[] + _previousClass = new int[] { 0x82 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164014, -74733, -3093), new Location(124355, 82155, -2803), new Location(124376, 82127, -2796) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00070_SagaOfThePhoenixKnight/Q00070_SagaOfThePhoenixKnight.java b/dist/game/data/scripts/quests/Q00070_SagaOfThePhoenixKnight/Q00070_SagaOfThePhoenixKnight.java index 0e72c729910380d5862585fa5aab0a33893d165e..40df6512944d1f0f00a3051616689793574ac726 100644 --- a/dist/game/data/scripts/quests/Q00070_SagaOfThePhoenixKnight/Q00070_SagaOfThePhoenixKnight.java +++ b/dist/game/data/scripts/quests/Q00070_SagaOfThePhoenixKnight/Q00070_SagaOfThePhoenixKnight.java @@ -46,7 +46,7 @@ public class Q00070_SagaOfThePhoenixKnight extends AbstractSagaQuest 31657, 31277 }; - Items = new int[] + _items = new int[] { 7080, 7534, @@ -61,27 +61,27 @@ public class Q00070_SagaOfThePhoenixKnight extends AbstractSagaQuest 7093, 6482 }; - Mob = new int[] + _mob = new int[] { 27286, 27219, 27278 }; - classid = new int[] + _classId = new int[] { 90 }; - prevclass = new int[] + _previousClass = new int[] { 0x05 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(46087, -36372, -1685), new Location(46066, -36396, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00071_SagaOfEvasTemplar/Q00071_SagaOfEvasTemplar.java b/dist/game/data/scripts/quests/Q00071_SagaOfEvasTemplar/Q00071_SagaOfEvasTemplar.java index 492d82802fe14b078eeabfb43f8f71d5fe9de78d..19ace86e74b45d2984308ad962276f1ffdfecfe3 100644 --- a/dist/game/data/scripts/quests/Q00071_SagaOfEvasTemplar/Q00071_SagaOfEvasTemplar.java +++ b/dist/game/data/scripts/quests/Q00071_SagaOfEvasTemplar/Q00071_SagaOfEvasTemplar.java @@ -46,7 +46,7 @@ public class Q00071_SagaOfEvasTemplar extends AbstractSagaQuest 31658, 31281 }; - Items = new int[] + _items = new int[] { 7080, 7535, @@ -61,27 +61,27 @@ public class Q00071_SagaOfEvasTemplar extends AbstractSagaQuest 7094, 6482 }; - Mob = new int[] + _mob = new int[] { 27287, 27220, 27279 }; - classid = new int[] + _classId = new int[] { 99 }; - prevclass = new int[] + _previousClass = new int[] { 0x14 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(119518, -28658, -3811), new Location(181215, 36676, -4812), new Location(181227, 36703, -4816) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00072_SagaOfTheSwordMuse/Q00072_SagaOfTheSwordMuse.java b/dist/game/data/scripts/quests/Q00072_SagaOfTheSwordMuse/Q00072_SagaOfTheSwordMuse.java index 881cc9c483bde66573bbc9be9c122f47a99dd394..83d174be64b3fb8d0b177845fbc3faac94eebe53 100644 --- a/dist/game/data/scripts/quests/Q00072_SagaOfTheSwordMuse/Q00072_SagaOfTheSwordMuse.java +++ b/dist/game/data/scripts/quests/Q00072_SagaOfTheSwordMuse/Q00072_SagaOfTheSwordMuse.java @@ -46,7 +46,7 @@ public class Q00072_SagaOfTheSwordMuse extends AbstractSagaQuest 31659, 31281 }; - Items = new int[] + _items = new int[] { 7080, 7536, @@ -61,27 +61,27 @@ public class Q00072_SagaOfTheSwordMuse extends AbstractSagaQuest 7095, 6482 }; - Mob = new int[] + _mob = new int[] { 27288, 27221, 27280 }; - classid = new int[] + _classId = new int[] { 100 }; - prevclass = new int[] + _previousClass = new int[] { 0x15 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124355, 82155, -2803), new Location(124376, 82127, -2796) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00073_SagaOfTheDuelist/Q00073_SagaOfTheDuelist.java b/dist/game/data/scripts/quests/Q00073_SagaOfTheDuelist/Q00073_SagaOfTheDuelist.java index bf7213fcb9b515b431828384cc37efd24c20a1c5..f330392699611fe00c3dfac3a0262ffb0d5cc3a2 100644 --- a/dist/game/data/scripts/quests/Q00073_SagaOfTheDuelist/Q00073_SagaOfTheDuelist.java +++ b/dist/game/data/scripts/quests/Q00073_SagaOfTheDuelist/Q00073_SagaOfTheDuelist.java @@ -55,7 +55,7 @@ public class Q00073_SagaOfTheDuelist extends AbstractSagaQuest 31656, 31277 }; - Items = new int[] + _items = new int[] { 7080, 7537, @@ -70,27 +70,27 @@ public class Q00073_SagaOfTheDuelist extends AbstractSagaQuest 7096, 7546 }; - Mob = new int[] + _mob = new int[] { 27289, 27222, 27281 }; - classid = new int[] + _classId = new int[] { 88 }; - prevclass = new int[] + _previousClass = new int[] { 0x02 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164650, -74121, -2871), new Location(47429, -56923, -2383), new Location(47391, -56929, -2370) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00074_SagaOfTheDreadnought/Q00074_SagaOfTheDreadnought.java b/dist/game/data/scripts/quests/Q00074_SagaOfTheDreadnought/Q00074_SagaOfTheDreadnought.java index fab8c5db4bbd46252192ab260a034a6cfdde5a8e..2df9f9430b3abd7c5d01b092099d43e91c827cec 100644 --- a/dist/game/data/scripts/quests/Q00074_SagaOfTheDreadnought/Q00074_SagaOfTheDreadnought.java +++ b/dist/game/data/scripts/quests/Q00074_SagaOfTheDreadnought/Q00074_SagaOfTheDreadnought.java @@ -46,7 +46,7 @@ public class Q00074_SagaOfTheDreadnought extends AbstractSagaQuest 31657, 31522 }; - Items = new int[] + _items = new int[] { 7080, 7538, @@ -61,27 +61,27 @@ public class Q00074_SagaOfTheDreadnought extends AbstractSagaQuest 7097, 6480 }; - Mob = new int[] + _mob = new int[] { 27290, 27223, 27282 }; - classid = new int[] + _classId = new int[] { 89 }; - prevclass = new int[] + _previousClass = new int[] { 0x03 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(46087, -36372, -1685), new Location(46066, -36396, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00075_SagaOfTheTitan/Q00075_SagaOfTheTitan.java b/dist/game/data/scripts/quests/Q00075_SagaOfTheTitan/Q00075_SagaOfTheTitan.java index 1724d3d5aaf1cc033a72653de668d816f10cfb81..8cbe5f692ccf6b1689a56fe2aed3d81a73424989 100644 --- a/dist/game/data/scripts/quests/Q00075_SagaOfTheTitan/Q00075_SagaOfTheTitan.java +++ b/dist/game/data/scripts/quests/Q00075_SagaOfTheTitan/Q00075_SagaOfTheTitan.java @@ -46,7 +46,7 @@ public class Q00075_SagaOfTheTitan extends AbstractSagaQuest 31658, 31290 }; - Items = new int[] + _items = new int[] { 7080, 7539, @@ -61,27 +61,27 @@ public class Q00075_SagaOfTheTitan extends AbstractSagaQuest 7098, 0 }; - Mob = new int[] + _mob = new int[] { 27292, 27224, 27283 }; - classid = new int[] + _classId = new int[] { 113 }; - prevclass = new int[] + _previousClass = new int[] { 0x2e }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(119518, -28658, -3811), new Location(181215, 36676, -4812), new Location(181227, 36703, -4816) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00076_SagaOfTheGrandKhavatari/Q00076_SagaOfTheGrandKhavatari.java b/dist/game/data/scripts/quests/Q00076_SagaOfTheGrandKhavatari/Q00076_SagaOfTheGrandKhavatari.java index 3d2d8da500f9df8281f8e1d4645051a6ae6e30b7..32eb983eb5f977bd433f7dcb30d1f62501c9ad06 100644 --- a/dist/game/data/scripts/quests/Q00076_SagaOfTheGrandKhavatari/Q00076_SagaOfTheGrandKhavatari.java +++ b/dist/game/data/scripts/quests/Q00076_SagaOfTheGrandKhavatari/Q00076_SagaOfTheGrandKhavatari.java @@ -46,7 +46,7 @@ public class Q00076_SagaOfTheGrandKhavatari extends AbstractSagaQuest 31659, 31290 }; - Items = new int[] + _items = new int[] { 7080, 7539, @@ -61,27 +61,27 @@ public class Q00076_SagaOfTheGrandKhavatari extends AbstractSagaQuest 7099, 0 }; - Mob = new int[] + _mob = new int[] { 27293, 27226, 27284 }; - classid = new int[] + _classId = new int[] { 114 }; - prevclass = new int[] + _previousClass = new int[] { 0x30 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124355, 82155, -2803), new Location(124376, 82127, -2796) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00077_SagaOfTheDominator/Q00077_SagaOfTheDominator.java b/dist/game/data/scripts/quests/Q00077_SagaOfTheDominator/Q00077_SagaOfTheDominator.java index 0a01e2d663f29c792a45faca42f3bdacbd194916..2e81a3553a58299a94ba08f82abe4726dc281091 100644 --- a/dist/game/data/scripts/quests/Q00077_SagaOfTheDominator/Q00077_SagaOfTheDominator.java +++ b/dist/game/data/scripts/quests/Q00077_SagaOfTheDominator/Q00077_SagaOfTheDominator.java @@ -46,7 +46,7 @@ public class Q00077_SagaOfTheDominator extends AbstractSagaQuest 31656, 31290 }; - Items = new int[] + _items = new int[] { 7080, 7539, @@ -61,27 +61,27 @@ public class Q00077_SagaOfTheDominator extends AbstractSagaQuest 7100, 0 }; - Mob = new int[] + _mob = new int[] { 27294, 27226, 27262 }; - classid = new int[] + _classId = new int[] { 115 }; - prevclass = new int[] + _previousClass = new int[] { 0x33 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(162898, -76492, -3096), new Location(47429, -56923, -2383), new Location(47391, -56929, -2370) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00078_SagaOfTheDoomcryer/Q00078_SagaOfTheDoomcryer.java b/dist/game/data/scripts/quests/Q00078_SagaOfTheDoomcryer/Q00078_SagaOfTheDoomcryer.java index 0e7a68f70f0b5826aee884bbce76d0e01287f8d8..fdd6888942b67f99f78c630afdfbe03268f8a333 100644 --- a/dist/game/data/scripts/quests/Q00078_SagaOfTheDoomcryer/Q00078_SagaOfTheDoomcryer.java +++ b/dist/game/data/scripts/quests/Q00078_SagaOfTheDoomcryer/Q00078_SagaOfTheDoomcryer.java @@ -46,7 +46,7 @@ public class Q00078_SagaOfTheDoomcryer extends AbstractSagaQuest 31657, 31290 }; - Items = new int[] + _items = new int[] { 7080, 7539, @@ -61,27 +61,27 @@ public class Q00078_SagaOfTheDoomcryer extends AbstractSagaQuest 7101, 0 }; - Mob = new int[] + _mob = new int[] { 27295, 27227, 27285 }; - classid = new int[] + _classId = new int[] { 116 }; - prevclass = new int[] + _previousClass = new int[] { 0x34 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(46087, -36372, -1685), new Location(46066, -36396, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00079_SagaOfTheAdventurer/Q00079_SagaOfTheAdventurer.java b/dist/game/data/scripts/quests/Q00079_SagaOfTheAdventurer/Q00079_SagaOfTheAdventurer.java index bee659257bcb0db31d28b1940ea2c63defe37783..6250b0171e8ec00c2949355f302fb4e14a9b461f 100644 --- a/dist/game/data/scripts/quests/Q00079_SagaOfTheAdventurer/Q00079_SagaOfTheAdventurer.java +++ b/dist/game/data/scripts/quests/Q00079_SagaOfTheAdventurer/Q00079_SagaOfTheAdventurer.java @@ -46,7 +46,7 @@ public class Q00079_SagaOfTheAdventurer extends AbstractSagaQuest 31658, 31616 }; - Items = new int[] + _items = new int[] { 7080, 7516, @@ -61,27 +61,27 @@ public class Q00079_SagaOfTheAdventurer extends AbstractSagaQuest 7102, 0 }; - Mob = new int[] + _mob = new int[] { 27299, 27228, 27302 }; - classid = new int[] + _classId = new int[] { 93 }; - prevclass = new int[] + _previousClass = new int[] { 0x08 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(119518, -28658, -3811), new Location(181205, 36676, -4816), new Location(181215, 36676, -4812) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00080_SagaOfTheWindRider/Q00080_SagaOfTheWindRider.java b/dist/game/data/scripts/quests/Q00080_SagaOfTheWindRider/Q00080_SagaOfTheWindRider.java index f9be0ebaee7abceae364cdff6e9ed325ab219727..12bb28dfe1c3bac18317578ed387be43c5fb4c12 100644 --- a/dist/game/data/scripts/quests/Q00080_SagaOfTheWindRider/Q00080_SagaOfTheWindRider.java +++ b/dist/game/data/scripts/quests/Q00080_SagaOfTheWindRider/Q00080_SagaOfTheWindRider.java @@ -46,7 +46,7 @@ public class Q00080_SagaOfTheWindRider extends AbstractSagaQuest 31659, 31616 }; - Items = new int[] + _items = new int[] { 7080, 7517, @@ -61,27 +61,27 @@ public class Q00080_SagaOfTheWindRider extends AbstractSagaQuest 7103, 0 }; - Mob = new int[] + _mob = new int[] { 27300, 27229, 27303 }; - classid = new int[] + _classId = new int[] { 101 }; - prevclass = new int[] + _previousClass = new int[] { 0x17 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124314, 82155, -2803), new Location(124355, 82155, -2803) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00081_SagaOfTheGhostHunter/Q00081_SagaOfTheGhostHunter.java b/dist/game/data/scripts/quests/Q00081_SagaOfTheGhostHunter/Q00081_SagaOfTheGhostHunter.java index 9b43a05b72585c17f7c465f0762183163dee7d61..454e792caa04aeaa0a714930dbb996aa7922685a 100644 --- a/dist/game/data/scripts/quests/Q00081_SagaOfTheGhostHunter/Q00081_SagaOfTheGhostHunter.java +++ b/dist/game/data/scripts/quests/Q00081_SagaOfTheGhostHunter/Q00081_SagaOfTheGhostHunter.java @@ -46,7 +46,7 @@ public class Q00081_SagaOfTheGhostHunter extends AbstractSagaQuest 31656, 31616 }; - Items = new int[] + _items = new int[] { 7080, 7518, @@ -61,27 +61,27 @@ public class Q00081_SagaOfTheGhostHunter extends AbstractSagaQuest 7104, 0 }; - Mob = new int[] + _mob = new int[] { 27301, 27230, 27304 }; - classid = new int[] + _classId = new int[] { 108 }; - prevclass = new int[] + _previousClass = new int[] { 0x24 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164650, -74121, -2871), new Location(47391, -56929, -2370), new Location(47429, -56923, -2383) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00082_SagaOfTheSagittarius/Q00082_SagaOfTheSagittarius.java b/dist/game/data/scripts/quests/Q00082_SagaOfTheSagittarius/Q00082_SagaOfTheSagittarius.java index 4615643f3f0fab2ccfd1720cc1b1f9f68d1289e9..4b03c13fd58f41c795b88f069c1f047b43691f8c 100644 --- a/dist/game/data/scripts/quests/Q00082_SagaOfTheSagittarius/Q00082_SagaOfTheSagittarius.java +++ b/dist/game/data/scripts/quests/Q00082_SagaOfTheSagittarius/Q00082_SagaOfTheSagittarius.java @@ -46,7 +46,7 @@ public class Q00082_SagaOfTheSagittarius extends AbstractSagaQuest 31657, 31641 }; - Items = new int[] + _items = new int[] { 7080, 7519, @@ -61,27 +61,27 @@ public class Q00082_SagaOfTheSagittarius extends AbstractSagaQuest 7105, 0 }; - Mob = new int[] + _mob = new int[] { 27296, 27231, 27305 }; - classid = new int[] + _classId = new int[] { 92 }; - prevclass = new int[] + _previousClass = new int[] { 0x09 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(46066, -36396, -1685), new Location(46066, -36396, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00083_SagaOfTheMoonlightSentinel/Q00083_SagaOfTheMoonlightSentinel.java b/dist/game/data/scripts/quests/Q00083_SagaOfTheMoonlightSentinel/Q00083_SagaOfTheMoonlightSentinel.java index 986670594ad39e2cb44db6e0272ffd593621a704..feb5d4462486900d826013b4c659fc459c673175 100644 --- a/dist/game/data/scripts/quests/Q00083_SagaOfTheMoonlightSentinel/Q00083_SagaOfTheMoonlightSentinel.java +++ b/dist/game/data/scripts/quests/Q00083_SagaOfTheMoonlightSentinel/Q00083_SagaOfTheMoonlightSentinel.java @@ -46,7 +46,7 @@ public class Q00083_SagaOfTheMoonlightSentinel extends AbstractSagaQuest 31658, 31641 }; - Items = new int[] + _items = new int[] { 7080, 7520, @@ -61,27 +61,27 @@ public class Q00083_SagaOfTheMoonlightSentinel extends AbstractSagaQuest 7106, 0 }; - Mob = new int[] + _mob = new int[] { 27297, 27232, 27306 }; - classid = new int[] + _classId = new int[] { 102 }; - prevclass = new int[] + _previousClass = new int[] { 0x18 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(181227, 36703, -4816), new Location(181215, 36676, -4812) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00084_SagaOfTheGhostSentinel/Q00084_SagaOfTheGhostSentinel.java b/dist/game/data/scripts/quests/Q00084_SagaOfTheGhostSentinel/Q00084_SagaOfTheGhostSentinel.java index db7f9db0b2d15230d1b8195dbb9fa13073b54b3d..77b3524dac51a4711444dbd54ea9ada0612ca226 100644 --- a/dist/game/data/scripts/quests/Q00084_SagaOfTheGhostSentinel/Q00084_SagaOfTheGhostSentinel.java +++ b/dist/game/data/scripts/quests/Q00084_SagaOfTheGhostSentinel/Q00084_SagaOfTheGhostSentinel.java @@ -46,7 +46,7 @@ public class Q00084_SagaOfTheGhostSentinel extends AbstractSagaQuest 31659, 31641 }; - Items = new int[] + _items = new int[] { 7080, 7521, @@ -61,27 +61,27 @@ public class Q00084_SagaOfTheGhostSentinel extends AbstractSagaQuest 7107, 0 }; - Mob = new int[] + _mob = new int[] { 27298, 27233, 27307 }; - classid = new int[] + _classId = new int[] { 109 }; - prevclass = new int[] + _previousClass = new int[] { 0x25 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124376, 82127, -2796), new Location(124376, 82127, -2796) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00085_SagaOfTheCardinal/Q00085_SagaOfTheCardinal.java b/dist/game/data/scripts/quests/Q00085_SagaOfTheCardinal/Q00085_SagaOfTheCardinal.java index cb51c88a3f34ace235de1508a6fc1d921bc0b5c1..1d7fe06b99f355013531463a10b411c96dfb8ecf 100644 --- a/dist/game/data/scripts/quests/Q00085_SagaOfTheCardinal/Q00085_SagaOfTheCardinal.java +++ b/dist/game/data/scripts/quests/Q00085_SagaOfTheCardinal/Q00085_SagaOfTheCardinal.java @@ -46,7 +46,7 @@ public class Q00085_SagaOfTheCardinal extends AbstractSagaQuest 31658, 31280 }; - Items = new int[] + _items = new int[] { 7080, 7522, @@ -61,27 +61,27 @@ public class Q00085_SagaOfTheCardinal extends AbstractSagaQuest 7087, 0 }; - Mob = new int[] + _mob = new int[] { 27267, 27234, 27274 }; - classid = new int[] + _classId = new int[] { 97 }; - prevclass = new int[] + _previousClass = new int[] { 0x10 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(119518, -28658, -3811), new Location(181215, 36676, -4812), new Location(181227, 36703, -4816) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00086_SagaOfTheHierophant/Q00086_SagaOfTheHierophant.java b/dist/game/data/scripts/quests/Q00086_SagaOfTheHierophant/Q00086_SagaOfTheHierophant.java index 466fdbfc7af02fa0b640fe26d352b5207a34b181..72c658939dea0abab91a1b8d5f83686a56a83fb8 100644 --- a/dist/game/data/scripts/quests/Q00086_SagaOfTheHierophant/Q00086_SagaOfTheHierophant.java +++ b/dist/game/data/scripts/quests/Q00086_SagaOfTheHierophant/Q00086_SagaOfTheHierophant.java @@ -46,7 +46,7 @@ public class Q00086_SagaOfTheHierophant extends AbstractSagaQuest 31659, 31280 }; - Items = new int[] + _items = new int[] { 7080, 7523, @@ -61,27 +61,27 @@ public class Q00086_SagaOfTheHierophant extends AbstractSagaQuest 7089, 0 }; - Mob = new int[] + _mob = new int[] { 27269, 27235, 27275 }; - classid = new int[] + _classId = new int[] { 98 }; - prevclass = new int[] + _previousClass = new int[] { 0x11 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124355, 82155, -2803), new Location(124376, 82127, -2796) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00087_SagaOfEvasSaint/Q00087_SagaOfEvasSaint.java b/dist/game/data/scripts/quests/Q00087_SagaOfEvasSaint/Q00087_SagaOfEvasSaint.java index 4808b5aba54898df7a8e013e0c2b1bf594bab513..2f9a5e4959a9cd493ac9ff4075deaf966ce91b6e 100644 --- a/dist/game/data/scripts/quests/Q00087_SagaOfEvasSaint/Q00087_SagaOfEvasSaint.java +++ b/dist/game/data/scripts/quests/Q00087_SagaOfEvasSaint/Q00087_SagaOfEvasSaint.java @@ -46,7 +46,7 @@ public class Q00087_SagaOfEvasSaint extends AbstractSagaQuest 31657, 31280 }; - Items = new int[] + _items = new int[] { 7080, 7524, @@ -61,27 +61,27 @@ public class Q00087_SagaOfEvasSaint extends AbstractSagaQuest 7088, 0 }; - Mob = new int[] + _mob = new int[] { 27266, 27236, 27276 }; - classid = new int[] + _classId = new int[] { 105 }; - prevclass = new int[] + _previousClass = new int[] { 0x1e }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164650, -74121, -2871), new Location(46087, -36372, -1685), new Location(46066, -36396, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00088_SagaOfTheArchmage/Q00088_SagaOfTheArchmage.java b/dist/game/data/scripts/quests/Q00088_SagaOfTheArchmage/Q00088_SagaOfTheArchmage.java index a150b792a9d06df47dbed441b70e26f37654a53a..153b6e303a513906311c8abdd962ee46bd74bfa4 100644 --- a/dist/game/data/scripts/quests/Q00088_SagaOfTheArchmage/Q00088_SagaOfTheArchmage.java +++ b/dist/game/data/scripts/quests/Q00088_SagaOfTheArchmage/Q00088_SagaOfTheArchmage.java @@ -46,7 +46,7 @@ public class Q00088_SagaOfTheArchmage extends AbstractSagaQuest 31657, 31282 }; - Items = new int[] + _items = new int[] { 7080, 7529, @@ -61,27 +61,27 @@ public class Q00088_SagaOfTheArchmage extends AbstractSagaQuest 7082, 0 }; - Mob = new int[] + _mob = new int[] { 27250, 27237, 27254 }; - classid = new int[] + _classId = new int[] { 94 }; - prevclass = new int[] + _previousClass = new int[] { 0x0c }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(46066, -36396, -1685), new Location(46087, -36372, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00089_SagaOfTheMysticMuse/Q00089_SagaOfTheMysticMuse.java b/dist/game/data/scripts/quests/Q00089_SagaOfTheMysticMuse/Q00089_SagaOfTheMysticMuse.java index f73a22f92cb30492d6f987b166477ad73c8ca559..1e849a38c45d7ffea3809ff05e8eac596f25e958 100644 --- a/dist/game/data/scripts/quests/Q00089_SagaOfTheMysticMuse/Q00089_SagaOfTheMysticMuse.java +++ b/dist/game/data/scripts/quests/Q00089_SagaOfTheMysticMuse/Q00089_SagaOfTheMysticMuse.java @@ -46,7 +46,7 @@ public class Q00089_SagaOfTheMysticMuse extends AbstractSagaQuest 31658, 31283 }; - Items = new int[] + _items = new int[] { 7080, 7530, @@ -61,27 +61,27 @@ public class Q00089_SagaOfTheMysticMuse extends AbstractSagaQuest 7083, 0 }; - Mob = new int[] + _mob = new int[] { 27251, 27238, 27255 }; - classid = new int[] + _classId = new int[] { 103 }; - prevclass = new int[] + _previousClass = new int[] { 0x1b }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(119518, -28658, -3811), new Location(181227, 36703, -4816), new Location(181215, 36676, -4812) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00090_SagaOfTheStormScreamer/Q00090_SagaOfTheStormScreamer.java b/dist/game/data/scripts/quests/Q00090_SagaOfTheStormScreamer/Q00090_SagaOfTheStormScreamer.java index 188b40ea68117ba931fb61a50091b5e6b90ac834..e7ca403e7395545535a739c1d351bdce17acfe61 100644 --- a/dist/game/data/scripts/quests/Q00090_SagaOfTheStormScreamer/Q00090_SagaOfTheStormScreamer.java +++ b/dist/game/data/scripts/quests/Q00090_SagaOfTheStormScreamer/Q00090_SagaOfTheStormScreamer.java @@ -46,7 +46,7 @@ public class Q00090_SagaOfTheStormScreamer extends AbstractSagaQuest 31659, 31287 }; - Items = new int[] + _items = new int[] { 7080, 7531, @@ -61,27 +61,27 @@ public class Q00090_SagaOfTheStormScreamer extends AbstractSagaQuest 7084, 0 }; - Mob = new int[] + _mob = new int[] { 27252, 27239, 27256 }; - classid = new int[] + _classId = new int[] { 110 }; - prevclass = new int[] + _previousClass = new int[] { 0x28 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124376, 82127, -2796), new Location(124355, 82155, -2803) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00091_SagaOfTheArcanaLord/Q00091_SagaOfTheArcanaLord.java b/dist/game/data/scripts/quests/Q00091_SagaOfTheArcanaLord/Q00091_SagaOfTheArcanaLord.java index 53a569f62a93333aa7567589c54f855a30915702..9f85f497c0d33a5f0a1c82fcbe43527d9593a359 100644 --- a/dist/game/data/scripts/quests/Q00091_SagaOfTheArcanaLord/Q00091_SagaOfTheArcanaLord.java +++ b/dist/game/data/scripts/quests/Q00091_SagaOfTheArcanaLord/Q00091_SagaOfTheArcanaLord.java @@ -46,7 +46,7 @@ public class Q00091_SagaOfTheArcanaLord extends AbstractSagaQuest 31658, 31608 }; - Items = new int[] + _items = new int[] { 7080, 7604, @@ -61,27 +61,27 @@ public class Q00091_SagaOfTheArcanaLord extends AbstractSagaQuest 7110, 0 }; - Mob = new int[] + _mob = new int[] { 27313, 27240, 27310 }; - classid = new int[] + _classId = new int[] { 96 }; - prevclass = new int[] + _previousClass = new int[] { 0x0e }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(119518, -28658, -3811), new Location(181215, 36676, -4812), new Location(181227, 36703, -4816) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00092_SagaOfTheElementalMaster/Q00092_SagaOfTheElementalMaster.java b/dist/game/data/scripts/quests/Q00092_SagaOfTheElementalMaster/Q00092_SagaOfTheElementalMaster.java index b9cfbd15c0118a80fd2540221b58e7e190b8667d..1708f0023c28c2dfda3351b00af48b75c31be472 100644 --- a/dist/game/data/scripts/quests/Q00092_SagaOfTheElementalMaster/Q00092_SagaOfTheElementalMaster.java +++ b/dist/game/data/scripts/quests/Q00092_SagaOfTheElementalMaster/Q00092_SagaOfTheElementalMaster.java @@ -46,7 +46,7 @@ public class Q00092_SagaOfTheElementalMaster extends AbstractSagaQuest 31659, 31614 }; - Items = new int[] + _items = new int[] { 7080, 7605, @@ -61,27 +61,27 @@ public class Q00092_SagaOfTheElementalMaster extends AbstractSagaQuest 7111, 0 }; - Mob = new int[] + _mob = new int[] { 27314, 27241, 27311 }; - classid = new int[] + _classId = new int[] { 104 }; - prevclass = new int[] + _previousClass = new int[] { 0x1c }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124376, 82127, -2796), new Location(124355, 82155, -2803) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00093_SagaOfTheSpectralMaster/Q00093_SagaOfTheSpectralMaster.java b/dist/game/data/scripts/quests/Q00093_SagaOfTheSpectralMaster/Q00093_SagaOfTheSpectralMaster.java index 8dcaa44da3e78f50812b78ee0e56bcac08a2fc3a..a88d209b16c509b8e503b5984e38a63463d3f02d 100644 --- a/dist/game/data/scripts/quests/Q00093_SagaOfTheSpectralMaster/Q00093_SagaOfTheSpectralMaster.java +++ b/dist/game/data/scripts/quests/Q00093_SagaOfTheSpectralMaster/Q00093_SagaOfTheSpectralMaster.java @@ -46,7 +46,7 @@ public class Q00093_SagaOfTheSpectralMaster extends AbstractSagaQuest 31656, 31613 }; - Items = new int[] + _items = new int[] { 7080, 7606, @@ -61,27 +61,27 @@ public class Q00093_SagaOfTheSpectralMaster extends AbstractSagaQuest 7112, 0 }; - Mob = new int[] + _mob = new int[] { 27315, 27242, 27312 }; - classid = new int[] + _classId = new int[] { 111 }; - prevclass = new int[] + _previousClass = new int[] { 0x29 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164650, -74121, -2871), new Location(47429, -56923, -2383), new Location(47391, -56929, -2370) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00094_SagaOfTheSoultaker/Q00094_SagaOfTheSoultaker.java b/dist/game/data/scripts/quests/Q00094_SagaOfTheSoultaker/Q00094_SagaOfTheSoultaker.java index b54d1df6c4327ddf9600f94b67bf1c8869e2b465..23629baa8737cf99037feeff651ae230df0202dc 100644 --- a/dist/game/data/scripts/quests/Q00094_SagaOfTheSoultaker/Q00094_SagaOfTheSoultaker.java +++ b/dist/game/data/scripts/quests/Q00094_SagaOfTheSoultaker/Q00094_SagaOfTheSoultaker.java @@ -46,7 +46,7 @@ public class Q00094_SagaOfTheSoultaker extends AbstractSagaQuest 31657, 31279 }; - Items = new int[] + _items = new int[] { 7080, 7533, @@ -61,27 +61,27 @@ public class Q00094_SagaOfTheSoultaker extends AbstractSagaQuest 7085, 0 }; - Mob = new int[] + _mob = new int[] { 27257, 27243, 27265 }; - classid = new int[] + _classId = new int[] { 95 }; - prevclass = new int[] + _previousClass = new int[] { 0x0d }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(46066, -36396, -1685), new Location(46087, -36372, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00095_SagaOfTheHellKnight/Q00095_SagaOfTheHellKnight.java b/dist/game/data/scripts/quests/Q00095_SagaOfTheHellKnight/Q00095_SagaOfTheHellKnight.java index 898c671ae5deb53c736f2d71021166171751ab65..313375b0518d2089d6dddf0c1a7c79b1b6873e1b 100644 --- a/dist/game/data/scripts/quests/Q00095_SagaOfTheHellKnight/Q00095_SagaOfTheHellKnight.java +++ b/dist/game/data/scripts/quests/Q00095_SagaOfTheHellKnight/Q00095_SagaOfTheHellKnight.java @@ -46,7 +46,7 @@ public class Q00095_SagaOfTheHellKnight extends AbstractSagaQuest 31656, 31297 }; - Items = new int[] + _items = new int[] { 7080, 7532, @@ -61,27 +61,27 @@ public class Q00095_SagaOfTheHellKnight extends AbstractSagaQuest 7086, 0 }; - Mob = new int[] + _mob = new int[] { 27258, 27244, 27263 }; - classid = new int[] + _classId = new int[] { 91 }; - prevclass = new int[] + _previousClass = new int[] { 0x06 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164650, -74121, -2871), new Location(47391, -56929, -2370), new Location(47429, -56923, -2383) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00096_SagaOfTheSpectralDancer/Q00096_SagaOfTheSpectralDancer.java b/dist/game/data/scripts/quests/Q00096_SagaOfTheSpectralDancer/Q00096_SagaOfTheSpectralDancer.java index 994d4dd00021346d31a479c055d2392ec352cb18..329deb88e89151da17c7628a8076a45fe0dc37a5 100644 --- a/dist/game/data/scripts/quests/Q00096_SagaOfTheSpectralDancer/Q00096_SagaOfTheSpectralDancer.java +++ b/dist/game/data/scripts/quests/Q00096_SagaOfTheSpectralDancer/Q00096_SagaOfTheSpectralDancer.java @@ -46,7 +46,7 @@ public class Q00096_SagaOfTheSpectralDancer extends AbstractSagaQuest 31656, 31284 }; - Items = new int[] + _items = new int[] { 7080, 7527, @@ -61,27 +61,27 @@ public class Q00096_SagaOfTheSpectralDancer extends AbstractSagaQuest 7092, 0 }; - Mob = new int[] + _mob = new int[] { 27272, 27245, 27264 }; - classid = new int[] + _classId = new int[] { 107 }; - prevclass = new int[] + _previousClass = new int[] { 0x22 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164650, -74121, -2871), new Location(47429, -56923, -2383), new Location(47391, -56929, -2370) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00097_SagaOfTheShillienTemplar/Q00097_SagaOfTheShillienTemplar.java b/dist/game/data/scripts/quests/Q00097_SagaOfTheShillienTemplar/Q00097_SagaOfTheShillienTemplar.java index 2e0005c0a73e64e5f81c7cbd132be6d14ab3ac09..81b48a942d28bfcb8c66c6f16d13862d57d9bd63 100644 --- a/dist/game/data/scripts/quests/Q00097_SagaOfTheShillienTemplar/Q00097_SagaOfTheShillienTemplar.java +++ b/dist/game/data/scripts/quests/Q00097_SagaOfTheShillienTemplar/Q00097_SagaOfTheShillienTemplar.java @@ -46,7 +46,7 @@ public class Q00097_SagaOfTheShillienTemplar extends AbstractSagaQuest 31659, 31285 }; - Items = new int[] + _items = new int[] { 7080, 7526, @@ -61,27 +61,27 @@ public class Q00097_SagaOfTheShillienTemplar extends AbstractSagaQuest 7091, 0 }; - Mob = new int[] + _mob = new int[] { 27271, 27246, 27273 }; - classid = new int[] + _classId = new int[] { 106 }; - prevclass = new int[] + _previousClass = new int[] { 0x21 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(161719, -92823, -1893), new Location(124355, 82155, -2803), new Location(124376, 82127, -2796) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00098_SagaOfTheShillienSaint/Q00098_SagaOfTheShillienSaint.java b/dist/game/data/scripts/quests/Q00098_SagaOfTheShillienSaint/Q00098_SagaOfTheShillienSaint.java index f3fd58fe72a2134212b9d137e92494e0dd4a4bd5..e7ac3e08fa51acee82b7c747ed915ea25ff71e5c 100644 --- a/dist/game/data/scripts/quests/Q00098_SagaOfTheShillienSaint/Q00098_SagaOfTheShillienSaint.java +++ b/dist/game/data/scripts/quests/Q00098_SagaOfTheShillienSaint/Q00098_SagaOfTheShillienSaint.java @@ -46,7 +46,7 @@ public class Q00098_SagaOfTheShillienSaint extends AbstractSagaQuest 31658, 31287 }; - Items = new int[] + _items = new int[] { 7080, 7525, @@ -61,27 +61,27 @@ public class Q00098_SagaOfTheShillienSaint extends AbstractSagaQuest 7090, 0 }; - Mob = new int[] + _mob = new int[] { 27270, 27247, 27277 }; - classid = new int[] + _classId = new int[] { 112 }; - prevclass = new int[] + _previousClass = new int[] { 0x2b }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(119518, -28658, -3811), new Location(181215, 36676, -4812), new Location(181227, 36703, -4816) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00099_SagaOfTheFortuneSeeker/Q00099_SagaOfTheFortuneSeeker.java b/dist/game/data/scripts/quests/Q00099_SagaOfTheFortuneSeeker/Q00099_SagaOfTheFortuneSeeker.java index fa30d6fbd26a6d510e5ca5323605e0d1cb1c82e5..4e4f3dcf14f9792b9791712d74f9f3c7f7dfbc29 100644 --- a/dist/game/data/scripts/quests/Q00099_SagaOfTheFortuneSeeker/Q00099_SagaOfTheFortuneSeeker.java +++ b/dist/game/data/scripts/quests/Q00099_SagaOfTheFortuneSeeker/Q00099_SagaOfTheFortuneSeeker.java @@ -46,7 +46,7 @@ public class Q00099_SagaOfTheFortuneSeeker extends AbstractSagaQuest 31657, 31600 }; - Items = new int[] + _items = new int[] { 7080, 7608, @@ -61,27 +61,27 @@ public class Q00099_SagaOfTheFortuneSeeker extends AbstractSagaQuest 7109, 0 }; - Mob = new int[] + _mob = new int[] { 27259, 27248, 27309 }; - classid = new int[] + _classId = new int[] { 117 }; - prevclass = new int[] + _previousClass = new int[] { 0x37 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(191046, -40640, -3042), new Location(46066, -36396, -1685), new Location(46087, -36372, -1685) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00100_SagaOfTheMaestro/Q00100_SagaOfTheMaestro.java b/dist/game/data/scripts/quests/Q00100_SagaOfTheMaestro/Q00100_SagaOfTheMaestro.java index 237c37dddc0d75ea4a5ffc9142f4933c97427cb9..74fa3ee62a4099915ec5eab45253404f1e719d2e 100644 --- a/dist/game/data/scripts/quests/Q00100_SagaOfTheMaestro/Q00100_SagaOfTheMaestro.java +++ b/dist/game/data/scripts/quests/Q00100_SagaOfTheMaestro/Q00100_SagaOfTheMaestro.java @@ -46,7 +46,7 @@ public class Q00100_SagaOfTheMaestro extends AbstractSagaQuest 31656, 31597 }; - Items = new int[] + _items = new int[] { 7080, 7607, @@ -61,27 +61,27 @@ public class Q00100_SagaOfTheMaestro extends AbstractSagaQuest 7108, 0 }; - Mob = new int[] + _mob = new int[] { 27260, 27249, 27308 }; - classid = new int[] + _classId = new int[] { 118 }; - prevclass = new int[] + _previousClass = new int[] { 0x39 }; - npcSpawnLocations = new Location[] + _npcSpawnLocations = new Location[] { new Location(164650, -74121, -2871), new Location(47429, -56923, -2383), new Location(47391, -56929, -2370) }; - Text = new String[] + _text = new String[] { "PLAYERNAME! Pursued to here! However, I jumped out of the Banshouren boundaries! You look at the giant as the sign of power!", "... Oh ... good! So it was ... let's begin!", diff --git a/dist/game/data/scripts/quests/Q00373_SupplierOfReagents/Q00373_SupplierOfReagents.java b/dist/game/data/scripts/quests/Q00373_SupplierOfReagents/Q00373_SupplierOfReagents.java index e7867e7371d30f55e57080045d28e97101de5b2c..32ed2bf878d7ecc0ee393112108372498d52f1e5 100644 --- a/dist/game/data/scripts/quests/Q00373_SupplierOfReagents/Q00373_SupplierOfReagents.java +++ b/dist/game/data/scripts/quests/Q00373_SupplierOfReagents/Q00373_SupplierOfReagents.java @@ -33,8 +33,7 @@ import quests.Q00235_MimirsElixir.Q00235_MimirsElixir; * Supplier of Reagents (373) * @author Joxit */ -public final class Q00373_SupplierOfReagents extends Quest -{ +public final class Q00373_SupplierOfReagents extends Quest { // NPCs private static final int WESLEY = 30166; private static final int ALCHEMIST_MIXING_URN = 31149; @@ -84,8 +83,7 @@ public final class Q00373_SupplierOfReagents extends Quest private static final HashMap<Integer, ItemHolder> MEMO_STATE_TO_ITEM = new HashMap<>(20); private static final HashMap<Integer, Entry> MEMO_STATE_TO_REWARD = new HashMap<>(15); - static - { + static { // List of ingredients to mix HTML_TO_MEMO_STATE.put("31149-03.html", 11); HTML_TO_MEMO_STATE.put("31149-04.html", 12); @@ -148,8 +146,7 @@ public final class Q00373_SupplierOfReagents extends Quest MEMO_STATE_TO_REWARD.put(1324, new Entry(PURE_SILVER, "31149-46.html")); } - public Q00373_SupplierOfReagents() - { + public Q00373_SupplierOfReagents() { super(373, Q00373_SupplierOfReagents.class.getSimpleName(), "Supplier of Reagents"); addStartNpc(WESLEY); addKillId(HALLATE_GUARDIAN, HALLATE_MAID, HAMES_ORC_SHAMAN, LAVA_WYRM, CRENDION, PLATINUM_GUARDIAN_SHAMAN, PLATINUM_TRIBE_SHAMAN); @@ -158,31 +155,25 @@ public final class Q00373_SupplierOfReagents extends Quest } @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, false); String htmltext = null; - if (qs == null) - { + if (qs == null) { return htmltext; } - switch (event) - { + switch (event) { case "30166-03.htm": case "30166-06.html": case "30166-04a.html": case "30166-04b.html": case "30166-04c.html": case "30166-04d.html": - case "31149-18.html": - { + case "31149-18.html": { htmltext = event; break; } - case "30166-04.html": - { - if ((player.getLevel() >= MIN_LVL) && qs.isCreated()) - { + case "30166-04.html": { + if ((player.getLevel() >= MIN_LVL) && qs.isCreated()) { giveItems(player, WESLEYS_MIXING_STONE, 1); giveItems(player, MIXING_MANUAL, 1); qs.startQuest(); @@ -190,14 +181,12 @@ public final class Q00373_SupplierOfReagents extends Quest } break; } - case "30166-07.html": - { + case "30166-07.html": { qs.exitQuest(true, true); htmltext = event; break; } - case "31149-02.html": - { + case "31149-02.html": { qs.setMemoState(0); qs.setMemoStateEx(1, 0); htmltext = event; @@ -222,93 +211,74 @@ public final class Q00373_SupplierOfReagents extends Quest case "31149-21.html": case "31149-22.html": case "31149-23.html": - case "31149-24.html": - { + case "31149-24.html": { final int memoState = HTML_TO_MEMO_STATE.get(event); - if (hasItem(player, MEMO_STATE_TO_ITEM.get(memoState))) - { + if (hasItem(player, MEMO_STATE_TO_ITEM.get(memoState))) { // If the player has the chosen item (ingredient or catalyst), we save it (for the catalyst or the reward) qs.setMemoState(qs.getMemoState() + memoState); htmltext = event; playSound(player, Sound.SKILLSOUND_LIQUID_MIX); } - else - { + else { // If the player has not the chosen catalyst, we take the ingredient previously saved (if not null) takeItem(player, MEMO_STATE_TO_ITEM.get(qs.getMemoState())); - if (event.equals("31149-19.html")) - { + if (event.equals("31149-19.html")) { htmltext = "31149-25.html"; } - else - { + else { htmltext = "31149-17.html"; } } break; } - case "31149-26.html": - { - if (qs.isMemoState(1324)) - { + case "31149-26.html": { + if (qs.isMemoState(1324)) { htmltext = "31149-26a.html"; } - else - { + else { htmltext = event; } break; } - case "31149-27.html": - { + case "31149-27.html": { qs.setMemoStateEx(1, 1); // Temperature Salamander htmltext = event; break; } - case "31149-28a.html": - { - if (getRandom(100) < 33) - { + case "31149-28a.html": { + if (getRandom(100) < 33) { qs.setMemoStateEx(1, 3); // Temperature Ifrit } - else - { + else { qs.setMemoStateEx(1, 0); } htmltext = event; break; } - case "31149-29a.html": - { - if (getRandom(100) < 20) - { + case "31149-29a.html": { + if (getRandom(100) < 20) { qs.setMemoStateEx(1, 5); // Temperature Phoenix } - else - { + else { qs.setMemoStateEx(1, 0); } htmltext = event; break; } - case "mixitems": - { + case "mixitems": { final int memoState = qs.getMemoState(); final ItemHolder item1 = MEMO_STATE_TO_ITEM.get(memoState % 100); final ItemHolder item2 = MEMO_STATE_TO_ITEM.get((memoState / 100) * 100); final Entry reward = MEMO_STATE_TO_REWARD.get(memoState); final QuestState q235 = player.getQuestState(Q00235_MimirsElixir.class.getSimpleName()); - if ((reward == null) || qs.isMemoStateEx(1, 0)) - { + if ((reward == null) || qs.isMemoStateEx(1, 0)) { takeItem(player, item1); takeItem(player, item2); htmltext = (reward == null) ? "31149-44.html" : "31149-45.html"; playSound(player, Sound.SKILLSOUND_LIQUID_FAIL); } - else if ((memoState != 1324) || ((memoState == 1324) && (q235 != null) && q235.isStarted() && !hasQuestItems(player, reward.getItem()))) - { - if ((item1 != null) && (item2 != null) && hasItem(player, item1) && hasItem(player, item2)) - { + else if ((memoState != 1324) || ((memoState == 1324) && (q235 != null) && q235.isStarted() && !hasQuestItems(player, reward.getItem()))) { + if ((item1 != null) && (item2 != null) && hasItem(player, item1) && hasItem(player, item2)) { takeItem(player, item1); takeItem(player, item2); giveItems(player, reward.getItem(), (memoState == 1324) ? 1 : qs.getMemoStateEx(1)); @@ -317,14 +287,12 @@ public final class Q00373_SupplierOfReagents extends Quest htmltext = reward.getHtml(); playSound(player, Sound.SKILLSOUND_LIQUID_SUCCESS); } - else - { + else { htmltext = "31149-44.html"; playSound(player, Sound.SKILLSOUND_LIQUID_FAIL); } } - else - { + else { htmltext = "31149-44.html"; } break; @@ -334,88 +302,66 @@ public final class Q00373_SupplierOfReagents extends Quest } @Override - public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) - { + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { final QuestState qs = getRandomPartyMemberState(killer, -1, 3, npc); - if (qs != null) - { - switch (npc.getId()) - { - case HALLATE_GUARDIAN: - { + if (qs != null) { + switch (npc.getId()) { + case HALLATE_GUARDIAN: { final int chance = getRandom(1000); - if (chance < 766) - { + if (chance < 766) { giveItemRandomly(qs.getPlayer(), npc, DEMONS_BLOOD, 3, 0, 1, true); } - else if (chance < 876) - { + else if (chance < 876) { giveItemRandomly(qs.getPlayer(), npc, MOONSTONE_SHARD, 1, 0, 1, true); } break; } - case HALLATE_MAID: - { + case HALLATE_MAID: { final int chance = getRandom(100); - if (chance < 45) - { + if (chance < 45) { giveItemRandomly(qs.getPlayer(), npc, REAGENT_POUNCH1, 1, 0, 1, true); } - else if (chance < 65) - { + else if (chance < 65) { giveItemRandomly(qs.getPlayer(), npc, VOLCANIC_ASH, 1, 0, 1, true); } break; } - case HAMES_ORC_SHAMAN: - { - if (getRandom(1000) < 616) - { + case HAMES_ORC_SHAMAN: { + if (getRandom(1000) < 616) { giveItemRandomly(qs.getPlayer(), npc, REAGENT_POUNCH3, 1, 0, 1, true); } break; } - case LAVA_WYRM: - { + case LAVA_WYRM: { final int chance = getRandom(1000); - if (chance < 666) - { + if (chance < 666) { giveItemRandomly(qs.getPlayer(), npc, WYRM_BLOOD, 1, 0, 1, true); } - else if (chance < 989) - { + else if (chance < 989) { giveItemRandomly(qs.getPlayer(), npc, LAVA_STONE, 1, 0, 1, true); } break; } - case CRENDION: - { - if (getRandom(1000) < 618) - { + case CRENDION: { + if (getRandom(1000) < 618) { giveItemRandomly(qs.getPlayer(), npc, ROTTEN_BONE, 1, 0, 1, true); } - else - { + else { giveItemRandomly(qs.getPlayer(), npc, QUICKSILVER, 1, 0, 1, true); } break; } - case PLATINUM_GUARDIAN_SHAMAN: - { - if (getRandom(1000) < 444) - { + case PLATINUM_GUARDIAN_SHAMAN: { + if (getRandom(1000) < 444) { giveItemRandomly(qs.getPlayer(), npc, REAGENT_BOX, 1, 0, 1, true); } break; } - case PLATINUM_TRIBE_SHAMAN: - { - if (getRandom(1000) < 658) - { + case PLATINUM_TRIBE_SHAMAN: { + if (getRandom(1000) < 658) { giveItemRandomly(qs.getPlayer(), npc, REAGENT_POUNCH2, 1, 0, 1, true); } - else - { + else { giveItemRandomly(qs.getPlayer(), npc, QUICKSILVER, 2, 0, 1, true); } break; @@ -426,29 +372,22 @@ public final class Q00373_SupplierOfReagents extends Quest } @Override - public String onTalk(L2Npc npc, L2PcInstance talker) - { + public String onTalk(L2Npc npc, L2PcInstance talker) { final QuestState qs = getQuestState(talker, true); String htmltext = getNoQuestMsg(talker); - if (qs.isCreated()) - { - if (talker.getLevel() < MIN_LVL) - { + if (qs.isCreated()) { + if (talker.getLevel() < MIN_LVL) { htmltext = "30166-01.html"; } - else - { + else { htmltext = "30166-02.htm"; } } - else if (qs.isStarted()) - { - if (npc.getId() == WESLEY) - { + else if (qs.isStarted()) { + if (npc.getId() == WESLEY) { htmltext = "30166-05.html"; } - else - { + else { htmltext = "31149-01.html"; } } @@ -456,25 +395,21 @@ public final class Q00373_SupplierOfReagents extends Quest return htmltext; } - private static final class Entry - { - private final int item; - private final String html; + private static final class Entry { + private final int _item; + private final String _html; - public Entry(int item, String html) - { - this.item = item; - this.html = html; + public Entry(int item, String html) { + _item = item; + _html = html; } - public int getItem() - { - return item; + public int getItem() { + return _item; } - public String getHtml() - { - return html; + public String getHtml() { + return _html; } } } diff --git a/dist/game/data/scripts/quests/Q00421_LittleWingsBigAdventure/Q00421_LittleWingsBigAdventure.java b/dist/game/data/scripts/quests/Q00421_LittleWingsBigAdventure/Q00421_LittleWingsBigAdventure.java index 41e8c51d7f558980ec391f29918c744f6d87d360..9fed45f31f2b985866c033ceced3bad996f283e8 100644 --- a/dist/game/data/scripts/quests/Q00421_LittleWingsBigAdventure/Q00421_LittleWingsBigAdventure.java +++ b/dist/game/data/scripts/quests/Q00421_LittleWingsBigAdventure/Q00421_LittleWingsBigAdventure.java @@ -40,8 +40,7 @@ import com.l2jserver.gameserver.util.Util; * Little Wing's Big Adventure (421) * @author Pandragon, jurchiks */ -public final class Q00421_LittleWingsBigAdventure extends Quest -{ +public final class Q00421_LittleWingsBigAdventure extends Quest { // NPCs private static final int CRONOS = 30610; private static final int MIMYU = 30747; @@ -68,16 +67,14 @@ public final class Q00421_LittleWingsBigAdventure extends Quest private static final int MIN_PLAYER_LVL = 45; private static final int MIN_HACHLING_LVL = 55; private static final Map<Integer, NpcData> NPC_DATA = new HashMap<>(); - static - { + static { NPC_DATA.put(TREE_OF_WIND, new NpcData(NpcStringId.HEY_YOUVE_ALREADY_DRUNK_THE_ESSENCE_OF_WIND, 2, 1, 270)); NPC_DATA.put(TREE_OF_STAR, new NpcData(NpcStringId.HEY_YOUVE_ALREADY_DRUNK_THE_ESSENCE_OF_A_STAR, 4, 2, 400)); NPC_DATA.put(TREE_OF_TWILIGHT, new NpcData(NpcStringId.HEY_YOUVE_ALREADY_DRUNK_THE_ESSENCE_OF_DUSK, 8, 4, 150)); NPC_DATA.put(TREE_OF_ABYSS, new NpcData(NpcStringId.HEY_YOUVE_ALREADY_DRUNK_THE_ESSENCE_OF_THE_ABYSS, 16, 8, 270)); } - public Q00421_LittleWingsBigAdventure() - { + public Q00421_LittleWingsBigAdventure() { super(421, Q00421_LittleWingsBigAdventure.class.getSimpleName(), "Little Wing's Big Adventure"); addStartNpc(CRONOS); addTalkId(CRONOS, MIMYU); @@ -87,12 +84,9 @@ public final class Q00421_LittleWingsBigAdventure extends Quest } @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { - if ("DESPAWN_GUARDIAN".equals(event)) - { - if (npc != null) - { + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { + if ("DESPAWN_GUARDIAN".equals(event)) { + if (npc != null) { npc.deleteMe(); } return super.onAdvEvent(event, npc, player); @@ -100,72 +94,56 @@ public final class Q00421_LittleWingsBigAdventure extends Quest final QuestState qs = getQuestState(player, false); String htmltext = null; - if (qs == null) - { + if (qs == null) { return htmltext; } - switch (event) - { - case "30610-05.htm": - { - if (qs.isCreated()) - { - if (getQuestItemsCount(player, DRAGONFLUTE_OF_WIND, DRAGONFLUTE_OF_STAR, DRAGONFLUTE_OF_TWILIGHT) == 1) - { + switch (event) { + case "30610-05.htm": { + if (qs.isCreated()) { + if (getQuestItemsCount(player, DRAGONFLUTE_OF_WIND, DRAGONFLUTE_OF_STAR, DRAGONFLUTE_OF_TWILIGHT) == 1) { final L2ItemInstance flute = getFlute(player); - if (flute.getEnchantLevel() < MIN_HACHLING_LVL) - { + if (flute.getEnchantLevel() < MIN_HACHLING_LVL) { htmltext = "30610-06.html"; } - else - { + else { qs.startQuest(); qs.setMemoState(100); qs.set("fluteObjectId", flute.getObjectId()); htmltext = event; } } - else - { + else { htmltext = "30610-06.html"; } } break; } - case "30747-04.html": - { + case "30747-04.html": { final L2Summon summon = player.getSummon(); - if (summon == null) - { + if (summon == null) { htmltext = "30747-02.html"; } - else if (summon.getControlObjectId() != qs.getInt("fluteObjectId")) - { + else if (summon.getControlObjectId() != qs.getInt("fluteObjectId")) { htmltext = "30747-03.html"; } - else - { + else { htmltext = event; } break; } - case "30747-05.html": - { + case "30747-05.html": { final L2Summon summon = player.getSummon(); - if (summon == null) - { + if (summon == null) { htmltext = "30747-06.html"; } - else if (summon.getControlObjectId() != qs.getInt("fluteObjectId")) - { + else if (summon.getControlObjectId() != qs.getInt("fluteObjectId")) { htmltext = "30747-06.html"; } - else - { + else { giveItems(player, FAIRY_LEAF, 4); qs.setCond(2, true); qs.setMemoState(0); @@ -176,8 +154,7 @@ public final class Q00421_LittleWingsBigAdventure extends Quest case "30747-07.html": case "30747-08.html": case "30747-09.html": - case "30747-10.html": - { + case "30747-10.html": { htmltext = event; break; } @@ -186,86 +163,66 @@ public final class Q00421_LittleWingsBigAdventure extends Quest } @Override - public String onTalk(L2Npc npc, L2PcInstance talker) - { + public String onTalk(L2Npc npc, L2PcInstance talker) { final QuestState qs = getQuestState(talker, true); String htmltext = getNoQuestMsg(talker); - switch (npc.getId()) - { - case CRONOS: - { - switch (qs.getState()) - { - case State.CREATED: - { + switch (npc.getId()) { + case CRONOS: { + switch (qs.getState()) { + case State.CREATED: { final long fluteCount = getQuestItemsCount(talker, DRAGONFLUTE_OF_WIND, DRAGONFLUTE_OF_STAR, DRAGONFLUTE_OF_TWILIGHT); - if (fluteCount == 0) - { + if (fluteCount == 0) { break; // this quest does not show up if no flute in inventory } - if (talker.getLevel() < MIN_PLAYER_LVL) - { + if (talker.getLevel() < MIN_PLAYER_LVL) { htmltext = "30610-01.htm"; } - else if (fluteCount > 1) - { + else if (fluteCount > 1) { htmltext = "30610-02.htm"; } - else if (getFlute(talker).getEnchantLevel() < MIN_HACHLING_LVL) - { + else if (getFlute(talker).getEnchantLevel() < MIN_HACHLING_LVL) { htmltext = "30610-03.html"; } - else - { + else { htmltext = "30610-04.htm"; } break; } - case State.STARTED: - { + case State.STARTED: { htmltext = "30610-07.html"; break; } - case State.COMPLETED: - { + case State.COMPLETED: { htmltext = getAlreadyCompletedMsg(talker); break; } } break; } - case MIMYU: - { - switch (qs.getMemoState()) - { - case 100: - { + case MIMYU: { + switch (qs.getMemoState()) { + case 100: { qs.setMemoState(200); htmltext = "30747-01.html"; break; } - case 200: - { + case 200: { final L2Summon summon = talker.getSummon(); - if (summon == null) - { + if (summon == null) { htmltext = "30747-02.html"; } - else if (summon.getControlObjectId() != qs.getInt("fluteObjectId")) - { + else if (summon.getControlObjectId() != qs.getInt("fluteObjectId")) { htmltext = "30747-03.html"; } - else - { + else { htmltext = "30747-04.html"; } break; } - case 0: - { + case 0: { htmltext = "30747-07.html"; break; } @@ -282,62 +239,47 @@ public final class Q00421_LittleWingsBigAdventure extends Quest case 11: case 12: case 13: - case 14: - { - if (hasQuestItems(talker, FAIRY_LEAF)) - { + case 14: { + if (hasQuestItems(talker, FAIRY_LEAF)) { htmltext = "30747-11.html"; } break; } - case 15: - { - if (!hasQuestItems(talker, FAIRY_LEAF)) - { + case 15: { + if (!hasQuestItems(talker, FAIRY_LEAF)) { final L2Summon summon = talker.getSummon(); - if (summon == null) - { + if (summon == null) { htmltext = "30747-12.html"; } - else if (summon.getControlObjectId() == qs.getInt("fluteObjectId")) - { + else if (summon.getControlObjectId() == qs.getInt("fluteObjectId")) { qs.setMemoState(16); htmltext = "30747-13.html"; } - else - { + else { htmltext = "30747-14.html"; } } break; } - case 16: - { - if (!hasQuestItems(talker, FAIRY_LEAF)) - { - if (talker.hasSummon()) - { + case 16: { + if (!hasQuestItems(talker, FAIRY_LEAF)) { + if (talker.hasSummon()) { htmltext = "30747-15.html"; } - else - { + else { final long fluteCount = getQuestItemsCount(talker, DRAGONFLUTE_OF_WIND, DRAGONFLUTE_OF_STAR, DRAGONFLUTE_OF_TWILIGHT); - if (fluteCount > 1) - { + if (fluteCount > 1) { htmltext = "30747-17.html"; } - else if (fluteCount == 1) - { + else if (fluteCount == 1) { final L2ItemInstance flute = getFlute(talker); - if (flute.getObjectId() == qs.getInt("fluteObjectId")) - { + if (flute.getObjectId() == qs.getInt("fluteObjectId")) { // TODO what if the hatchling has items in his inventory? // Should they be transfered to the strider or given to the player? - switch (flute.getId()) - { + switch (flute.getId()) { case DRAGONFLUTE_OF_WIND: takeItems(talker, DRAGONFLUTE_OF_WIND, -1); giveItems(talker, DRAGON_BUGLE_OF_WIND, 1); @@ -355,8 +297,7 @@ public final class Q00421_LittleWingsBigAdventure extends Quest qs.exitQuest(true, true); htmltext = "30747-16.html"; } - else - { + else { npc.setTarget(talker); npc.doCast(CURSE_OF_MIMYU); htmltext = "30747-18.html"; @@ -374,56 +315,44 @@ public final class Q00421_LittleWingsBigAdventure extends Quest } @Override - public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon) - { + public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon) { final QuestState qs = getQuestState(attacker, false); - if ((qs != null) && qs.isCond(2)) - { - if (isSummon) - { + if ((qs != null) && qs.isCond(2)) { + if (isSummon) { final NpcData data = NPC_DATA.get(npc.getId()); - if ((qs.getMemoState() % data.memoStateMod) < data.memoStateValue) - { - if (attacker.getSummon().getControlObjectId() == qs.getInt("fluteObjectId")) - { + if ((qs.getMemoState() % data._memoStateMod) < data._memoStateValue) { + if (attacker.getSummon().getControlObjectId() == qs.getInt("fluteObjectId")) { final int hits = qs.getInt("hits") + 1; qs.set("hits", hits); - if (hits < data.minHits) - { - if ((npc.getId() == TREE_OF_ABYSS) && (getRandom(100) < 2)) - { + if (hits < data._minHits) { + if ((npc.getId() == TREE_OF_ABYSS) && (getRandom(100) < 2)) { npc.setTarget(attacker); npc.doCast(DRYAD_ROOT); } } - else if (getRandom(100) < 2) - { - if (hasQuestItems(attacker, FAIRY_LEAF)) - { + else if (getRandom(100) < 2) { + if (hasQuestItems(attacker, FAIRY_LEAF)) { npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, NpcStringId.GIVE_ME_A_FAIRY_LEAF)); takeItems(attacker, FAIRY_LEAF, 1); - qs.setMemoState(qs.getMemoState() + data.memoStateValue); + qs.setMemoState(qs.getMemoState() + data._memoStateValue); qs.unset("hits"); playSound(attacker, Sound.ITEMSOUND_QUEST_MIDDLE); - if (qs.getMemoState() == 15) - { + if (qs.getMemoState() == 15) { qs.setCond(3); } } } } } - else - { - switch (getRandom(3)) - { + else { + switch (getRandom(3)) { case 0: npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, NpcStringId.WHY_DO_YOU_BOTHER_ME_AGAIN)); break; case 1: - npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, data.message)); + npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, data._message)); break; case 2: npc.broadcastPacket(new NpcSay(npc, Say2.NPC_ALL, NpcStringId.LEAVE_NOW_BEFORE_YOU_INCUR_THE_WRATH_OF_THE_GUARDIAN_GHOST)); @@ -431,14 +360,12 @@ public final class Q00421_LittleWingsBigAdventure extends Quest } } } - else if (getRandom(100) < 30) - { + else if (getRandom(100) < 30) { npc.setTarget(attacker); npc.doCast(VICIOUS_POISON); } } - else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.67)) && (getRandom(100) < 30)) - { + else if ((npc.getCurrentHp() < (npc.getMaxHp() * 0.67)) && (getRandom(100) < 30)) { npc.setTarget(attacker); npc.doCast(VICIOUS_POISON); } @@ -447,17 +374,13 @@ public final class Q00421_LittleWingsBigAdventure extends Quest } @Override - public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) - { - if (Util.checkIfInRange(1500, killer, npc, true)) - { - for (int i = 0; i < 20; i++) - { + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { + if (Util.checkIfInRange(1500, killer, npc, true)) { + for (int i = 0; i < 20; i++) { L2Npc guardian = addSpawn(SOUL_OF_TREE_GUARDIAN, npc); startQuestTimer("DESPAWN_GUARDIAN", 300000, guardian, null); - if (i == 0) - { + if (i == 0) { npc.setTarget(killer); npc.doCast(VICIOUS_POISON); } @@ -468,37 +391,31 @@ public final class Q00421_LittleWingsBigAdventure extends Quest return super.onKill(npc, killer, isSummon); } - private static L2ItemInstance getFlute(L2PcInstance player) - { + private static L2ItemInstance getFlute(L2PcInstance player) { final int fluteItemId; - if (hasQuestItems(player, DRAGONFLUTE_OF_WIND)) - { + if (hasQuestItems(player, DRAGONFLUTE_OF_WIND)) { fluteItemId = DRAGONFLUTE_OF_WIND; } - else if (hasQuestItems(player, DRAGONFLUTE_OF_STAR)) - { + else if (hasQuestItems(player, DRAGONFLUTE_OF_STAR)) { fluteItemId = DRAGONFLUTE_OF_STAR; } - else - { + else { fluteItemId = DRAGONFLUTE_OF_TWILIGHT; } return player.getInventory().getItemByItemId(fluteItemId); } - private static final class NpcData - { - public final NpcStringId message; - public final int memoStateMod; - public final int memoStateValue; - public final int minHits; + private static final class NpcData { + public final NpcStringId _message; + public final int _memoStateMod; + public final int _memoStateValue; + public final int _minHits; - public NpcData(NpcStringId message, int memoStateMod, int memoStateValue, int minHits) - { - this.message = message; - this.memoStateMod = memoStateMod; - this.memoStateValue = memoStateValue; - this.minHits = minHits; + public NpcData(NpcStringId message, int memoStateMod, int memoStateValue, int minHits) { + _message = message; + _memoStateMod = memoStateMod; + _memoStateValue = memoStateValue; + _minHits = minHits; } } } \ No newline at end of file diff --git a/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/Q00426_QuestForFishingShot.java b/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/Q00426_QuestForFishingShot.java index 3d255995ef64c10817e352dd1a0567802b359c40..1305e200f318a7424dbb18c9c72ce53780e91b2d 100644 --- a/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/Q00426_QuestForFishingShot.java +++ b/dist/game/data/scripts/quests/Q00426_QuestForFishingShot/Q00426_QuestForFishingShot.java @@ -33,10 +33,8 @@ import com.l2jserver.util.Rnd; * Quest for Fishing Shot (426)<br> * @author Zealar */ -public class Q00426_QuestForFishingShot extends Quest -{ - private static final int[] NPC = new int[] - { +public class Q00426_QuestForFishingShot extends Quest { + private static final int[] NPC = new int[] { 31562, // Klufe 31563, // Perelin 31564, // Mishini @@ -62,8 +60,7 @@ public class Q00426_QuestForFishingShot extends Quest 32348, // Burang }; private static final Map<Integer, ChanceReward> MOBS = new HashMap<>(250); - static - { + static { MOBS.put(20005, new ChanceReward(45, 1)); // Imp Elder MOBS.put(20013, new ChanceReward(100, 1)); // Dryad MOBS.put(20016, new ChanceReward(100, 1)); // Stone Golem @@ -316,8 +313,7 @@ public class Q00426_QuestForFishingShot extends Quest MOBS.put(21656, new ChanceReward(750, 5)); // Ashuras of Destruction } private static final Map<Integer, ChanceReward> MOBS_SPECIAL = new HashMap<>(5); - static - { + static { MOBS_SPECIAL.put(20829, new ChanceReward(115, 6)); // Platinum Tribe Overlord MOBS_SPECIAL.put(20859, new ChanceReward(890, 8)); // Guardian Angel MOBS_SPECIAL.put(21066, new ChanceReward(5, 5)); // Platinum Guardian Shaman @@ -326,8 +322,7 @@ public class Q00426_QuestForFishingShot extends Quest } private static final int SWEET_FLUID = 7586; - public Q00426_QuestForFishingShot() - { + public Q00426_QuestForFishingShot() { super(426, Q00426_QuestForFishingShot.class.getSimpleName(), "Quest for Fishing Shot"); addStartNpc(NPC); addTalkId(NPC); @@ -335,43 +330,34 @@ public class Q00426_QuestForFishingShot extends Quest registerQuestItems(SWEET_FLUID); } - private static class ChanceReward - { - final int chance; - final int reward; + private static class ChanceReward { + private final int _chance; + private final int _reward; - ChanceReward(int chance, int reward) - { - this.chance = chance; - this.reward = reward; + ChanceReward(int chance, int reward) { + _chance = chance; + _reward = reward; } } @Override - public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) - { + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { final QuestState qs = getQuestState(player, false); - if (qs == null) - { + if (qs == null) { return null; } - switch (event) - { - case "QUEST_ACEPT": - { + switch (event) { + case "QUEST_ACEPT": { qs.startQuest(); return "03.htm"; } - case "1": - { + case "1": { return "06.html"; } - case "2": - { + case "2": { return "07.html"; } - case "3": - { + case "3": { qs.exitQuest(true); return "08.html"; } @@ -380,28 +366,21 @@ public class Q00426_QuestForFishingShot extends Quest } @Override - public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) - { + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) { final QuestState qs = getRandomPartyMemberState(killer, -1, 2, npc); - if (qs != null) - { - if (MOBS_SPECIAL.containsKey(npc.getId())) - { - if (Rnd.get(1000) <= MOBS_SPECIAL.get(npc.getId()).chance) - { - rewardItems(qs.getPlayer(), SWEET_FLUID, MOBS_SPECIAL.get(npc.getId()).reward + 1); + if (qs != null) { + if (MOBS_SPECIAL.containsKey(npc.getId())) { + if (Rnd.get(1000) <= MOBS_SPECIAL.get(npc.getId())._chance) { + rewardItems(qs.getPlayer(), SWEET_FLUID, MOBS_SPECIAL.get(npc.getId())._reward + 1); } - else - { - rewardItems(qs.getPlayer(), SWEET_FLUID, MOBS_SPECIAL.get(npc.getId()).reward); + else { + rewardItems(qs.getPlayer(), SWEET_FLUID, MOBS_SPECIAL.get(npc.getId())._reward); } playSound(qs.getPlayer(), Sound.ITEMSOUND_QUEST_ITEMGET); } - else - { - if (Rnd.get(1000) <= MOBS.get(npc.getId()).chance) - { - rewardItems(qs.getPlayer(), SWEET_FLUID, MOBS.get(npc.getId()).reward); + else { + if (Rnd.get(1000) <= MOBS.get(npc.getId())._chance) { + rewardItems(qs.getPlayer(), SWEET_FLUID, MOBS.get(npc.getId())._reward); playSound(qs.getPlayer(), Sound.ITEMSOUND_QUEST_ITEMGET); } } @@ -410,21 +389,16 @@ public class Q00426_QuestForFishingShot extends Quest } @Override - public String onTalk(L2Npc npc, L2PcInstance player) - { + public String onTalk(L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(player); final QuestState st = getQuestState(player, true); - switch (st.getState()) - { - case State.CREATED: - { + switch (st.getState()) { + case State.CREATED: { return "01.htm"; } - case State.STARTED: - { - if (!hasQuestItems(player, SWEET_FLUID)) - { + case State.STARTED: { + if (!hasQuestItems(player, SWEET_FLUID)) { return "04.html"; } return "05.html";