赛季通行证兑换开关
This commit is contained in:
parent
49bd65a05c
commit
aabf20da2c
|
@ -287,7 +287,7 @@ const (
|
||||||
GainWaySign7Add = 91 // 累计签到进阶奖励获得
|
GainWaySign7Add = 91 // 累计签到进阶奖励获得
|
||||||
GainWayItemChange = 92 //背包内使用道具兑换话费
|
GainWayItemChange = 92 //背包内使用道具兑换话费
|
||||||
GainWayPetSkillLevelUp = 93 //宠物技能升级
|
GainWayPetSkillLevelUp = 93 //宠物技能升级
|
||||||
GainWayPermitAward = 94 // 赛季通行证奖励
|
GainWayPermitAward = 94 // 赛季通行证等级奖励
|
||||||
GainWayItemPermitRank = 95 // 赛季通行证排行奖励
|
GainWayItemPermitRank = 95 // 赛季通行证排行奖励
|
||||||
GainWayPermitExchangeCost = 96 // 赛季通行证兑换消耗
|
GainWayPermitExchangeCost = 96 // 赛季通行证兑换消耗
|
||||||
GainWayPermitExchangeGain = 97 // 赛季通行证兑换获得
|
GainWayPermitExchangeGain = 97 // 赛季通行证兑换获得
|
||||||
|
|
|
@ -111,7 +111,8 @@ const (
|
||||||
SystemFreeGive_GiveType_TaskEveryDay // 每日任务
|
SystemFreeGive_GiveType_TaskEveryDay // 每日任务
|
||||||
SystemFreeGive_GiveType_TaskWeekActive // 周活跃奖励
|
SystemFreeGive_GiveType_TaskWeekActive // 周活跃奖励
|
||||||
SystemFreeGive_GiveType_PermitAward // 赛季通行证奖励
|
SystemFreeGive_GiveType_PermitAward // 赛季通行证奖励
|
||||||
SystemFreeGive_GiveType_TaskPermit // 赛季通行证任务
|
SystemFreeGive_GiveType_TaskPermit // 赛季通行证任务奖励
|
||||||
|
SystemFreeGive_GiveType_TaskPermitRank // 赛季通行证排名奖励
|
||||||
)
|
)
|
||||||
const (
|
const (
|
||||||
SystemFreeGive_CoinType_Coin int32 = iota //金币
|
SystemFreeGive_CoinType_Coin int32 = iota //金币
|
||||||
|
|
|
@ -875,6 +875,9 @@ func GetPermitCanExchange(p *Player, id int32) (bool, int) {
|
||||||
|
|
||||||
for _, v := range channelConfig.GetExchangeConfig() {
|
for _, v := range channelConfig.GetExchangeConfig() {
|
||||||
if v.GetId() == id {
|
if v.GetId() == id {
|
||||||
|
if !v.GetIsShow() {
|
||||||
|
return false, 3
|
||||||
|
}
|
||||||
// 等级
|
// 等级
|
||||||
if level < v.GetLevel() {
|
if level < v.GetLevel() {
|
||||||
return false, 1
|
return false, 1
|
||||||
|
@ -924,6 +927,9 @@ func CSPermitExchangeList(s *netlib.Session, packetid int, data interface{}, sid
|
||||||
pack := &welfare.SCPermitExchangeList{}
|
pack := &welfare.SCPermitExchangeList{}
|
||||||
|
|
||||||
for _, v := range channelConfig.GetExchangeConfig() {
|
for _, v := range channelConfig.GetExchangeConfig() {
|
||||||
|
if !v.GetIsShow() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
var gain, cost []*welfare.PropInfo
|
var gain, cost []*welfare.PropInfo
|
||||||
for _, vv := range v.GetGain() {
|
for _, vv := range v.GetGain() {
|
||||||
gain = append(gain, &welfare.PropInfo{
|
gain = append(gain, &welfare.PropInfo{
|
||||||
|
|
|
@ -252,7 +252,7 @@ func platformConfigEvent(ctx context.Context, completeKey string, isInit bool, e
|
||||||
LogChannelSingleton.WriteLog(&model.BackendPermitCycle{
|
LogChannelSingleton.WriteLog(&model.BackendPermitCycle{
|
||||||
Platform: config.Platform,
|
Platform: config.Platform,
|
||||||
StartTs: st.StartTs,
|
StartTs: st.StartTs,
|
||||||
EndTs: st.EndTs,
|
EndTs: st.EndTs - 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})).StartByExecutor("permit_start_ts")
|
})).StartByExecutor("permit_start_ts")
|
||||||
|
|
|
@ -171,7 +171,7 @@ func (r *PermitMgr) OnDayTimer() {
|
||||||
LogChannelSingleton.WriteLog(&model.BackendPermitCycle{
|
LogChannelSingleton.WriteLog(&model.BackendPermitCycle{
|
||||||
Platform: platform,
|
Platform: platform,
|
||||||
StartTs: se.StartTs,
|
StartTs: se.StartTs,
|
||||||
EndTs: se.EndTs,
|
EndTs: se.EndTs - 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})).StartByExecutor("permit_start_ts")
|
})).StartByExecutor("permit_start_ts")
|
||||||
|
|
|
@ -1133,6 +1133,19 @@ func (this *Player) GetMessageAttach(id string) {
|
||||||
ItemNum: int64(msg.Params[i+1]), // 数量
|
ItemNum: int64(msg.Params[i+1]), // 数量
|
||||||
ObtainTime: time.Now().Unix(),
|
ObtainTime: time.Now().Unix(),
|
||||||
})
|
})
|
||||||
|
if gainWay == common.GainWayItemPermitRank {
|
||||||
|
tp := int32(-1)
|
||||||
|
if msg.Params[i] == common.ItemIDCoin {
|
||||||
|
tp = model.SystemFreeGive_CoinType_Coin
|
||||||
|
} else if msg.Params[i] == common.ItemIDDiamond {
|
||||||
|
tp = model.SystemFreeGive_CoinType_Diamond
|
||||||
|
}
|
||||||
|
if tp != -1 {
|
||||||
|
LogChannelSingleton.WriteMQData(
|
||||||
|
model.GenerateSystemFreeGive(this.SnId, this.Name, this.Platform, this.Channel,
|
||||||
|
model.SystemFreeGive_GiveType_TaskPermitRank, tp, int64(msg.Params[i+1])))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if _, code, _ := BagMgrSingleton.AddItems(this, items, 0, gainWay, "mail", remark, 0, 0, false); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
if _, code, _ := BagMgrSingleton.AddItems(this, items, 0, gainWay, "mail", remark, 0, 0, false); code != bag.OpResultCode_OPRC_Sucess { // 领取失败
|
||||||
logger.Logger.Errorf("CSPlayerSettingHandler AddItems err", code)
|
logger.Logger.Errorf("CSPlayerSettingHandler AddItems err", code)
|
||||||
|
|
Loading…
Reference in New Issue