Merge branch 'develop' of git.pogorockgames.com:mango-games/server/game into develop

This commit is contained in:
sk 2024-06-14 09:31:37 +08:00
commit f1dee4a54a
1 changed files with 16 additions and 18 deletions

View File

@ -4474,7 +4474,6 @@ func (this *Player) CollectTask(taskId int32, num int64) {
// 购买周卡检查
func (this *Player) CheckWeekCard(shopId int32) bool {
srvdata.PBDB_GiftCardMgr.Datas.GetArr()
id := int32(-1)
for _, card := range srvdata.PBDB_GiftCardMgr.Datas.GetArr() {
if card.ShopID == shopId {
@ -4553,10 +4552,8 @@ func (this *Player) GetWeekCardAwary(id int32) {
logger.Logger.Trace("周卡已过期,不能领取!")
return
}
if this.WeekCardAward[id] {
return
}
ret := &player_proto.SCGetWeekCardAwary{}
if !this.WeekCardAward[id] {
//获取周卡奖励
items := data.GetDayRewards()
addItem := []*Item{}
@ -4572,6 +4569,7 @@ func (this *Player) GetWeekCardAwary(id int32) {
//返回消息
this.WeekCardAward[id] = true
ret.WeekCardAward = this.WeekCardAward[id]
}
info := &player_proto.WeekInfo{
Id: id,
WeekCardTime: this.WeekCardTime[id],