fix(装备拓展): 修复购买装备时金币显示错乱问题
修改装备镶嵌相关代码后导致购买装备时金币显示异常,通过添加定时刷新金币操作解决该问题
This commit is contained in:
parent
ee09eb5efc
commit
5baa2cff0a
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue