Commit 812893939abfbcc86da814c0e71e8c916ddc560a
1 parent
02d11cb7
update
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
cmd/gameserver/action/RoleAction.go
| ... | ... | @@ -115,7 +115,7 @@ func HeroEquipReferRpc(role *models.RoleModel, msg components.IMessage) (int32, |
| 115 | 115 | var outHero, inHero *models.HeroModel |
| 116 | 116 | inEquip := csvdata.Get().TbEquipmentData.Get(equip.Equip.GetTbId()) |
| 117 | 117 | if !req.Refer { |
| 118 | - if h1 == nil { | |
| 118 | + if h1 != nil { | |
| 119 | 119 | outHero = h1.(*models.HeroModel) |
| 120 | 120 | outHero.UpdateEquipment(equip.Equip.Id, 0) |
| 121 | 121 | } |
| ... | ... | @@ -123,6 +123,7 @@ func HeroEquipReferRpc(role *models.RoleModel, msg components.IMessage) (int32, |
| 123 | 123 | outHero = h2.(*models.HeroModel) |
| 124 | 124 | outHero.UpdateEquipment(equip.Equip.Id, 0) |
| 125 | 125 | } |
| 126 | + equip.SetProperty("heroid", "") | |
| 126 | 127 | |
| 127 | 128 | } else { |
| 128 | 129 | if h1 == nil { | ... | ... |
cmd/gameserver/service/agent.go
| ... | ... | @@ -110,7 +110,7 @@ func (c *Agent) SendMsg(errCode int32, cmd uint32, msg interface{}) error { |
| 110 | 110 | |
| 111 | 111 | func (c *Agent) OnMessage(msg components.IMessage) error { |
| 112 | 112 | atomic.StoreInt64(&c.lastHeartCheckTime, common.Timex()) |
| 113 | - logger.Debug("req protocolID: %d", msg.GetHeader().GetMsgID()) | |
| 113 | + logger.Debug("req protocolID: %d, %s", msg.GetHeader().GetMsgID(), msg.GetData()) | |
| 114 | 114 | //heart |
| 115 | 115 | if msg.GetHeader().GetMsgID() == uint32(pb.ProtoCode_HeartReq) { |
| 116 | 116 | return nil | ... | ... |