上传武馆状态同步
This commit is contained in:
parent
feb0564e27
commit
d285bad3a9
@ -88,6 +88,17 @@ func (this *apiComp) Loot(session comm.IUserSession, req *pb.PracticeLootReq) (c
|
|||||||
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
this.module.modelPandata.Change(session.GetUserId(), map[string]interface{}{
|
||||||
"knapsack": room.Knapsack,
|
"knapsack": room.Knapsack,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if _session, ok := this.module.GetUserSession(req.Friend); ok {
|
||||||
|
_session.SendMsg(string(this.module.GetType()), "rommchange", &pb.PracticeRommChangePush{Info: froom})
|
||||||
|
if err = _session.Push(); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
}
|
||||||
|
this.module.PutUserSession(_session)
|
||||||
|
} else {
|
||||||
|
this.module.PutUserSession(_session)
|
||||||
|
}
|
||||||
|
|
||||||
session.SendMsg(string(this.module.GetType()), "loot", &pb.PracticeLootResp{Friend: req.Friend, Pillar: froom.Pillarf})
|
session.SendMsg(string(this.module.GetType()), "loot", &pb.PracticeLootResp{Friend: req.Friend, Pillar: froom.Pillarf})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,17 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.PracticeReceiveR
|
|||||||
this.module.modelPandata.Change(req.Friend, map[string]interface{}{
|
this.module.modelPandata.Change(req.Friend, map[string]interface{}{
|
||||||
filed: pillar,
|
filed: pillar,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if _session, ok := this.module.GetUserSession(req.Friend); ok {
|
||||||
|
_session.SendMsg(string(this.module.GetType()), "rommchange", &pb.PracticeRommChangePush{Info: froom})
|
||||||
|
|
||||||
|
if err = _session.Push(); err != nil {
|
||||||
|
this.module.Errorln(err)
|
||||||
|
}
|
||||||
|
this.module.PutUserSession(_session)
|
||||||
|
} else {
|
||||||
|
this.module.PutUserSession(_session)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype135, minutes))
|
go this.module.ModuleRtask.TriggerTask(session.GetUserId(), comm.GettaskParam(comm.Rtype135, minutes))
|
||||||
session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack})
|
session.SendMsg(string(this.module.GetType()), "receive", &pb.PracticeReceiveResp{Pillar: pillar, Knapsack: room.Knapsack})
|
||||||
|
Loading…
Reference in New Issue
Block a user