Compare commits

...

5 Commits

Author SHA1 Message Date
sk 168c2cc8c3 比赛场开赛时间判断 2024-06-19 19:04:51 +08:00
sk 9d246dcba3 排位赛赛季信息添加待领取奖励信息 2024-06-18 15:34:26 +08:00
sk a2584b22bc 钻石消耗记录 2024-06-15 18:24:39 +08:00
sk af7572f923 索引优化 2024-06-15 10:33:20 +08:00
sk 2a7ada450a 增加钻石消耗记录类型 2024-06-14 18:35:52 +08:00
22 changed files with 226 additions and 102 deletions

View File

@ -268,6 +268,10 @@ const (
GainWayItemWeekActive = 82 //周活跃奖励
GainWayContinueSign = 83 //累计签到
GainWayBackend = 84 // 后台操作
GainWayBuyCoin = 85 // 商城购买金币
GainWayBuyItem = 86 // 商城购买道具
GainWayBuyWeekCard = 87 // 商城购买周卡
GainWayVipBuyCoin = 88 // vip商城购买金币
)
// 后台选择 金币变化类型 的充值 类型id号起始
@ -753,3 +757,8 @@ const (
ChannelSwitchExchange = 1
ChannelSwitchDropItem = 2
)
// 特殊商品id
const (
ShopIdWeekCard = 970001 // 周卡
)

View File

@ -1,5 +1,5 @@
{
"NewPlayerCoin":1000000,
"NewPlayerCoin":100000000,
"UpgradeAccountGiveCoin":0,
"LogBatchWriteCount":1024,
"LogBatchWriteInterval":1,

View File

@ -30,8 +30,9 @@ func CoinLogsCollection(plt string) *mongo.Collection {
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"seqno"}, Background: true, Sparse: true})
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"cointype"}, Background: true, Sparse: true})
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"channel"}, Background: true, Sparse: true})
c_coinlogrec.EnsureIndex(mgo.Index{Key: []string{"-ts", "logtype", "cointype", "channel"}, Background: true, Sparse: true})
}
return c_coinlogrec
}

View File

@ -18,14 +18,16 @@ func GameDetailedLogsCollection(plt string) *mongo.Collection {
if s != nil {
c_gamedetailed, first := s.DB().C(model.GameDetailedLogCollName)
if first {
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"platform"}, Background: true, Sparse: true}) // 兼容老代码
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"gameid"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"logid"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-time"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"matchid"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-ts", "gameid"}, Background: true, Sparse: true})
c_gamedetailed.EnsureIndex(mgo.Index{Key: []string{"-ts", "gamefreeid"}, Background: true, Sparse: true})
}
return c_gamedetailed
}

View File

@ -21,6 +21,7 @@ func GamePlayerListLogsCollection(plt string) *mongo.Collection {
if s != nil {
c_gameplayerlistlog, first := s.DB().C(model.GamePlayerListLogCollName)
if first {
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"platform"}, Background: true, Sparse: true}) // 兼容老代码
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"snid"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"channel"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"promoter"}, Background: true, Sparse: true})
@ -31,12 +32,15 @@ func GamePlayerListLogsCollection(plt string) *mongo.Collection {
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"gamefreeid"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"gamedetailedlogid"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"ts"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"time"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-time"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"name"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"matchid"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"matchtype"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "gameid"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "gamefreeid"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "snid", "gameid"}, Background: true, Sparse: true})
c_gameplayerlistlog.EnsureIndex(mgo.Index{Key: []string{"-ts", "snid", "gamefreeid"}, Background: true, Sparse: true})
}
return c_gameplayerlistlog
}

View File

