添加非首次登录标记
This commit is contained in:
parent
93134b7f57
commit
b1298fe25f
|
@ -810,6 +810,7 @@ const (
|
|||
AttributeGuideStep = 1 // 引导步骤
|
||||
AttributeGuideSkip = 2 // 跳过引导
|
||||
AttributeGuideTest = 3 // 测试引导
|
||||
AttributeGuideCustom = 4 // 竞技馆引导页
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -861,3 +862,8 @@ const (
|
|||
PlayerChangeTypeCoin = 0 // 金币
|
||||
PlayerChangeTypeNum = 1 // 积分
|
||||
)
|
||||
|
||||
// 玩家状态标记
|
||||
const (
|
||||
PlayerFlagsGuideCustom = 1 << iota // 竞技馆引导页关闭状态
|
||||
)
|
||||
|
|
|
@ -29,13 +29,6 @@ const (
|
|||
VER_PLAYER_MAX
|
||||
)
|
||||
|
||||
const (
|
||||
PLAYER_FLAGS_PRIVILEGE int64 = 1 << iota
|
||||
PLAYER_FLAGS_FIRSTGAME //首次游戏
|
||||
PLAYER_FLAGS_FIRSTBINDTEL //首次绑定账号
|
||||
PLAYER_FLAGS_CANREBATE //是否能够返利
|
||||
)
|
||||
|
||||
const (
|
||||
DEFAULT_PLAYER_SAFEBOX_PWD = "" //保险箱默认密码
|
||||
)
|
||||
|
@ -402,7 +395,7 @@ type PlayerData struct {
|
|||
InviterHead int32 //邀请人头像
|
||||
BeUnderAgentCode string //隶属经销商(推广人)
|
||||
SubBeUnderAgentCode string //经销商子id
|
||||
Flags int64 //标记
|
||||
Flags int //标记
|
||||
GameCoinTs int64 //游服金币对账时间戳
|
||||
Ver int32 //数据版本号
|
||||
CheckSum uint32 //校验码(预防暴库修改数据)
|
||||
|
@ -501,7 +494,7 @@ type PlayerData struct {
|
|||
DiamondLotteryScore int64 //钻石抽奖幸运值
|
||||
VCardCost int64 // 消耗v卡数量
|
||||
MoneyTotal int64 // 现金总充值金额,不包含api加币时的现金
|
||||
GuideStep int32 // 引导步骤;跳过引导后,该值会置为-1
|
||||
GuideStep int32 // tienlen游戏引导步骤;跳过引导后,该值会置为-1
|
||||
}
|
||||
|
||||
// 七日签到数据
|
||||
|
@ -802,15 +795,15 @@ func ConvertPlayerDataToWebData(param *WebPlayerDataParam) *webapi.PlayerData {
|
|||
return pdfw
|
||||
}
|
||||
func (this *PlayerData) IsMarkFlag(flag int) bool {
|
||||
return this.Flags&(1<<flag) != 0
|
||||
return this.Flags&flag != 0
|
||||
}
|
||||
|
||||
func (this *PlayerData) MarkFlag(flag int) {
|
||||
this.Flags |= (1 << flag)
|
||||
this.Flags |= flag
|
||||
}
|
||||
|
||||
func (this *PlayerData) UnmarkFlag(flag int) {
|
||||
this.Flags &= ^(1 << flag)
|
||||
this.Flags &= ^flag
|
||||
}
|
||||
|
||||
func (this *PlayerData) GetSnId() int32 {
|
||||
|
|
|
@ -10746,7 +10746,7 @@ type CSUpdateAttribute struct {
|
|||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 1.更新新手引导阶段 2.跳过新手引导 3.更新新手引导状态(测试用)
|
||||
Tp int32 `protobuf:"varint,1,opt,name=Tp,proto3" json:"Tp,omitempty"` // 1.更新新手引导阶段 2.跳过新手引导 3.更新新手引导状态(测试用) 4.竞技馆引导结束
|
||||
Param []int64 `protobuf:"varint,2,rep,packed,name=Param,proto3" json:"Param,omitempty"`
|
||||
}
|
||||
|
||||
|
|
|
@ -1337,7 +1337,7 @@ message WindowsInfo{
|
|||
|
||||
//PACKET_CSUpdateAttribute
|
||||
message CSUpdateAttribute{
|
||||
int32 Tp = 1; // 1.更新新手引导阶段 2.跳过新手引导 3.更新新手引导状态(测试用)
|
||||
int32 Tp = 1; // 1.更新新手引导阶段 2.跳过新手引导 3.更新新手引导状态(测试用) 4.竞技馆引导结束
|
||||
repeated int64 Param = 2;
|
||||
}
|
||||
//PACKET_SCUpdateAttribute
|
||||
|
|
|
@ -3159,6 +3159,11 @@ func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid in
|
|||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
return nil
|
||||
case common.AttributeGuideCustom:
|
||||
p.MarkFlag(common.PlayerFlagsGuideCustom)
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -615,13 +615,7 @@ func (this *CSPMCmdHandler) Process(s *netlib.Session, packetid int, data interf
|
|||
}
|
||||
}
|
||||
case common.PMCmd_Privilege:
|
||||
if p.GMLevel >= 3 {
|
||||
if p.Flags&model.PLAYER_FLAGS_PRIVILEGE == 0 {
|
||||
p.Flags |= model.PLAYER_FLAGS_PRIVILEGE
|
||||
} else {
|
||||
p.Flags &= ^model.PLAYER_FLAGS_PRIVILEGE
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue