From 21e54e98fc85bd210c6c94313aaa50c46507c32d Mon Sep 17 00:00:00 2001 From: hahwu <31872165+hahwu@users.noreply.github.com> Date: Mon, 20 Oct 2025 14:03:11 +0800 Subject: [PATCH] =?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 --- src/server/game/PlayerBaseMod.go | 21 +++++++++++---------- src/server/msg/Gameapi.pb.go | 15 ++++++++++++--- 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/server/game/PlayerBaseMod.go b/src/server/game/PlayerBaseMod.go index 86b7b8ce..53c0b37c 100644 --- a/src/server/game/PlayerBaseMod.go +++ b/src/server/game/PlayerBaseMod.go @@ -196,16 +196,17 @@ func (p *PlayerBaseData) ReqRemoveAd(player *Player, buf []byte) { func (p *PlayerBaseData) ResPlayerBaseInfo(player *Player) { BaseMod := player.PlayMod.getBaseMod() player.PushClientRes(&msg.ResPlayerBaseInfo{ - DwUin: p.Data.DwUin, - Energy: int32(BaseMod.Energy), - Star: int32(BaseMod.Star), - RecoverTime: int32(BaseMod.RecoverTime), - Diamond: int32(BaseMod.Diamond), - Level: int32(BaseMod.Level), - Exp: int32(BaseMod.Exp), - LoginTime: int32(BaseMod.LoginTime), - LogoutTime: int32(BaseMod.LogoutTime), - FaceBookId: p.Data.FaceBookId, + DwUin: p.Data.DwUin, + Energy: int32(BaseMod.Energy), + Star: int32(BaseMod.Star), + RecoverTime: int32(BaseMod.RecoverTime), + Diamond: int32(BaseMod.Diamond), + Level: int32(BaseMod.Level), + Exp: int32(BaseMod.Exp), + LoginTime: int32(BaseMod.LoginTime), + LogoutTime: int32(BaseMod.LogoutTime), + RegisterTime: int32(p.Data.RegisterTime), + FaceBookId: p.Data.FaceBookId, }) agent := player.GetAgentByPlayer() data, _ := proto.Marshal(&p.Data) diff --git a/src/server/msg/Gameapi.pb.go b/src/server/msg/Gameapi.pb.go index d153a125..734d0bac 100644 --- a/src/server/msg/Gameapi.pb.go +++ b/src/server/msg/Gameapi.pb.go @@ -2391,6 +2391,7 @@ type ResPlayerBaseInfo struct { ChampshipsGroupID int32 `protobuf:"varint,21,opt,name=ChampshipsGroupID,proto3" json:"ChampshipsGroupID,omitempty"` LastChampGroupID int32 `protobuf:"varint,22,opt,name=LastChampGroupID,proto3" json:"LastChampGroupID,omitempty"` FaceBookId string `protobuf:"bytes,23,opt,name=FaceBookId,proto3" json:"FaceBookId,omitempty"` + RegisterTime int32 `protobuf:"varint,24,opt,name=register_time,json=registerTime,proto3" json:"register_time,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -2586,6 +2587,13 @@ func (x *ResPlayerBaseInfo) GetFaceBookId() string { return "" } +func (x *ResPlayerBaseInfo) GetRegisterTime() int32 { + if x != nil { + return x.RegisterTime + } + return 0 +} + type ReqPlayerAsset struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields @@ -16066,7 +16074,7 @@ func (x *ResCharge) GetWeeklyDiscount() map[int32]*WeeklyDiscountInfo { type LogoutPetWork struct { state protoimpl.MessageState `protogen:"open.v1"` - WorkTime int64 `protobuf:"varint,1,opt,name=WorkTime,proto3" json:"WorkTime,omitempty"` // 离线工作时间 + WorkTime int64 `protobuf:"varint,1,opt,name=WorkTime,proto3" json:"WorkTime,omitempty"` // 工作时间 RemainTime int64 `protobuf:"varint,2,opt,name=RemainTime,proto3" json:"RemainTime,omitempty"` // 剩余时间 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache @@ -26122,7 +26130,7 @@ const file_proto_Gameapi_proto_rawDesc = "" + "ResultCode\x18\x01 \x01(\x05R\n" + "ResultCode\")\n" + "\x11ReqPlayerBaseInfo\x12\x14\n" + - "\x05dwUin\x18\x01 \x01(\x03R\x05dwUin\"\xee\x05\n" + + "\x05dwUin\x18\x01 \x01(\x03R\x05dwUin\"\x93\x06\n" + "\x11ResPlayerBaseInfo\x12\x14\n" + "\x05dwUin\x18\x01 \x01(\x03R\x05dwUin\x12\x16\n" + "\x06energy\x18\x02 \x01(\x05R\x06energy\x12\x12\n" + @@ -26152,7 +26160,8 @@ const file_proto_Gameapi_proto_rawDesc = "" + "\x10LastChampGroupID\x18\x16 \x01(\x05R\x10LastChampGroupID\x12\x1e\n" + "\n" + "FaceBookId\x18\x17 \x01(\tR\n" + - "FaceBookId\"\x10\n" + + "FaceBookId\x12#\n" + + "\rregister_time\x18\x18 \x01(\x05R\fregisterTime\"\x10\n" + "\x0eReqPlayerAsset\"\x95\x02\n" + "\x0eResPlayerAsset\x12\x14\n" + "\x05dwUin\x18\x01 \x01(\x03R\x05dwUin\x12\x16\n" +