This commit is contained in:
meixiongfeng 2022-12-23 10:23:32 +08:00
parent 9a17f539bf
commit 0ad475d152

View File

@ -32,7 +32,7 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListRe
list, err := this.module.modelHunting.getHuntingList(session.GetUserId())
if mgo.MongodbNil == err {
result := &pb.DBHunting{
list = &pb.DBHunting{
Id: primitive.NewObjectID().Hex(),
Uid: session.GetUserId(),
Boss: make(map[int32]int32),
@ -40,12 +40,12 @@ func (this *apiComp) GetList(session comm.IUserSession, req *pb.HuntingGetListRe
}
_cfg := this.module.configure.GetHuntingBossTypeConfigData()
for k := range _cfg {
result.Boss[k] = 0
list.Boss[k] = 0
str := strconv.Itoa(int(k)) + "_1"
result.BossTime[str] = 0
list.BossTime[str] = 0
}
this.module.modelHunting.Add(session.GetUserId(), result)
this.module.modelHunting.Add(session.GetUserId(), list)
conf := this.module.configure.GetGlobalConf()
if conf == nil {
code = pb.ErrorCode_ConfigNoFound