Commit 0358e23248a52d1aa47bd4a6d2b99326628b70e5

Authored by zhangqijia
1 parent c8509ef6

fix: update notify equipment

Showing 2 changed files with 8 additions and 2 deletions   Show diff stats
cmd/gameserver/action/GmAction.go
... ... @@ -26,6 +26,12 @@ func (gm *GmAction) AddEquip(role *models.RoleModel, properties map[string]inter
26 26 }
27 27 //TODO 验证装备是否存在
28 28  
29   - role.AddEquip(equip)
  29 + if role.GetConn() != nil {
  30 + role.GetConn().CustomChan() <- func() {
  31 + role.AddEquip(equip)
  32 + }
  33 + } else {
  34 + role.AddEquip(equip)
  35 + }
30 36 return 0
31 37 }
... ...
1   -Subproject commit 8ff03d764abd9edccb75c9e21ca5ee9c8981c5e1
  1 +Subproject commit a5d277364ded61191ac3359490a95fd86940cb15
... ...