新手引导
This commit is contained in:
parent
dd0794d0de
commit
a51037b1e7
|
@ -297,6 +297,7 @@ const (
|
|||
GainWaySkinUpGrade = 101 // 皮肤升级消耗
|
||||
GainWayItemFen = 102 // 道具分解消耗
|
||||
GainWayItemFenGain = 103 // 道具分解获得
|
||||
GainWayGuide = 104 //新手引导奖励
|
||||
)
|
||||
|
||||
// 后台选择 金币变化类型 的充值 类型id号起始
|
||||
|
@ -838,3 +839,14 @@ var (
|
|||
300003: 70,
|
||||
}
|
||||
)
|
||||
|
||||
const (
|
||||
AttributeGuideStep = 1 // 引导步骤
|
||||
AttributeGuideSkip = 2 // 跳过引导
|
||||
AttributeGuideTest = 3 // 测试引导
|
||||
)
|
||||
|
||||
const (
|
||||
On = 1 // 开启
|
||||
Off = 2 // 关闭
|
||||
)
|
||||
|
|
|
@ -38,4 +38,5 @@ const (
|
|||
ETCDKEY_SKin = "/game/skin_config" // 皮肤配置
|
||||
ETCDKEY_RANK_TYPE = "/game/RankType" // 排行榜奖励配置
|
||||
ETCDKEY_AWARD_CONFIG = "/game/awardlog_config" //获奖记录
|
||||
ETCDKEY_GUIDE = "/game/guide_config" //新手引导配置
|
||||
)
|
||||
|
|
|
@ -28,6 +28,7 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
|||
|
||||
var platform string
|
||||
var snid int32
|
||||
var createTs int64
|
||||
var p *model.PlayerData
|
||||
if s != nil {
|
||||
var pdi = s.GetAttribute(common.ClientSessionAttribute_PlayerData)
|
||||
|
@ -42,6 +43,7 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
|||
if p != nil {
|
||||
platform = p.Platform
|
||||
snid = p.SnId
|
||||
createTs = p.CreateTime.Unix()
|
||||
}
|
||||
|
||||
//LogChannelSingleton.WriteLog(&model.ClientLog{
|
||||
|
@ -56,6 +58,7 @@ func CSClientLog(s *netlib.Session, packetid int, pack interface{}) error {
|
|||
Platform: platform,
|
||||
Snid: snid,
|
||||
Ts: time.Now().Unix(),
|
||||
CreateTs: createTs,
|
||||
})
|
||||
|
||||
return nil
|
||||
|
|
|
@ -11,6 +11,12 @@ type ClientLog struct {
|
|||
Platform string // 平台id
|
||||
Snid int32 // 玩家id
|
||||
Ts int64 // 时间戳
|
||||
CreateTs int64 // 注册时间
|
||||
}
|
||||
|
||||
type CustomData struct {
|
||||
GuideTp int32 `json:"guide_tp"`
|
||||
N int64 `json:"n"`
|
||||
}
|
||||
|
||||
type ClientLogMysql ClientLog
|
||||
|
|
|
@ -133,6 +133,8 @@ type AllConfig struct {
|
|||
*webapi.RankTypeConfig
|
||||
//获奖记录配置
|
||||
*webapi.AwardLogConfig
|
||||
// 新手引导配置
|
||||
*webapi.GuideConfig
|
||||
}
|
||||
|
||||
type GlobalConfig struct {
|
||||
|
|
|
@ -82,6 +82,7 @@ type GameParam struct {
|
|||
TestRankMatchAward bool // 测试段位奖励领取通知,直接改玩家排位积分使玩家获得奖励
|
||||
RankPlayerPermitMaxNum int32 // 赛季通行证积分排行榜最大人数
|
||||
PermitInitScore int64 // 赛季通行证初始积分
|
||||
GuideStepMaxNum int32 // 引导步骤最大值
|
||||
}
|
||||
|
||||
var GameParamPath = "../data/gameparam.json"
|
||||
|
@ -209,4 +210,7 @@ func InitGameParam() {
|
|||
if GameParamData.RankPlayerPermitMaxNum == 0 {
|
||||
GameParamData.RankPlayerPermitMaxNum = 20
|
||||
}
|
||||
if GameParamData.GuideStepMaxNum == 0 {
|
||||
GameParamData.GuideStepMaxNum = 4
|
||||
}
|
||||
}
|
||||
|
|
|
@ -494,6 +494,7 @@ type PlayerData struct {
|
|||
DiamondLotteryScore int64 //钻石抽奖幸运值
|
||||
VCardCost int64 // 消耗v卡数量
|
||||
MoneyTotal int64 // 现金总充值金额,不包含api加币时的现金
|
||||
GuideStep int32 // 引导步骤;跳过引导后,该值会置为-1
|
||||
}
|
||||
|
||||
// 七日签到数据
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -75,6 +75,13 @@ enum OpResultCode {
|
|||
|
||||
OPRC_Hundred_YouHadBetCannotLeave = 7001; //赢下注不能离开
|
||||
OPRC_Hundred_YouHadBankerCannotLeave = 7002; //已上庄不能离开
|
||||
|
||||
OPRC_GuideStep_Finish = 8001; //该引导步骤已完成
|
||||
OPRC_GuideStep_Front = 8002; //前一个引导步骤未完成
|
||||
OPRC_GuideStep_End = 8003; //新手引导已结束
|
||||
OPRC_Guide_Close = 8004; //新手引导已关闭
|
||||
OPRC_Guide_Skip = 8005; //新手引导已跳过
|
||||
OPRC_Guide_SkipClose = 8006; //新手引导不能跳过
|
||||
}
|
||||
|
||||
//获取玩家数据消息id
|
||||
|
@ -222,7 +229,9 @@ enum PlayerPacketID {
|
|||
PACKET_SCAwardLog = 2837; //返回获奖记录
|
||||
PACKET_CSPopUpWindowsConfig = 2838;//请求弹窗配置
|
||||
PACKET_SCPopUpWindowsConfig = 2839;//返回弹窗配置
|
||||
|
||||
PACKET_CSUpdateAttribute = 2840;//请求更新属性
|
||||
PACKET_SCUpdateAttribute = 2841;//返回更新属性
|
||||
PACKET_SCGuideConfig = 2842;//返回引导配置
|
||||
}
|
||||
|
||||
// 账变记录
|
||||
|
@ -334,6 +343,7 @@ message PlayerData {
|
|||
repeated int32 RequestAddFriend = 49;//请求添加好友信息
|
||||
int32 UseSkinId = 50; // 皮肤id
|
||||
string ChannelID = 51; // 渠道ID
|
||||
int32 GuideStep = 52; // 引导步骤; 最小为0,-1表示跳过引导了
|
||||
}
|
||||
|
||||
//周卡数据
|
||||
|
@ -1311,4 +1321,22 @@ message WindowsInfo{
|
|||
int32 Sort = 3;//排序
|
||||
int32 PartNum = 4;//参与人数
|
||||
int32 GainNum = 5;//领取人数
|
||||
}
|
||||
|
||||
//PACKET_CSUpdateAttribute
|
||||
message CSUpdateAttribute{
|
||||
int32 Tp = 1; // 1.更新新手引导阶段 2.跳过新手引导 3.更新新手引导状态(测试用)
|
||||
repeated int64 Param = 2;
|
||||
}
|
||||
//PACKET_SCUpdateAttribute
|
||||
message SCUpdateAttribute{
|
||||
OpResultCode OpRetCode = 1; //操作结果
|
||||
int32 Tp = 2;
|
||||
repeated int64 Param = 3;
|
||||
}
|
||||
|
||||
//PACKET_SCGuideConfig
|
||||
message SCGuideConfig{
|
||||
int32 On = 2; // 引导开关 1开启 2关闭
|
||||
int32 Skip = 3; // 引导跳过开关 1开启 2关闭
|
||||
}
|
|
@ -8057,6 +8057,70 @@ func (x *AnnouncerLogInfo) GetTypeId() int32 {
|
|||
return 0
|
||||
}
|
||||
|
||||
// etcd /game/guide_config
|
||||
type GuideConfig struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Platform string `protobuf:"bytes,1,opt,name=Platform,proto3" json:"Platform,omitempty"` // 平台
|
||||
On int32 `protobuf:"varint,2,opt,name=On,proto3" json:"On,omitempty"` // 引导开关 1开启 2关闭
|
||||
Skip int32 `protobuf:"varint,3,opt,name=Skip,proto3" json:"Skip,omitempty"` // 引导跳过开关 1开启 2关闭
|
||||
}
|
||||
|
||||
func (x *GuideConfig) Reset() {
|
||||
*x = GuideConfig{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_proto_msgTypes[85]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *GuideConfig) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*GuideConfig) ProtoMessage() {}
|
||||
|
||||
func (x *GuideConfig) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_proto_msgTypes[85]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use GuideConfig.ProtoReflect.Descriptor instead.
|
||||
func (*GuideConfig) Descriptor() ([]byte, []int) {
|
||||
return file_common_proto_rawDescGZIP(), []int{85}
|
||||
}
|
||||
|
||||
func (x *GuideConfig) GetPlatform() string {
|
||||
if x != nil {
|
||||
return x.Platform
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *GuideConfig) GetOn() int32 {
|
||||
if x != nil {
|
||||
return x.On
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *GuideConfig) GetSkip() int32 {
|
||||
if x != nil {
|
||||
return x.Skip
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_common_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_common_proto_rawDesc = []byte{
|
||||
|
@ -9319,10 +9383,15 @@ var file_common_proto_rawDesc = []byte{
|
|||
0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x42, 0x26,
|
||||
0x5a, 0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f,
|
||||
0x77, 0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x54, 0x79, 0x70, 0x65, 0x49, 0x64, 0x22, 0x4d,
|
||||
0x0a, 0x0b, 0x47, 0x75, 0x69, 0x64, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a,
|
||||
0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x08, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x4f, 0x6e, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6b, 0x69,
|
||||
0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6b, 0x69, 0x70, 0x42, 0x26, 0x5a,
|
||||
0x24, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
|
||||
0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x77,
|
||||
0x65, 0x62, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -9337,7 +9406,7 @@ func file_common_proto_rawDescGZIP() []byte {
|
|||
return file_common_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 93)
|
||||
var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 94)
|
||||
var file_common_proto_goTypes = []interface{}{
|
||||
(*MysqlDbSetting)(nil), // 0: webapi.MysqlDbSetting
|
||||
(*MongoDbSetting)(nil), // 1: webapi.MongoDbSetting
|
||||
|
@ -9424,30 +9493,31 @@ var file_common_proto_goTypes = []interface{}{
|
|||
(*AwardLogData)(nil), // 82: webapi.AwardLogData
|
||||
(*AwardLogInfo)(nil), // 83: webapi.AwardLogInfo
|
||||
(*AnnouncerLogInfo)(nil), // 84: webapi.AnnouncerLogInfo
|
||||
nil, // 85: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 86: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 87: webapi.ItemShop.AwardEntry
|
||||
nil, // 88: webapi.VIPcfg.AwardEntry
|
||||
nil, // 89: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 90: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 91: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 92: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 93: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 94: server.DB_GameItem
|
||||
(*GuideConfig)(nil), // 85: webapi.GuideConfig
|
||||
nil, // 86: webapi.Platform.BindTelRewardEntry
|
||||
nil, // 87: webapi.PlayerData.RankScoreEntry
|
||||
nil, // 88: webapi.ItemShop.AwardEntry
|
||||
nil, // 89: webapi.VIPcfg.AwardEntry
|
||||
nil, // 90: webapi.VIPcfg.Privilege7Entry
|
||||
nil, // 91: webapi.ActInviteConfig.PayScoreEntry
|
||||
nil, // 92: webapi.SkinLevel.UpItemEntry
|
||||
nil, // 93: webapi.SkinItem.UnlockParamEntry
|
||||
(*server.DB_GameFree)(nil), // 94: server.DB_GameFree
|
||||
(*server.DB_GameItem)(nil), // 95: server.DB_GameItem
|
||||
}
|
||||
var file_common_proto_depIdxs = []int32{
|
||||
2, // 0: webapi.Platform.Leaderboard:type_name -> webapi.RankSwitch
|
||||
3, // 1: webapi.Platform.ClubConfig:type_name -> webapi.ClubConfig
|
||||
4, // 2: webapi.Platform.ThirdGameMerchant:type_name -> webapi.ThirdGame
|
||||
85, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
86, // 3: webapi.Platform.BindTelReward:type_name -> webapi.Platform.BindTelRewardEntry
|
||||
6, // 4: webapi.GameConfigGlobal.GameStatus:type_name -> webapi.GameStatus
|
||||
93, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
94, // 5: webapi.GameFree.DbGameFree:type_name -> server.DB_GameFree
|
||||
8, // 6: webapi.PlatformGameConfig.DbGameFrees:type_name -> webapi.GameFree
|
||||
0, // 7: webapi.PlatformDbConfig.Mysql:type_name -> webapi.MysqlDbSetting
|
||||
1, // 8: webapi.PlatformDbConfig.MongoDb:type_name -> webapi.MongoDbSetting
|
||||
1, // 9: webapi.PlatformDbConfig.MongoDbLog:type_name -> webapi.MongoDbSetting
|
||||
93, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
86, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
94, // 10: webapi.GameConfigGroup.DbGameFree:type_name -> server.DB_GameFree
|
||||
87, // 11: webapi.PlayerData.RankScore:type_name -> webapi.PlayerData.RankScoreEntry
|
||||
32, // 12: webapi.PlayerData.Items:type_name -> webapi.ItemInfo
|
||||
14, // 13: webapi.PlayerData.RoleUnlockList:type_name -> webapi.ModInfo
|
||||
14, // 14: webapi.PlayerData.PetUnlockList:type_name -> webapi.ModInfo
|
||||
|
@ -9459,7 +9529,7 @@ var file_common_proto_depIdxs = []int32{
|
|||
26, // 20: webapi.ExchangeShop.TelData:type_name -> webapi.TelChargeData
|
||||
25, // 21: webapi.ExchangeShopList.List:type_name -> webapi.ExchangeShop
|
||||
29, // 22: webapi.ExchangeShopList.Weight:type_name -> webapi.ShopWeight
|
||||
87, // 23: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
88, // 23: webapi.ItemShop.Award:type_name -> webapi.ItemShop.AwardEntry
|
||||
30, // 24: webapi.ItemShopList.List:type_name -> webapi.ItemShop
|
||||
32, // 25: webapi.MatchInfoAward.ItemId:type_name -> webapi.ItemInfo
|
||||
33, // 26: webapi.GameMatchDate.Award:type_name -> webapi.MatchInfoAward
|
||||
|
@ -9480,12 +9550,12 @@ var file_common_proto_depIdxs = []int32{
|
|||
38, // 41: webapi.WelfareSpree.Item:type_name -> webapi.WelfareDate
|
||||
48, // 42: webapi.WelfareFirstPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
48, // 43: webapi.WelfareContinuousPayDataList.List:type_name -> webapi.WelfareSpree
|
||||
88, // 44: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
89, // 45: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
89, // 44: webapi.VIPcfg.Award:type_name -> webapi.VIPcfg.AwardEntry
|
||||
90, // 45: webapi.VIPcfg.Privilege7:type_name -> webapi.VIPcfg.Privilege7Entry
|
||||
51, // 46: webapi.VIPcfgDataList.List:type_name -> webapi.VIPcfg
|
||||
38, // 47: webapi.ChessRankConfig.Item:type_name -> webapi.WelfareDate
|
||||
55, // 48: webapi.ChessRankcfgData.Datas:type_name -> webapi.ChessRankConfig
|
||||
90, // 49: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
91, // 49: webapi.ActInviteConfig.PayScore:type_name -> webapi.ActInviteConfig.PayScoreEntry
|
||||
62, // 50: webapi.ActInviteConfig.Awards1:type_name -> webapi.RankAward
|
||||
62, // 51: webapi.ActInviteConfig.Awards2:type_name -> webapi.RankAward
|
||||
62, // 52: webapi.ActInviteConfig.Awards3:type_name -> webapi.RankAward
|
||||
|
@ -9502,12 +9572,12 @@ var file_common_proto_depIdxs = []int32{
|
|||
69, // 63: webapi.DiamondLotteryData.Info:type_name -> webapi.DiamondLotteryInfo
|
||||
70, // 64: webapi.DiamondLotteryData.Players:type_name -> webapi.DiamondLotteryPlayers
|
||||
72, // 65: webapi.DiamondLotteryConfig.LotteryData:type_name -> webapi.DiamondLotteryData
|
||||
94, // 66: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
95, // 66: webapi.ItemConfig.Items:type_name -> server.DB_GameItem
|
||||
32, // 67: webapi.RankAwardInfo.Item:type_name -> webapi.ItemInfo
|
||||
75, // 68: webapi.RankTypeInfo.Award:type_name -> webapi.RankAwardInfo
|
||||
76, // 69: webapi.RankTypeConfig.Info:type_name -> webapi.RankTypeInfo
|
||||
91, // 70: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
92, // 71: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
92, // 70: webapi.SkinLevel.UpItem:type_name -> webapi.SkinLevel.UpItemEntry
|
||||
93, // 71: webapi.SkinItem.UnlockParam:type_name -> webapi.SkinItem.UnlockParamEntry
|
||||
78, // 72: webapi.SkinItem.Levels:type_name -> webapi.SkinLevel
|
||||
79, // 73: webapi.SkinConfig.Items:type_name -> webapi.SkinItem
|
||||
82, // 74: webapi.AwardLogConfig.AwardLog:type_name -> webapi.AwardLogData
|
||||
|
@ -10546,6 +10616,18 @@ func file_common_proto_init() {
|
|||
return nil
|
||||
}
|
||||
}
|
||||
file_common_proto_msgTypes[85].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GuideConfig); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
|
@ -10553,7 +10635,7 @@ func file_common_proto_init() {
|
|||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_common_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 93,
|
||||
NumMessages: 94,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
|
|
@ -881,3 +881,10 @@ message AnnouncerLogInfo{
|
|||
int32 ItemId = 4; //获得物品ID
|
||||
int32 TypeId = 5; //1-话费 2-实物
|
||||
}
|
||||
|
||||
// etcd /game/guide_config
|
||||
message GuideConfig {
|
||||
string Platform = 1; // 平台
|
||||
int32 On = 2; // 引导开关 1开启 2关闭
|
||||
int32 Skip = 3; // 引导跳过开关 1开启 2关闭
|
||||
}
|
2
public
2
public
|
@ -1 +1 @@
|
|||
Subproject commit 13589ad17018a4a9d50fdc9d8223e3ccf492a0ce
|
||||
Subproject commit 677abd66845fe40919e38580a3e269b5343b8b1c
|
31
worldsrv/aaa
31
worldsrv/aaa
|
@ -1,31 +0,0 @@
|
|||
71001,71002,71003,72001,72002,72003,72004,72005,73001,73002,73003,73004,74001,74002,74003,74004,74005,74006,75001,75002,75003,75004,75005,75006,76001,76002,76003,76004,76005,76006,77001,77002,77003,77004,77005,78001,78002,78003,79001,79002,79003,79004,79005,77006
|
||||
|
||||
5001,5002,5003,5004,5005,5006
|
||||
|
||||
"79003":NumberLong(1),
|
||||
"73001":NumberLong(24),
|
||||
"74006":NumberLong(1),
|
||||
"79005":NumberLong(1),
|
||||
"76006":NumberLong(16),
|
||||
"74003":NumberLong(1),
|
||||
"72004":NumberLong(1),
|
||||
"73004":NumberLong(1)
|
||||
|
||||
|
||||
"30008":NumberLong(712),
|
||||
"30009":NumberLong(97),
|
||||
"30010":NumberLong(20),
|
||||
"30011":NumberLong(3)
|
||||
|
||||
|
||||
"5001":NumberLong(2),
|
||||
"5002":NumberLong(18),
|
||||
"5003":NumberLong(6),
|
||||
"5004":NumberLong(13),
|
||||
"5005":NumberLong(13),
|
||||
"5006":NumberLong(4)
|
||||
|
||||
30008 712
|
||||
30009 97
|
||||
30010 20
|
||||
30011 3
|
|
@ -3027,6 +3027,117 @@ func CSPopUpWindowsConfig(s *netlib.Session, packetId int, data interface{}, sid
|
|||
}), "Api_PopupWindowsConfig").Start()
|
||||
return nil
|
||||
}
|
||||
|
||||
func CSUpdateAttribute(s *netlib.Session, packetId int, data interface{}, sid int64) error {
|
||||
logger.Logger.Tracef("CSUpdateAttribute %v", data)
|
||||
p := PlayerMgrSington.GetPlayer(sid)
|
||||
if p == nil {
|
||||
return nil
|
||||
}
|
||||
msg, ok := data.(*player_proto.CSUpdateAttribute)
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
||||
stepId := p.GuideStep + 1
|
||||
pack := &player_proto.SCUpdateAttribute{
|
||||
OpRetCode: player_proto.OpResultCode_OPRC_Error,
|
||||
Tp: msg.GetTp(),
|
||||
Param: msg.GetParam(),
|
||||
}
|
||||
|
||||
send := func() {
|
||||
p.SendToClient(int(player_proto.PlayerPacketID_PACKET_SCUpdateAttribute), pack)
|
||||
logger.Logger.Tracef("SCUpdateAttribute %v", pack)
|
||||
// 日志
|
||||
if pack.OpRetCode == player_proto.OpResultCode_OPRC_Sucess {
|
||||
switch msg.GetTp() {
|
||||
case common.AttributeGuideStep, common.AttributeGuideSkip:
|
||||
d := model.CustomData{
|
||||
GuideTp: msg.GetTp(),
|
||||
N: int64(stepId),
|
||||
}
|
||||
b, _ := json.Marshal(d)
|
||||
LogChannelSingleton.WriteLog(&model.ClientLogMysql{
|
||||
Data: string(b),
|
||||
Platform: p.Platform,
|
||||
Snid: p.SnId,
|
||||
Ts: time.Now().Unix(),
|
||||
CreateTs: p.CreateTime.Unix(),
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch msg.GetTp() {
|
||||
case common.AttributeGuideStep:
|
||||
if len(msg.GetParam()) == 0 || msg.GetParam()[0] == 0 || p.GuideStep < 0 {
|
||||
return nil
|
||||
}
|
||||
if PlatformMgrSingleton.GetConfig(p.Platform).GuideConfig.GetOn() != common.On {
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Guide_Close
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
if p.GuideStep >= model.GameParamData.GuideStepMaxNum {
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_GuideStep_End
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
if int64(p.GuideStep) >= msg.GetParam()[0] {
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_GuideStep_Finish
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
if int64(p.GuideStep)+1 < msg.GetParam()[0] {
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_GuideStep_Front
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
p.GuideStep = int32(msg.GetParam()[0])
|
||||
stepId = p.GuideStep
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
// 获得10v卡
|
||||
if p.GuideStep == 2 {
|
||||
BagMgrSingleton.AddItemsV2(&ItemParam{
|
||||
P: p,
|
||||
Change: []*Item{
|
||||
{
|
||||
ItemId: common.ItemIDVCard,
|
||||
ItemNum: 10,
|
||||
},
|
||||
},
|
||||
GainWay: common.GainWayGuide,
|
||||
Operator: "system",
|
||||
Remark: "新手引导奖励",
|
||||
})
|
||||
}
|
||||
return nil
|
||||
case common.AttributeGuideSkip:
|
||||
if PlatformMgrSingleton.GetConfig(p.Platform).GuideConfig.GetSkip() != common.On {
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Guide_SkipClose
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
if p.GuideStep >= 0 && p.GuideStep < model.GameParamData.GuideStepMaxNum {
|
||||
p.GuideStep = -1 // 跳过引导为 -1
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
case common.AttributeGuideTest:
|
||||
if !common.Config.IsDevMode {
|
||||
return nil
|
||||
}
|
||||
p.GuideStep = int32(msg.GetParam()[0])
|
||||
pack.OpRetCode = player_proto.OpResultCode_OPRC_Sucess
|
||||
send()
|
||||
return nil
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
// 用户信息
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CS_PLAYERDATA), player_proto.CSPlayerData{}, CSPlayerData)
|
||||
|
@ -3058,4 +3169,6 @@ func init() {
|
|||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSAwardLog), player_proto.CS_AwardLog{}, CSAwardLog)
|
||||
//弹窗配置
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSPopUpWindowsConfig), player_proto.CSPopUpWindowsConfig{}, CSPopUpWindowsConfig)
|
||||
// 更新属性;新手引导阶段
|
||||
common.Register(int(player_proto.PlayerPacketID_PACKET_CSUpdateAttribute), player_proto.CSUpdateAttribute{}, CSUpdateAttribute)
|
||||
}
|
||||
|
|
|
@ -611,6 +611,8 @@ func (this *BagMgr) VerifyUpJybInfo(p *Player, args *model.VerifyUpJybInfoArgs)
|
|||
LogChannelSingleton.WriteMQData(model.GenerateSystemFreeGive(p.SnId, p.Name, p.Platform, p.Channel, model.SystemFreeGive_GiveType_ActJybAward, model.SystemFreeGive_CoinType_Diamond, int64(jyb.Award.Diamond)))
|
||||
}
|
||||
}
|
||||
// 领取日志
|
||||
|
||||
p.dirty = true
|
||||
pack.GainItem.Coin = jyb.Award.Coin
|
||||
pack.GainItem.Diamond = jyb.Award.Diamond
|
||||
|
|
|
@ -88,6 +88,8 @@ func init() {
|
|||
etcd.Register(etcd.ETCDKEY_RANK_TYPE, webapi.RankTypeConfig{}, platformConfigEvent)
|
||||
//获奖记录配置
|
||||
etcd.Register(etcd.ETCDKEY_AWARD_CONFIG, webapi.AwardLogConfig{}, platformConfigEvent)
|
||||
// 新手引导
|
||||
etcd.Register(etcd.ETCDKEY_GUIDE, webapi.GuideConfig{}, platformConfigEvent)
|
||||
}
|
||||
|
||||
func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
@ -321,10 +323,16 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
|||
PlatformMgrSingleton.GetConfig(config.Platform).RankTypeConfig = config
|
||||
case *webapi.AwardLogConfig:
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).AwardLogConfig = config
|
||||
case *webapi.GuideConfig:
|
||||
PlatformMgrSingleton.GetConfig(config.Platform).GuideConfig = config
|
||||
default:
|
||||
logger.Logger.Errorf("etcd completeKey:%s, Not processed", completeKey)
|
||||
}
|
||||
|
||||
PlatformMgrSingleton.GetConfig("1").GuideConfig = &webapi.GuideConfig{
|
||||
Platform: "1",
|
||||
On: common.On,
|
||||
Skip: common.On,
|
||||
}
|
||||
}
|
||||
|
||||
func handlerEvent(ctx context.Context, completeKey string, isInit bool, event *clientv3.Event, data interface{}) {
|
||||
|
|
|
@ -69,4 +69,5 @@ func init() {
|
|||
LogChannelSingleton.RegisterLogCName(mq.BackSystemPermitExchange, &model.BackendPermitExchange{})
|
||||
LogChannelSingleton.RegisterLogCName(mq.BackSystemPermitJoin, &model.BackendPermitJoin{})
|
||||
LogChannelSingleton.RegisterLogCName(mq.BackSystemPermitTask, &model.BackendPermitTask{})
|
||||
LogChannelSingleton.RegisterLogCName(mq.BackClientLog, &model.ClientLogMysql{})
|
||||
}
|
||||
|
|
|
@ -3022,6 +3022,7 @@ func (this *Player) SendPlayerInfo() {
|
|||
VipShopRefreshCount: proto.Int32(this.VipShopRefreshCount),
|
||||
Signature: this.Signature,
|
||||
Age: this.Age,
|
||||
GuideStep: this.GuideStep,
|
||||
},
|
||||
}
|
||||
if this.Roles != nil {
|
||||
|
@ -3090,6 +3091,8 @@ func (this *Player) SendPlayerInfo() {
|
|||
}
|
||||
this.SCItems()
|
||||
//this.SendJackpotInfo()
|
||||
// 引导配置
|
||||
this.SCGuide()
|
||||
}
|
||||
|
||||
//func (this *Player) SendJackpotInfo() {
|
||||
|
@ -4867,3 +4870,13 @@ func (this *Player) AutoSkinUnlock() {
|
|||
func (this *Player) GetSkillAdd(id int32) int32 {
|
||||
return this.GetSkillAdd2(id, PlatformMgrSingleton.ConfigMgr)
|
||||
}
|
||||
|
||||
func (this *Player) SCGuide() {
|
||||
cfg := PlatformMgrSingleton.GetConfig(this.Platform).GuideConfig
|
||||
pack := &playerproto.SCGuideConfig{
|
||||
On: cfg.GetOn(),
|
||||
Skip: cfg.GetSkip(),
|
||||
}
|
||||
this.SendToClient(int(playerproto.PlayerPacketID_PACKET_SCGuideConfig), pack)
|
||||
logger.Logger.Tracef("SCGuideConfig: %v", pack)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue