Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

在lua中修改的uint64字段字段,经过一次encode之后,又变回了原来的值,感觉没有修改成功,请云风大大看看怎么回事哈 #155

@hilberthu

Description

@hilberthu

代码如下:
LuaLogDebug("LastLoginTime3==================", tData.playerInfo.LastLoginTime)
local strPbData = protobuf.encode("UserProfile", tData)

LuaLogDebug("LastLoginTime4==================", tData.playerInfo.LastLoginTime)
输出结构如下:
2022-03-31 11:11:12|140067794106112|DEBUG|common/DBInterface.lua:67|LastLoginTime3==================|1648696272
2022-03-31 11:11:12|140067794106112|DEBUG|common/DBInterface.lua:70|LastLoginTime4==================|1646828625

pb的结构如下:

message PlayerInfoModel
{
optional int32 level = 1;
optional int32 languageID = 2;
optional int32 clothMoney = 3;
repeated KeyValue_IntInt limitCoin = 4;//废弃
optional int32 coin = 5;
optional int32 star = 6;
optional int32 hp = 7;
optional int32 petID = 8;
optional int32 dayNight = 9;
optional uint64 checkPowerCoinTime = 10;
optional string nickname = 11;
optional int32 sex = 12;
optional string head = 13;//当前使用的头像
optional string accountname = 14;
optional int32 levelTryedTimes = 15;
optional int32 nicknameNeedCheck = 16;
optional string oldNickname = 17;
repeated string fbOpenIDs = 18;
optional int32 accountType = 19;
optional int32 allowMaxlevel = 20;
optional string intlOs = 21;
optional uint64 LastLoginTime = 22;
optional int32 rankReported = 23;
optional string RegionName = 24
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions