1
This commit is contained in:
parent
bb7718dae7
commit
619efdb644
@ -35,6 +35,10 @@ func (this *mail) loadFromDb(ds *f5.DataSet) {
|
||||
|
||||
}
|
||||
|
||||
func (this *mail) isType(mailType int32) bool {
|
||||
return this.mailType == mailType
|
||||
}
|
||||
|
||||
func newMail() *mail {
|
||||
p := new(mail)
|
||||
p.init()
|
||||
|
@ -29,6 +29,8 @@ type mailMgr struct {
|
||||
|
||||
func (this *mailMgr) Init() {
|
||||
this.idHash = make(map[int64]*mail)
|
||||
this.allMails = make(map[int64]*mail)
|
||||
this.groupHash = make(map[int64]*userGroup)
|
||||
this.loadMails()
|
||||
}
|
||||
|
||||
@ -80,4 +82,7 @@ func (this *mailMgr) traversePlayerMail(hum common.Player, cb func(*mail) bool)
|
||||
|
||||
func (this *mailMgr) addMail(m *mail) {
|
||||
this.idHash[m.mailId] = m
|
||||
if m.isType(constant.MAIL_TYPE_ALL) {
|
||||
this.allMails[m.mailId] = m
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user