From 5baa2cff0aafd3454bf3798b5833dfe5b357c46d Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Wed, 4 Mar 2026 15:42:44 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E8=A3=85=E5=A4=87=E6=8B=93=E5=B1=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B4=AD=E4=B9=B0=E8=A3=85=E5=A4=87=E6=97=B6?= =?UTF-8?q?=E9=87=91=E5=B8=81=E6=98=BE=E7=A4=BA=E9=94=99=E4=B9=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改装备镶嵌相关代码后导致购买装备时金币显示异常,通过添加定时刷新金币操作解决该问题 --- _DPS_/_BuiltProject/装备拓展/装备拓展.nut | 27 +++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/_DPS_/_BuiltProject/装备拓展/装备拓展.nut b/_DPS_/_BuiltProject/装备拓展/装备拓展.nut index 09b3f03..dc9b407 100644 --- a/_DPS_/_BuiltProject/装备拓展/装备拓展.nut +++ b/_DPS_/_BuiltProject/装备拓展/装备拓展.nut @@ -55,15 +55,24 @@ class EquipmentExpandC { // }.bindenv(this); //额外数据包,发送装备数据给本地处理 - Cb_InterfacePacketBuf_put_packet_Enter_Func["_装备拓展_"] <- function(args) { - local Inven_Item = NativePointer(args[1]); - if (Inven_Item.add(1).readU8() == 1) { - local Uuid = Inven_Item.add(21).readInt(); - if (Uuid< 10000) { - local uuid = GenerateUUID(); - Inven_Item.add(21).writeInt(uuid); - } - } + // Cb_InterfacePacketBuf_put_packet_Enter_Func["_装备拓展_"] <- function(args) { + // local Inven_Item = NativePointer(args[1]); + // if (Inven_Item.add(1).readU8() == 1) { + // local Uuid = Inven_Item.add(21).readInt(); + // if (Uuid< 10000) { + // local uuid = GenerateUUID(); + // Inven_Item.add(21).writeInt(uuid); + // } + // } + // }.bindenv(this); + + //因为装备镶嵌那边更改的数据导致 购买装备时金币会错乱 任意方式刷新一下金币就可以了 + Cb_BuyItem_send_Enter["_装备拓展_"] <- function(args) { + local SUser = User(args[1]); + Timer.SetTimeOut(function() { + print("刷新"); + SUser.SendItemSpace(0); + }, 1); }.bindenv(this); }