1
This commit is contained in:
parent
b893eaed16
commit
c70a922a8c
@ -8,7 +8,7 @@ import (
|
||||
"main/constant"
|
||||
)
|
||||
|
||||
type mail struct {
|
||||
type inbox struct {
|
||||
mailId int64
|
||||
state int32
|
||||
expireTime int32
|
||||
@ -20,11 +20,11 @@ type player struct {
|
||||
sessionId string
|
||||
registerTime int32
|
||||
loaded bool
|
||||
mailHash map[int64]*mail
|
||||
inboxHash map[int64]*inbox
|
||||
}
|
||||
|
||||
func (this *player) init() {
|
||||
this.mailHash = make(map[int64]*mail)
|
||||
this.inboxHash = make(map[int64]*inbox)
|
||||
}
|
||||
|
||||
func (this *player) Lock() {
|
||||
@ -73,11 +73,11 @@ func (this *player) load() {
|
||||
return
|
||||
}
|
||||
for ds.Next() {
|
||||
p := new(mail)
|
||||
p := new(inbox)
|
||||
p.mailId = q5.ToInt64(ds.GetByName("mail_id"))
|
||||
p.state = q5.ToInt32(ds.GetByName("state"))
|
||||
p.expireTime = q5.ToInt32(ds.GetByName("expiretime"))
|
||||
this.mailHash[p.mailId] = p
|
||||
this.inboxHash[p.mailId] = p
|
||||
}
|
||||
this.loaded = true
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user