From 9942cdfd0d5d8c8ddba406b38e2db431d958df65 Mon Sep 17 00:00:00 2001 From: ShrBox Date: Sat, 25 May 2024 22:16:20 +0800 Subject: [PATCH] fix: fix #4 --- manifest.json | 2 +- src/API.cpp | 4 +++- tooth.json | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/manifest.json b/manifest.json index e3fdb5c..d4d95a2 100644 --- a/manifest.json +++ b/manifest.json @@ -4,5 +4,5 @@ "type": "native", "description": "LLMoney, but adapted to LeviLamina", "author": "LiteLDev", - "version": "0.7.2" + "version": "0.7.3" } diff --git a/src/API.cpp b/src/API.cpp index f5a6718..d8476fe 100644 --- a/src/API.cpp +++ b/src/API.cpp @@ -120,7 +120,9 @@ bool LLMoney_Trans(std::string from, std::string to, long long val, std::string } if (!to.empty()) { auto tmoney = LLMoney_Get(to); - if (!from.empty()) { + if (from.empty()) { + tmoney += val + } else { tmoney += val - val * Settings::pay_tax; } if (tmoney < 0) { diff --git a/tooth.json b/tooth.json index cb4100a..15a2376 100644 --- a/tooth.json +++ b/tooth.json @@ -1,7 +1,7 @@ { "format_version": 2, "tooth": "github.com/LiteLDev/LegacyMoney", - "version": "0.7.2", + "version": "0.7.3", "info": { "name": "LegacyMoney", "description": "LLMoney, but adapted to LeviLamina", @@ -13,7 +13,7 @@ "economy" ] }, - "asset_url": "https://github.com/LiteLDev/LegacyMoney/releases/download/v0.7.2/LegacyMoney-windows-x64.zip", + "asset_url": "https://github.com/LiteLDev/LegacyMoney/releases/download/v0.7.3/LegacyMoney-windows-x64.zip", "prerequisites": { "github.com/LiteLDev/LeviLamina": "0.12.x" },