map 初始化
This commit is contained in:
parent
4b89fd4362
commit
1a560f9ab7
@ -41,6 +41,7 @@ func (this *apiComp) Awaken(session comm.IUserSession, req *pb.HeroAwakenReq) (c
|
|||||||
|
|
||||||
awakenData, err = this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
awakenData, err = this.module.configure.GetHeroAwakenConfig(_hero.HeroID, _hero.JuexingLv+1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
data = &pb.ErrorData{}
|
||||||
code = pb.ErrorCode_ConfigNoFound
|
code = pb.ErrorCode_ConfigNoFound
|
||||||
data.Message = err.Error()
|
data.Message = err.Error()
|
||||||
return
|
return
|
||||||
|
@ -42,6 +42,7 @@ func (this *modelHunting) getHuntingList(uid string) (result *pb.DBHunting, err
|
|||||||
Uid: uid,
|
Uid: uid,
|
||||||
Boss: make(map[int32]int32),
|
Boss: make(map[int32]int32),
|
||||||
BossTime: make(map[string]int32),
|
BossTime: make(map[string]int32),
|
||||||
|
Ps: map[int32]int32{},
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Add(uid, result)
|
this.Add(uid, result)
|
||||||
|
@ -37,6 +37,7 @@ func (this *modelViking) getVikingList(uid string) (result *pb.DBViking, err err
|
|||||||
Uid: uid,
|
Uid: uid,
|
||||||
Boss: make(map[int32]int32),
|
Boss: make(map[int32]int32),
|
||||||
BossTime: make(map[string]int32),
|
BossTime: make(map[string]int32),
|
||||||
|
Ps: make(map[int32]int32),
|
||||||
}
|
}
|
||||||
err = nil
|
err = nil
|
||||||
this.module.modelViking.Add(uid, result)
|
this.module.modelViking.Add(uid, result)
|
||||||
|
Loading…
Reference in New Issue
Block a user