Commit b1b91cf6b15e9e109d8cda74811166c11ec14b99

Authored by zhangqijia
1 parent 17c74a17

fix: ItemTypeInterval limit 10000 -> 100000

cmd/gameserver/action/EmailAction.go
... ... @@ -23,7 +23,7 @@ func EmailListRpc(role *models.RoleModel, msg components.IMessage) (int32, inter
23 23  
24 24 // load
25 25 emails := role.LoadEmails()
26   - return 0, emails
  26 + return 0, &pb.EmailListRsp{Emails: emails}
27 27 }
28 28  
29 29 func GetEmailPBAttachMents(email *pb.Email) string {
... ... @@ -65,7 +65,7 @@ func EmailDrawRpc(role *models.RoleModel, msg components.IMessage) (int32, inter
65 65 continue
66 66 }
67 67 email := models.NewEmailModelPB(e)
68   - email.SetProperty("status", 2)
  68 + email.SetProperty("status", int32(2))
69 69 email.Log(role, 2)
70 70 email.Update()
71 71 ids = append(ids, e.Id)
... ... @@ -93,8 +93,11 @@ func EmailCheckRpc(role *models.RoleModel, msg components.IMessage) (int32, inte
93 93 if err := email.Load(); err != nil {
94 94 return 2, nil
95 95 }
  96 + if email.Data.Status != 0 {
  97 + return 3, nil
  98 + }
96 99  
97   - email.SetProperty("status", 1)
  100 + email.SetProperty("status", int32(1))
98 101 email.Log(role, 1)
99 102 email.Update()
100 103 return 0, nil
... ...
common/const.go
... ... @@ -54,7 +54,7 @@ const (
54 54 )
55 55  
56 56 const (
57   - ItemTypeInterval = 10000
  57 + ItemTypeInterval = 100000
58 58 ItemType = 0
59 59 EquipType = 1
60 60 )
... ...
models/rolePlugin.go
... ... @@ -346,7 +346,8 @@ func (m *RoleModel) DelExpireEmail() error {
346 346 for _, email := range emails {
347 347 ids = append(ids, email.Id)
348 348 }
349   - filter = append(filter, bson.E{Key: "$in", Value: ids})
  349 +
  350 + filter = append(filter, bson.E{"id", bson.D{{"$in", ids}}})
350 351 err = mongoproxy.DelMany("email", filter)
351 352 if err != nil {
352 353 return err
... ...