上传武官柱子解锁优化

This commit is contained in:
liwei1dao 2023-09-12 11:53:51 +08:00
parent 4f4acd6304
commit a60bbac8f4
2 changed files with 17 additions and 8 deletions

View File

@ -211,6 +211,7 @@ func (this *Practice) OpenCmdNotice(uid string, keys ...string) {
) )
if !this.IsCross() { if !this.IsCross() {
for _, v := range keys { for _, v := range keys {
if v == "practice_ pillar1" || v == "practice_ pillar2" || v == "practice_ pillar3" {
err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(), err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(),
comm.Service_Worker, string(comm.RPC_ModulePracticeUnLockPillar), comm.Service_Worker, string(comm.RPC_ModulePracticeUnLockPillar),
&pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{}) &pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{})
@ -219,13 +220,16 @@ func (this *Practice) OpenCmdNotice(uid string, keys ...string) {
return return
} }
} }
}
} else { } else {
for _, v := range keys { for _, v := range keys {
if v == "practice_ pillar1" || v == "practice_ pillar2" || v == "practice_ pillar3" {
this.RPC_ModulePracticeUnLockPillar(context.Background(), &pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{}) this.RPC_ModulePracticeUnLockPillar(context.Background(), &pb.RPCGeneralReqA2{Param1: uid, Param2: v}, &pb.EmptyResp{})
} }
} }
} }
}
func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) { func (this *Practice) ChallengeResults(bid, red, bule string, winSide int32) {
this.Debug("ChallengeResults", this.Debug("ChallengeResults",
@ -383,7 +387,10 @@ func (this *Practice) RPC_ModulePracticeUnLockPillar(ctx context.Context, args *
}) })
this.atlas.CheckActivatePandaAtlasCollect(args.Param1, "100001") this.atlas.CheckActivatePandaAtlasCollect(args.Param1, "100001")
break break
default:
return
} }
_session, _ := this.GetUserSession(args.Param1) _session, _ := this.GetUserSession(args.Param1)
go this.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype152, 1)) go this.ModuleBuried.TriggerBuried(_session, comm.GetBuriedParam(comm.Rtype152, 1))
return return

View File

@ -33,7 +33,9 @@ func (this *ModelSession) Start() (err error) {
// 获取用户 // 获取用户
func (this *ModelSession) getUserSession(uid string) (user *pb.CacheUser) { func (this *ModelSession) getUserSession(uid string) (user *pb.CacheUser) {
user = &pb.CacheUser{} user = &pb.CacheUser{
Uid: uid,
}
if err := this.GetListObj(comm.RDS_EMPTY, uid, user); err != nil { if err := this.GetListObj(comm.RDS_EMPTY, uid, user); err != nil {
if err != mongo.ErrNoDocuments { if err != mongo.ErrNoDocuments {
this.module.Errorln(err) this.module.Errorln(err)