diff --git a/src/main/kotlin/main/vp_server_integration/Vp_server_integration.kt b/src/main/kotlin/main/vp_server_integration/Vp_server_integration.kt index 779a8a9..71bcbd7 100644 --- a/src/main/kotlin/main/vp_server_integration/Vp_server_integration.kt +++ b/src/main/kotlin/main/vp_server_integration/Vp_server_integration.kt @@ -245,7 +245,7 @@ course_commission=$DEFAULT_COURSE_COMMISSION } if (direction == "vpc") { - val amountVPC: Double = amount/course * (1 + COURSE_COMMISSION/100) + val amountVPC: Double = amount/course * (1 - COURSE_COMMISSION/100) if (args.size == 4) { logger.severe("Step 5") val result: String = CommandCapture.execute(COMMAND_REMOVE_COINS.replace("%player%", sender.name).replace("%amount%", amount.toString()))[0] @@ -268,7 +268,7 @@ course_commission=$DEFAULT_COURSE_COMMISSION val invoice_id = TO_PAY_INVOICES[sender.name] val amount = INVOICES_AMOUNT[invoice_id] if (amount == null) return true // Stupid Kotlin, it's not null - val amountLC: Double = amount*course * (1 - COURSE_COMMISSION/100) + val amountLC: Double = amount*course * (1 + COURSE_COMMISSION/100) val colored = ChatColor.translateAlternateColorCodes('&', "${PREFIX}Кликните здесь, чтобы перевести &6$amount VPC &3в &6${String.format("%.4f", amountLC)}") val message = TextComponent(colored) message.clickEvent = ClickEvent(ClickEvent.Action.RUN_COMMAND, "/vpc pay $USERNAME $amount $invoice_id") @@ -278,7 +278,7 @@ course_commission=$DEFAULT_COURSE_COMMISSION } logger.severe("amount: $amount") logger.severe("course: $course") - val amountLC: Double = amount*course * (1 - COURSE_COMMISSION/100) + val amountLC: Double = amount*course * (1 + COURSE_COMMISSION/100) logger.severe("amountLC: $amountLC") val invoice_id = VpcApi.create_invoice(amount).toString() TO_PAY_INVOICES[sender.name] = invoice_id