This commit is contained in:
aozhiwei 2024-04-13 21:24:49 +08:00
parent 44d4690c93
commit 7e782bf715
2 changed files with 15 additions and 1 deletions

View File

@ -11,6 +11,7 @@ type Player interface {
Lock() Lock()
UnLock() UnLock()
GetHashCode() uint32 GetHashCode() uint32
GetAccountId() string
} }
type PlayerMgr interface{ type PlayerMgr interface{

View File

@ -115,7 +115,20 @@ func (this *mailMgr) caDeleteMails(hum common.Player, c *gin.Context) {
} }
func (this *mailMgr) traversePlayerMail(hum common.Player, cb func(*mail) bool) { func (this *mailMgr) traversePlayerMail(hum common.Player, cb func(*mail) bool) {
this.wholeMails.Range(
func (k, v interface {}) bool {
return true
})
this.groupMails.Range(
func (k, v interface {}) bool {
return true
})
if hum, ok := this.personalMails.Load(hum.GetAccountId()); ok {
(hum.(*sync.Map)).Range(
func (k, v interface{}) bool {
return true
})
}
} }
func (this *mailMgr) addMail(m *mail) { func (this *mailMgr) addMail(m *mail) {