From 84be8df2b0b02445138483a7da78a85b9c856275 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 9 May 2024 16:57:43 +0800 Subject: [PATCH] 1 --- server/mailserver/mail/mail.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/mailserver/mail/mail.go b/server/mailserver/mail/mail.go index c3a34ba2..e3464a40 100644 --- a/server/mailserver/mail/mail.go +++ b/server/mailserver/mail/mail.go @@ -72,7 +72,7 @@ func (this *mail) IsValid(hum common.Player) bool { hum.GetRegisterTime() >= this.userRegStartTime && hum.GetRegisterTime() <= this.userRegEndTime { if this.mailType == constant.MAIL_TYPE_GROUP { - return true + return this.isMailUser(hum.GetAccountId()) } else if this.mailType == constant.MAIL_TYPE_ALL { return true } @@ -152,7 +152,13 @@ func (this *mail) traverseUserGroup(cb func(int64, *userGroup) bool) { if v != nil { return cb(k.(int64), v.(*userGroup)) } else { - return cb(k.(int64), nil) + g := _mailMgr.getGroup(k.(int64)) + if g != nil { + p.Store(k, g) + return cb(k.(int64), g) + } else { + return cb(k.(int64), nil) + } } }) }