This commit is contained in:
meixiongfeng 2022-11-18 19:38:05 +08:00
parent 4b77c94fc6
commit 30e38a17d1

View File

@ -458,16 +458,16 @@ func (this *Hero) NoLoginDay(uid string, day int32) {
}
// 检查充值和未登录天数之内抽卡是否抽中
func (this *apiComp) CheckCondition(uid string, drawCount int32) bool {
func (this *Hero) CheckCondition(uid string, drawCount int32) bool {
var (
curCount int32
update map[string]interface{}
)
update = make(map[string]interface{}, 0)
defer this.module.modelRecord.ChangeHeroRecord(uid, update)
record, _ := this.module.modelRecord.GetHeroRecord(uid)
defer this.modelRecord.ChangeHeroRecord(uid, update)
record, _ := this.modelRecord.GetHeroRecord(uid)
if v, ok := record.Condition["recharge"]; ok {
conf := this.module.configure.GetGlobalConf() //.
conf := this.configure.GetGlobalConf() //.
if len(conf.DrawCardRechargeReward) == 2 {
curCount = conf.DrawCardRechargeReward[1]
}
@ -488,7 +488,7 @@ func (this *apiComp) CheckCondition(uid string, drawCount int32) bool {
}
}
if v, ok := record.Condition["login"]; ok {
conf := this.module.configure.GetGlobalConf() //.
conf := this.configure.GetGlobalConf() //.
if len(conf.DrawCardRegressionReward) == 2 {
curCount = conf.DrawCardRegressionReward[1]
}