From 1403079cc05ee432c20cd7601e9924f9eeabbcd6 Mon Sep 17 00:00:00 2001 From: chen wei bo <1025839511@qq.com> Date: Mon, 22 Sep 2025 09:56:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/Scripts/chat18x/core/ChatAIService.ts | 4 ++-- assets/Scripts/chat18x/utils/ErrorHandler.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/Scripts/chat18x/core/ChatAIService.ts b/assets/Scripts/chat18x/core/ChatAIService.ts index 782f1920..7143b615 100644 --- a/assets/Scripts/chat18x/core/ChatAIService.ts +++ b/assets/Scripts/chat18x/core/ChatAIService.ts @@ -70,8 +70,8 @@ export class ChatAIService { }, }); - console.log("-------AI 启动成功-------"); - console.log(this.ai); + logger.log("-------AI 启动成功-------"); + logger.log(this.ai); this.ai.operations; } catch (error) { TipsPanel.show(LanguageUtils.getText("chat_error_code_2001")); diff --git a/assets/Scripts/chat18x/utils/ErrorHandler.ts b/assets/Scripts/chat18x/utils/ErrorHandler.ts index 27626614..ae381fda 100644 --- a/assets/Scripts/chat18x/utils/ErrorHandler.ts +++ b/assets/Scripts/chat18x/utils/ErrorHandler.ts @@ -171,7 +171,7 @@ export class ErrorHandler { */ public clearErrorLog(): void { this.errorLog = []; - console.log("Error log cleared"); + logger.log("Error log cleared"); } /** From efa3795d42dc3c22c30648da817da78b8bb7aa1a Mon Sep 17 00:00:00 2001 From: chen wei bo <1025839511@qq.com> Date: Mon, 22 Sep 2025 11:49:20 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=8D=8F=E8=AE=AE=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proto_cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto_cs b/proto_cs index 05baadbb..2ed2ffb6 160000 --- a/proto_cs +++ b/proto_cs @@ -1 +1 @@ -Subproject commit 05baadbb24095906a9b7a3e6344e6d22c5e75b82 +Subproject commit 2ed2ffb66a1577292a77e1c0750252af3f22ef35 From 4dd4efab40c76234757182d51ba4215eb2466144 Mon Sep 17 00:00:00 2001 From: chen wei bo <1025839511@qq.com> Date: Mon, 22 Sep 2025 11:57:21 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=95=86=E5=9C=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/chat18x/config/PurchaseConfig.ts | 25 ++++++++++++++++++- assets/Scripts/chat18x/data/ShopData.ts | 22 +++++++++++++--- 2 files changed, 43 insertions(+), 4 deletions(-) diff --git a/assets/Scripts/chat18x/config/PurchaseConfig.ts b/assets/Scripts/chat18x/config/PurchaseConfig.ts index 0eaaaf84..584e9566 100644 --- a/assets/Scripts/chat18x/config/PurchaseConfig.ts +++ b/assets/Scripts/chat18x/config/PurchaseConfig.ts @@ -107,10 +107,33 @@ export class PurchaseConfig extends BaseConfig { return oneData.count; } - /** 根据商品 id 获取商品价格 */ + /** 根据商品 id 获取商品的原来价格,除100,卢币 */ + public getOriginalPriceById(id: number): number { + let oneData = this.getConfigById(id); + if (!oneData) return 0; + let price = oneData.price; + return price/100; + } + + /** 根据商品 id 获取商品价格,卢币 */ public getPriceById(id: number): number | null { let oneData = this.getConfigById(id); if (!oneData) return null; return oneData.price; } + + /** 根据商品 id 获取商品的原来价格,除100,usd */ + public getOriginalUsdPriceById(id: number): number { + let oneData = this.getConfigById(id); + if (!oneData) return 0; + let price = oneData.usd; + return price/100; + } + + /** 根据商品 id 获取商品价格,usd */ + public getUsdPriceById(id: number): number | null { + let oneData = this.getConfigById(id); + if (!oneData) return null; + return oneData.usd; + } } \ No newline at end of file diff --git a/assets/Scripts/chat18x/data/ShopData.ts b/assets/Scripts/chat18x/data/ShopData.ts index 3b692806..a501e863 100644 --- a/assets/Scripts/chat18x/data/ShopData.ts +++ b/assets/Scripts/chat18x/data/ShopData.ts @@ -37,7 +37,8 @@ export class ShopData extends BaseData { id: g.id, // 商品 id name: g.name, // 商品名字 count: g.count, // 商品数量 - price: g.price, // 商品价格 + price: g.price, // 商品价格,卢币 + usd: g.usd, // 商品价格,usd }; this._goods.set(vo.id, vo); this._goodIds.push(vo.id); @@ -143,7 +144,7 @@ export class ShopData extends BaseData { return oneData.name; } - /** 根据商品 id 获取商品的原来价格,除100 */ + /** 根据商品 id 获取商品的原来价格,除100,卢币 */ public getOriginalPriceById(id: number): number { let oneData = this.getGoodDataById(id); if (!oneData) return 0; @@ -151,13 +152,28 @@ export class ShopData extends BaseData { return price/100; } - /** 根据商品 id 获取商品价格 */ + /** 根据商品 id 获取商品价格,卢币 */ public getPriceById(id: number): number { let oneData = this.getGoodDataById(id); if (!oneData) return 0; return oneData.price; } + /** 根据商品 id 获取商品的原来价格,除100,usd */ + public getOriginalUsdPriceById(id: number): number { + let oneData = this.getGoodDataById(id); + if (!oneData) return 0; + let price = oneData.usd; + return price/100; + } + + /** 根据商品 id 获取商品价格,usd */ + public getUsdPriceById(id: number): number { + let oneData = this.getGoodDataById(id); + if (!oneData) return 0; + return oneData.usd; + } + /** 根据商品 id 获取商品数量 */ public getCountById(id: number): number | null { let oneData = this.getGoodDataById(id);