@ -445,6 +445,7 @@ func (this *Player) AddCoin(num int64, gainWay int32, syncFlag int, oper, remark
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: this.Platform,
SnID: this.SnId,
Channel: this.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: num,
RemainNum: this.Coin,
@ -529,6 +530,7 @@ func (this *Player) AddCoinAsync(num int64, gainWay int32, notifyC, broadcast bo
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: this.Platform,
SnID: this.SnId,
Channel: this.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: num,
RemainNum: this.Coin,

View File

@ -77,6 +77,7 @@ func NewCoinLog() *CoinLog {
type CoinLogParam struct {
Platform string // 平台id
SnID int32 // 玩家id
Channel string // 渠道
ChangeType int32 // 变化类型 common.BillTypeCoin 金币 common.BillTypeDiamond 钻石
ChangeNum int64 // 变化数量
RemainNum int64 // 余额
@ -92,8 +93,9 @@ type CoinLogParam struct {
func NewCoinLogEx(param *CoinLogParam) *CoinLog {
tNow := time.Now()
cl := NewCoinLog()
cl.SnId = param.SnID
cl.Platform = param.Platform
cl.SnId = param.SnID
cl.Channel = param.Channel
cl.Count = param.ChangeNum
cl.Oper = param.Operator
cl.Remark = param.Remark

View File

@ -79,6 +79,7 @@ type GameParam struct {
CloseChannelSwitch bool //关闭渠道开关功能
BackendTimeLocal int //后台时区
GameStaticsFightVersion int // 对战场统计数据版本
TestRankMatchAward bool // 测试段位奖励领取通知,直接改玩家排位积分使玩家获得奖励
}
var GameParamPath = "../data/gameparam.json"

View File

@ -15,6 +15,7 @@ type RankAward struct {
}
type PlayerRankInfo struct {
LastScore int64 // 上次积分
Score int64 // 积分
Awards []*RankAward // 赛季奖励
}

View File

@ -141,6 +141,7 @@ type SeasonInfo struct {
Score int64 `protobuf:"varint,3,opt,name=Score,proto3" json:"Score,omitempty"` // 积分
LastLv int32 `protobuf:"varint,4,opt,name=LastLv,proto3" json:"LastLv,omitempty"` // 上赛季段位
LastScore int64 `protobuf:"varint,5,opt,name=LastScore,proto3" json:"LastScore,omitempty"` // 上赛季积分
Award *AwardItem `protobuf:"bytes,6,opt,name=Award,proto3" json:"Award,omitempty"` // 奖励列表
}
func (x *SeasonInfo) Reset() {
@ -210,6 +211,13 @@ func (x *SeasonInfo) GetLastScore() int64 {
return 0
}
func (x *SeasonInfo) GetAward() *AwardItem {
if x != nil {
return x.Award
}
return nil
}
// PACKET_RM_SCRMSeasonInfo
type SCRMSeasonInfo struct {
state protoimpl.MessageState
@ -791,78 +799,81 @@ var File_rankmatch_proto protoreflect.FileDescriptor
var file_rankmatch_proto_rawDesc = []byte{
0x0a, 0x0f, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x09, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x22, 0x10, 0x0a, 0x0e,
0x43, 0x53, 0x52, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x78,
0x0a, 0x0a, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02,
0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02,
0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x14, 0x0a, 0x05,
0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f,
0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x4c, 0x76, 0x18, 0x04, 0x20, 0x01,
0x28, 0x05, 0x52, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x4c, 0x76, 0x12, 0x1c, 0x0a, 0x09, 0x4c, 0x61,
0x73, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x4c,
0x61, 0x73, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x6f, 0x0a, 0x0e, 0x53, 0x43, 0x52, 0x4d,
0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x69,
0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x54,
0x69, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x07, 0x53, 0x65, 0x61, 0x73,
0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x61, 0x6e, 0x6b,
0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f,
0x52, 0x07, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x53, 0x52,
0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x49,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x08, 0x52,
0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20,
0x43, 0x53, 0x52, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xa4,
0x01, 0x0a, 0x0a, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a,
0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a,
0x02, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x14, 0x0a,
0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63,
0x6f, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x4c, 0x76, 0x18, 0x04, 0x20,
0x01, 0x28, 0x05, 0x52, 0x06, 0x4c, 0x61, 0x73, 0x74, 0x4c, 0x76, 0x12, 0x1c, 0x0a, 0x09, 0x4c,
0x61, 0x73, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
0x4c, 0x61, 0x73, 0x74, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x41, 0x77, 0x61,
0x72, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x6d,
0x61, 0x74, 0x63, 0x68, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05,
0x41, 0x77, 0x61, 0x72, 0x64, 0x22, 0x6f, 0x0a, 0x0e, 0x53, 0x43, 0x52, 0x4d, 0x53, 0x65, 0x61,
0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x54, 0x69, 0x6d, 0x65, 0x53,
0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09, 0x54, 0x69, 0x6d, 0x65,
0x53, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2f, 0x0a, 0x07, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74,
0x63, 0x68, 0x2e, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x53,
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x53, 0x52, 0x4d, 0x52, 0x61,
0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x54, 0x0a, 0x08, 0x52, 0x61, 0x6e, 0x6b,
0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
0x52, 0x02, 0x4c, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x3b,
0x0a, 0x0e, 0x53, 0x43, 0x52, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
0x12, 0x29, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
0x13, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x52, 0x61, 0x6e, 0x6b,
0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x21, 0x0a, 0x0f, 0x43,
0x53, 0x52, 0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x0e,
0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x22, 0x29,
0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75, 0x6d, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x8d, 0x01, 0x0a, 0x09, 0x41, 0x77,
0x61, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76, 0x18, 0x02, 0x20,
0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18,
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53,
0x63, 0x6f, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72,
0x65, 0x22, 0x3b, 0x0a, 0x0e, 0x53, 0x43, 0x52, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e,
0x66, 0x69, 0x67, 0x12, 0x29, 0x0a, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x13, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x52,
0x61, 0x6e, 0x6b, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x21,
0x0a, 0x0f, 0x43, 0x53, 0x52, 0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69,
0x67, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49,
0x64, 0x22, 0x29, 0x0a, 0x05, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x4e, 0x75,
0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x4e, 0x75, 0x6d, 0x22, 0x8d, 0x01, 0x0a,
0x09, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x4c, 0x76,
0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x28, 0x0a, 0x06, 0x41, 0x77,
0x61, 0x72, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x61, 0x6e,
0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x06, 0x41, 0x77,
0x61, 0x72, 0x64, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x54,
0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69,
0x76, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18,
0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x3b, 0x0a, 0x0f,
0x53, 0x43, 0x52, 0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
0x28, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e,
0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49,
0x74, 0x65, 0x6d, 0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x09, 0x43, 0x53, 0x52,
0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49,
0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x64,
0x22, 0x2f, 0x0a, 0x09, 0x53, 0x43, 0x52, 0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a,
0x04, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64,
0x65, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49,
0x64, 0x2a, 0x8f, 0x02, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12,
0x12, 0x0a, 0x0e, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x5a, 0x45, 0x52,
0x4f, 0x10, 0x00, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d,
0x5f, 0x43, 0x53, 0x52, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10,
0xdc, 0x15, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f,
0x53, 0x43, 0x52, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xdd,
0x15, 0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x43,
0x53, 0x52, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe0, 0x15,
0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x53, 0x43,
0x52, 0x4d, 0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe1, 0x15, 0x12,
0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x43, 0x53, 0x52,
0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe2, 0x15, 0x12,
0x1e, 0x0a, 0x19, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x53, 0x43, 0x52,
0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe3, 0x15, 0x12,
0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x43, 0x53, 0x52,
0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe4, 0x15, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43,
0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x53, 0x43, 0x52, 0x4d, 0x41, 0x77, 0x61, 0x72, 0x64,
0x10, 0xe5, 0x15, 0x42, 0x29, 0x5a, 0x27, 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, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x01, 0x28, 0x05, 0x52, 0x02, 0x4c, 0x76, 0x12, 0x28, 0x0a, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64,
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61,
0x74, 0x63, 0x68, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x52, 0x06, 0x41, 0x77, 0x61, 0x72, 0x64,
0x73, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x54, 0x79, 0x70, 0x65,
0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x54,
0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01,
0x28, 0x03, 0x52, 0x05, 0x53, 0x63, 0x6f, 0x72, 0x65, 0x22, 0x3b, 0x0a, 0x0f, 0x53, 0x43, 0x52,
0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x28, 0x0a, 0x04,
0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x61, 0x6e,
0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x74, 0x65, 0x6d,
0x52, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x09, 0x43, 0x53, 0x52, 0x4d, 0x41, 0x77,
0x61, 0x72, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
0x02, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, 0x18, 0x02,
0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x41, 0x77, 0x61, 0x72, 0x64, 0x49, 0x64, 0x22, 0x2f, 0x0a,
0x09, 0x53, 0x43, 0x52, 0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x43, 0x6f,
0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x64, 0x2a, 0x8f,
0x02, 0x0a, 0x09, 0x52, 0x61, 0x6e, 0x6b, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x12, 0x0a, 0x0e,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x5a, 0x45, 0x52, 0x4f, 0x10, 0x00,
0x12, 0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x43, 0x53,
0x52, 0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xdc, 0x15, 0x12,
0x1d, 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x53, 0x43, 0x52,
0x4d, 0x53, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0xdd, 0x15, 0x12, 0x1d,
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x43, 0x53, 0x52, 0x4d,
0x52, 0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe0, 0x15, 0x12, 0x1d, 0x0a,
0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x53, 0x43, 0x52, 0x4d, 0x52,
0x61, 0x6e, 0x6b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe1, 0x15, 0x12, 0x1e, 0x0a, 0x19,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x43, 0x53, 0x52, 0x4d, 0x41, 0x77,
0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe2, 0x15, 0x12, 0x1e, 0x0a, 0x19,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x53, 0x43, 0x52, 0x4d, 0x41, 0x77,
0x61, 0x72, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x10, 0xe3, 0x15, 0x12, 0x18, 0x0a, 0x13,
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x52, 0x4d, 0x5f, 0x43, 0x53, 0x52, 0x4d, 0x41, 0x77,
0x61, 0x72, 0x64, 0x10, 0xe4, 0x15, 0x12, 0x18, 0x0a, 0x13, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54,
0x5f, 0x52, 0x4d, 0x5f, 0x53, 0x43, 0x52, 0x4d, 0x41, 0x77, 0x61, 0x72, 0x64, 0x10, 0xe5, 0x15,
0x42, 0x29, 0x5a, 0x27, 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, 0x72, 0x61, 0x6e, 0x6b, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -895,15 +906,16 @@ var file_rankmatch_proto_goTypes = []interface{}{
(*SCRMAward)(nil), // 12: rankmatch.SCRMAward
}
var file_rankmatch_proto_depIdxs = []int32{
2, // 0: rankmatch.SCRMSeasonInfo.Seasons:type_name -> rankmatch.SeasonInfo
5, // 1: rankmatch.SCRMRankConfig.Items:type_name -> rankmatch.RankItem
8, // 2: rankmatch.AwardItem.Awards:type_name -> rankmatch.Award
9, // 3: rankmatch.SCRMAwardConfig.List:type_name -> rankmatch.AwardItem
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
9, // 0: rankmatch.SeasonInfo.Award:type_name -> rankmatch.AwardItem
2, // 1: rankmatch.SCRMSeasonInfo.Seasons:type_name -> rankmatch.SeasonInfo
5, // 2: rankmatch.SCRMRankConfig.Items:type_name -> rankmatch.RankItem
8, // 3: rankmatch.AwardItem.Awards:type_name -> rankmatch.Award
9, // 4: rankmatch.SCRMAwardConfig.List:type_name -> rankmatch.AwardItem
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_rankmatch_proto_init() }

View File

@ -29,6 +29,7 @@ message SeasonInfo{
int64 Score = 3; //
int32 LastLv = 4; //
int64 LastScore = 5; //
AwardItem Award = 6; //
}
// PACKET_RM_SCRMSeasonInfo

2
public

@ -1 +1 @@
Subproject commit e26134143eba5c7ced96afc84bde42705a9297be
Subproject commit 363a22034898c87b42588d088a7838134d84dcb6

View File

@ -522,6 +522,7 @@ func _LeaveTransferThird2SystemTask(p *Player) {
coinlogex = model.NewCoinLogEx(&model.CoinLogParam{
Platform: p.Platform,
SnID: p.SnId,
Channel: p.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: amount,
RemainNum: p.Coin + amount,
@ -1162,6 +1163,7 @@ func RefreshTransferThird2SystemTask(p *Player) {
coinlogex = model.NewCoinLogEx(&model.CoinLogParam{
Platform: p.Platform,
SnID: p.SnId,
Channel: p.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: amount,
RemainNum: p.Coin + amount,

View File

@ -1414,6 +1414,7 @@ func (this *CSPlayerRegisterHandler) Process(s *netlib.Session, packetid int, da
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: pi.Platform,
SnID: pi.SnId,
Channel: pi.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: int64(model.GameParamData.NewPlayerCoin),
RemainNum: pi.Coin + int64(model.GameParamData.NewPlayerCoin),

View File

@ -61,6 +61,7 @@ func CSRMSeasonInfo(s *netlib.Session, packetId int, data interface{}, sid int64
pack.Seasons = append(pack.Seasons, info)
}
}
p.SendToClient(int(rankmatch.RankMatch_PACKET_RM_SCRMSeasonInfo), pack)
logger.Logger.Trace("SCTMSeasonInfo:", pack)
return nil
@ -270,6 +271,7 @@ func CSRMAward(s *netlib.Session, packetId int, data interface{}, sid int64) err
Id: d.Award3Id,
Num: d.Award3Num,
})
RankMgrSingleton.CheckShowRed(p.SnId)
}
p.SendToClient(int(rankmatch.RankMatch_PACKET_RM_SCRMAward), pack)

View File

@ -99,9 +99,25 @@ func init() {
if p.IsRob {
RankMgrSingleton.UpdateRobotSeason(p.Platform, p.SnId, scene.dbGameFree.GetRankType(),
msg.GetRankScore()[scene.dbGameFree.GetRankType()], p.Name, p.Sex, p.HeadUrl, p.Coin, p.PlayerData.GetRoleId())
} else {
if model.GameParamData.TestRankMatchAward {
if RankMgrSingleton.playerSeasons[p.SnId] != nil {
if RankMgrSingleton.playerSeasons[p.SnId].RankType == nil {
RankMgrSingleton.playerSeasons[p.SnId].RankType = make(map[int32]*model.PlayerRankInfo)
}
if RankMgrSingleton.playerSeasons[p.SnId].RankType[1] == nil {
RankMgrSingleton.playerSeasons[p.SnId].RankType[1] = &model.PlayerRankInfo{}
}
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].LastScore = 7500
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].Score = 7500
RankMgrSingleton.playerSeasons[p.SnId].RankType[1].Awards = nil
}
RankMgrSingleton.UpdatePlayerSeason(p.SnId, map[int32]int64{1: 10000})
} else {
RankMgrSingleton.UpdatePlayerSeason(p.SnId, msg.GetRankScore())
}
}
}
//更新玩家等级排行榜
LogChannelSingleton.WriteLog(&model.PlayerLevelInfo{

View File

@ -1899,6 +1899,7 @@ func (this *Player) AddDiamond(num, add int64, gainWay int32, oper, remark strin
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: this.Platform,
SnID: this.SnId,
Channel: this.Channel,
ChangeType: common.BillTypeDiamond,
ChangeNum: num,
RemainNum: this.Diamond,
@ -1954,6 +1955,7 @@ func (this *Player) AddCoin(num, add int64, gainWay int32, oper, remark string)
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: this.Platform,
SnID: this.SnId,
Channel: this.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: num,
RemainNum: this.Coin,
@ -2008,6 +2010,7 @@ func (this *Player) AddCoinAsync(num, add int64, gainWay int32, oper, remark str
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: this.Platform,
SnID: this.SnId,
Channel: this.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: num,
RemainNum: this.Coin,
@ -3604,7 +3607,7 @@ func (this *Player) SendShowRed(showType hall_proto.ShowRedCode, showChild, isSh
},
}
proto.SetDefaults(pack)
//logger.Logger.Trace("SCShowRed:", pack)
logger.Logger.Trace("SCShowRed:", pack)
this.SendToClient(int(hall_proto.HallPacketID_PACKET_SC_SHOWRED), pack)
}
@ -4009,6 +4012,42 @@ func (this *Player) SendRankSeason() {
info := &rankmatch.SeasonInfo{Id: k}
info.Lv, info.Score = RankMgrSingleton.GetPlayerRankLV(k, this.SnId)
info.LastLv, info.LastScore = RankMgrSingleton.GetPlayerLastRankLV(k, this.SnId)
se := RankMgrSingleton.GetPlayerSeason(this.SnId)
if se != nil && se.RankType[k] != nil {
if se.RankType[k].LastScore < se.RankType[k].Score {
oldLv := srvdata.RankLevelMgr.GetRankLevel(k, se.RankType[k].LastScore)
if info.Lv > oldLv {
var awards *rankmatch.AwardItem
var maxLv int32 = -1
for _, item := range RankMgrSingleton.GetRankAwardList(k) {
// 1 可领取 2已领取
if info.Lv >= item.Lv {
has := false
// 是否已领取
for _, vv := range v.Awards {
if vv.Id == item.Id {
if vv.Ts > 0 {
has = true
}
break
}
}
if !has {
if item.Lv > maxLv {
awards = item
maxLv = item.Lv
}
}
}
}
if awards != nil {
info.Award = awards
}
}
se.RankType[k].LastScore = se.RankType[k].Score
}
}
pack.Seasons = append(pack.Seasons, info)
}
}

View File

@ -126,6 +126,7 @@ func (this *PlayerRankSeason) CheckNewSeason() {
}
for k, v := range this.RankType {
this.RankType[k].Score = RankMgrSingleton.NewSeasonScore(v.Score)
this.RankType[k].LastScore = this.RankType[k].Score
this.RankType[k].Awards = nil
}
@ -155,6 +156,7 @@ func (this *PlayerRankSeason) Update(rankScore map[int32]int64) {
for k, v := range this.RankType {
if v != nil && v.Score != rankScore[k] {
v.LastScore = v.Score
v.Score = rankScore[k]
this.Dirty = true
this.CheckShowRed(k)
@ -207,10 +209,12 @@ here:
break
}
}
if has {
p := PlayerMgrSington.GetPlayerBySnId(this.SnId)
if p != nil {
if has {
p.SendShowRed(hall_proto.ShowRedCode_RankReward, rankType, 1)
} else {
p.SendShowRed(hall_proto.ShowRedCode_RankReward, rankType, 0)
}
}
}

View File

@ -646,13 +646,28 @@ func (this *ShopMgr) GainShop(shopInfo *model.ShopInfo, p *Player, vipShopId, po
costNum := this.GetCostNum(p, shopInfo, vipShopId)
if shopInfo.Ad <= 0 { //消耗
logger.Logger.Tracef("GainShop ConstType[%v],shopName[%v],costNum[%v]", shopInfo.ConstType, shopName, costNum)
var gainWay int32 = common.GainWay_Shop_Buy
switch shopInfo.Page {
case ShopPageCoin:
gainWay = common.GainWayBuyCoin
case ShopPageGift:
if shopInfo.Id == common.ShopIdWeekCard {
gainWay = common.GainWayBuyWeekCard
}
case ShopPageItem:
gainWay = common.GainWayBuyItem
case ShopPageVip:
gainWay = common.GainWayVipBuyCoin
}
switch shopInfo.ConstType {
case ShopConsumeCoin:
p.AddCoin(-costNum, 0, common.GainWay_Shop_Buy, "sys", shopName)
p.AddCoin(-costNum, 0, gainWay, "sys", shopName)
case ShopConsumeDiamond:
p.AddDiamond(-costNum, 0, common.GainWay_Shop_Buy, "sys", shopName)
p.AddDiamond(-costNum, 0, gainWay, "sys", shopName)
case ShopConsumePhoneScore:
p.AddPhoneScore(-costNum, 0, common.GainWay_Shop_Buy, "sys", shopName)
p.AddPhoneScore(-costNum, 0, gainWay, "sys", shopName)
default:
logger.Logger.Errorf("GainShop ConstType[%v] err", shopInfo.ConstType)
return shop.OpResultCode_OPRC_Error

View File

@ -135,6 +135,7 @@ func (t *TaskLogin) Call(o *basic.Object) interface{} {
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: playerData.Platform,
SnID: playerData.SnId,
Channel: playerData.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: int64(model.GameParamData.NewPlayerCoin),
RemainNum: playerData.Coin + int64(model.GameParamData.NewPlayerCoin),
@ -165,6 +166,7 @@ func (t *TaskLogin) Call(o *basic.Object) interface{} {
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: playerData.Platform,
SnID: playerData.SnId,
Channel: playerData.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: coin,
RemainNum: playerData.Coin + coin,
@ -189,6 +191,7 @@ func (t *TaskLogin) Call(o *basic.Object) interface{} {
log := model.NewCoinLogEx(&model.CoinLogParam{
Platform: playerData.Platform,
SnID: playerData.SnId,
Channel: playerData.Channel,
ChangeType: common.BillTypeDiamond,
ChangeNum: diamond,
RemainNum: playerData.Diamond + diamond,

View File

@ -1616,7 +1616,8 @@ func (this *Tournament) FixMatchTimeStamp(d *webapiproto.GameMatchDate) {
for _, v := range d.MatchTimeWeek {
if v == int32(week) {
stSub := st.Unix() - nowtool.New(st).BeginningOfDay().Unix()
sub := d.MatchTimeStamp[1] - d.MatchTimeStamp[0]
etSub := et.Unix() - nowtool.New(et).BeginningOfDay().Unix()
sub := etSub - stSub
d.MatchTimeStamp[0] = nowtool.New(bTs).BeginningOfDay().Add(time.Duration(stSub) * time.Second).Unix()
d.MatchTimeStamp[1] = d.MatchTimeStamp[0] + sub

View File

@ -898,6 +898,7 @@ func init() {
coinlogex := model.NewCoinLogEx(&model.CoinLogParam{
Platform: pd.Platform,
SnID: member_snid,
Channel: pd.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: coin,
RemainNum: oldGold + coin,
@ -1023,6 +1024,7 @@ func init() {
coinlogex := model.NewCoinLogEx(&model.CoinLogParam{
Platform: pd.Platform,
SnID: member_snid,
Channel: pd.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: coin,
RemainNum: oldGold + coin,
@ -1665,6 +1667,7 @@ func init() {
coinlogex := model.NewCoinLogEx(&model.CoinLogParam{
Platform: player.Platform,
SnID: player.SnId,
Channel: player.Channel,
ChangeType: msg.GetLogType(),
ChangeNum: msg.GetGold(),
RemainNum: remainNum + msg.GetGold(),
@ -1750,6 +1753,7 @@ func init() {
coinlogex := model.NewCoinLogEx(&model.CoinLogParam{
Platform: findPlayer.Platform,
SnID: findPlayer.SnId,
Channel: findPlayer.Channel,
ChangeType: msg.GetLogType(),
ChangeNum: msg.GetGold(),
RemainNum: remainNum + msg.GetGold(),
@ -1871,6 +1875,7 @@ func init() {
coinlogex := model.NewCoinLogEx(&model.CoinLogParam{
Platform: pd.Platform,
SnID: member_snid,
Channel: pd.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: coin + coinEx,
RemainNum: oldGold + coin + coinEx,
@ -1995,6 +2000,7 @@ func init() {
coinlogex := model.NewCoinLogEx(&model.CoinLogParam{
Platform: pd.Platform,
SnID: member_snid,
Channel: pd.Channel,
ChangeType: common.BillTypeCoin,
ChangeNum: coin + coinEx,
RemainNum: oldGold + coin + coinEx,