Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
df8e156e4a
@ -129,7 +129,10 @@ func (this *Practice) AddItems(session comm.IUserSession, items map[string]int32
|
||||
"knapsack": room.Knapsack,
|
||||
})
|
||||
} else {
|
||||
room := &pb.DBPracticeRoom{}
|
||||
room := &pb.DBPracticeRoom{
|
||||
Full: make(map[int32]int32),
|
||||
Knapsack: make(map[string]*pb.DBPracticeRes),
|
||||
}
|
||||
conn, err := db.Cross()
|
||||
if err != nil {
|
||||
this.Errorln(err)
|
||||
@ -166,15 +169,10 @@ func (this *Practice) AddItems(session comm.IUserSession, items map[string]int32
|
||||
id = append(id, k)
|
||||
this.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), k)
|
||||
}
|
||||
// if err = this.modelPandata.refreshnpc(room); err != nil {
|
||||
// this.Errorln(err)
|
||||
// return
|
||||
// }
|
||||
if err = model.Add(session.GetUserId(), room); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
}
|
||||
//this.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), "100001")
|
||||
} else {
|
||||
id = make([]string, 0)
|
||||
for k, _ := range items {
|
||||
@ -187,12 +185,12 @@ func (this *Practice) AddItems(session comm.IUserSession, items map[string]int32
|
||||
id = append(id, k)
|
||||
this.atlas.CheckActivatePandaAtlasCollect(session.GetUserId(), k)
|
||||
}
|
||||
|
||||
}
|
||||
model.Change(session.GetUserId(), map[string]interface{}{
|
||||
"knapsack": room.Knapsack,
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
session.SendMsg(string(this.GetType()), "jxitem", &pb.PracticeJXItemPush{Id: id})
|
||||
return
|
||||
}
|
||||
@ -203,17 +201,6 @@ func (this *Practice) TaskComplete(session comm.IUserSession, taskid int32) {
|
||||
log.Field{Key: "session", Value: session.GetUserId()},
|
||||
log.Field{Key: "taskid", Value: taskid},
|
||||
)
|
||||
// if !this.IsCross() {
|
||||
// err := this.service.AcrossClusterRpcCall(context.Background(), this.GetCrossTag(),
|
||||
// comm.Service_Worker, string(comm.RPC_ModulePracticeUnLockPillar),
|
||||
// &pb.RPCGeneralReqA2{Param1: session.GetUserId(), Param2: fmt.Sprintf("%d", taskid)}, &pb.EmptyResp{})
|
||||
// if err != nil {
|
||||
// this.Errorln(err)
|
||||
// return
|
||||
// }
|
||||
// } else {
|
||||
// this.RPC_ModulePracticeUnLockPillar(context.Background(), &pb.RPCGeneralReqA2{Param1: session.GetUserId(), Param2: fmt.Sprintf("%d", taskid)}, &pb.EmptyResp{})
|
||||
// }
|
||||
}
|
||||
|
||||
func (this *Practice) OpenCmdNotice(session comm.IUserSession, keys ...string) {
|
||||
@ -354,18 +341,9 @@ func (this *Practice) RPC_ModulePracticeUnLockPillar(ctx context.Context, args *
|
||||
log.Field{Key: "key", Value: args.Param2},
|
||||
)
|
||||
var (
|
||||
// configure []*cfg.GamePandamasJsData
|
||||
room *pb.DBPracticeRoom
|
||||
// taskid int64
|
||||
)
|
||||
// if taskid, err = strconv.ParseInt(args.Param2, 10, 64); err != nil {
|
||||
// this.Errorln(err)
|
||||
// return
|
||||
// }
|
||||
// if configure, err = this.configure.getGamePandamasJs(); err != nil {
|
||||
// this.Errorln(err)
|
||||
// return
|
||||
// }
|
||||
|
||||
if room, err = this.modelPandata.queryUserMartialhall(args.Param1); err != nil {
|
||||
this.Errorln(err)
|
||||
return
|
||||
@ -406,39 +384,6 @@ func (this *Practice) RPC_ModulePracticeUnLockPillar(ctx context.Context, args *
|
||||
break
|
||||
}
|
||||
go this.ModuleBuried.TriggerBuried(args.Param1, comm.GetBuriedParam(comm.Rtype152, 1))
|
||||
// for _, v := range configure {
|
||||
// if v.UnlockCondition == int32(taskid) {
|
||||
// switch v.Id {
|
||||
// case 1:
|
||||
// if room.Pillar1.Isunlock == 0 {
|
||||
// room.Pillar1.Isunlock = 1
|
||||
// }
|
||||
// this.modelPandata.Change(args.Param1, map[string]interface{}{
|
||||
// "pillar1": room.Pillar1,
|
||||
// })
|
||||
// this.atlas.CheckActivatePandaAtlasCollect(args.Param1, "1001")
|
||||
// break
|
||||
// case 2:
|
||||
// if room.Pillar2.Isunlock == 0 {
|
||||
// room.Pillar2.Isunlock = 1
|
||||
// }
|
||||
// this.modelPandata.Change(args.Param1, map[string]interface{}{
|
||||
// "pillar2": room.Pillar2,
|
||||
// })
|
||||
// this.atlas.CheckActivatePandaAtlasCollect(args.Param1, "1001")
|
||||
// break
|
||||
// case 3:
|
||||
// if room.Pillar3.Isunlock == 0 {
|
||||
// room.Pillar3.Isunlock = 1
|
||||
// }
|
||||
// this.modelPandata.Change(args.Param1, map[string]interface{}{
|
||||
// "pillar3": room.Pillar3,
|
||||
// })
|
||||
// this.atlas.CheckActivatePandaAtlasCollect(args.Param1, "1001")
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user