This commit is contained in:
aozhiwei 2024-05-10 15:30:05 +08:00
parent 338f311cf4
commit 1f6522b4f4
3 changed files with 3 additions and 3 deletions

View File

@ -95,7 +95,7 @@ func (this *mail) fillMailDto(hum common.Player, p *common.MailDto) bool {
p.Subject = this.subject
p.Content = this.content
//p.Flags
if hum.IsUnread(this) {
if !hum.IsUnread(this) {
p.Flags = 1 << 0
} else {
p.Flags = 0

View File

@ -275,7 +275,7 @@ func (this *mailMgr) getMail(mailId string) common.Mail {
}
func (this *mailMgr) internalGetMail(mailId string) *mail {
if p, ok := this.idHash.Load(mailId); ok {
if p, ok := this.idHash.Load(q5.ToInt64(mailId)); ok {
return p.(*mail)
} else {
return nil

View File

@ -164,7 +164,7 @@ func (this* player) IsReadable(m common.Mail) bool {
func (this* player) IsUnread(m common.Mail) bool {
mi := this.getInbox(m.GetMailId())
if mi != nil {
return mi.state != constant.INBOX_STATE_NONE
return mi.state == constant.INBOX_STATE_NONE
}
return true
}