Merge branch 'dev' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev
This commit is contained in:
commit
a8a33ffd5e
@ -94,7 +94,9 @@ func (this *apiComp) Info(session comm.IUserSession, req *pb.ArenaInfoReq) (errd
|
|||||||
)
|
)
|
||||||
ids = make([]string, len(info.Defend.Formt))
|
ids = make([]string, len(info.Defend.Formt))
|
||||||
for i, v := range info.Defend.Formt {
|
for i, v := range info.Defend.Formt {
|
||||||
ids[i] = v.Id
|
if v != nil {
|
||||||
|
ids[i] = v.Id
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), ids); err != nil {
|
if heros, err = this.module.modelArena.queryUserHeros(session.GetUserId(), ids); err != nil {
|
||||||
errdata = &pb.ErrorData{
|
errdata = &pb.ErrorData{
|
||||||
|
@ -100,14 +100,17 @@ func (this *apiComp) Buy(session comm.IUserSession, req *pb.IsLandBuyReq) (errda
|
|||||||
}
|
}
|
||||||
if hero == nil {
|
if hero == nil {
|
||||||
hero = &pb.DBHero{
|
hero = &pb.DBHero{
|
||||||
Id: primitive.NewObjectID().Hex(),
|
Id: primitive.NewObjectID().Hex(),
|
||||||
Uid: session.GetUserId(),
|
Uid: session.GetUserId(),
|
||||||
HeroID: conf.Hid,
|
HeroID: conf.Hid,
|
||||||
Star: conf.Star,
|
Star: conf.Star,
|
||||||
Lv: conf.Star * 10,
|
Lv: conf.Star * 10,
|
||||||
Property: make(map[int32]int32),
|
Property: make(map[int32]int32),
|
||||||
AddProperty: make(map[int32]int32),
|
AddProperty: make(map[int32]int32),
|
||||||
JuexProperty: make(map[int32]int32),
|
JuexProperty: make(map[int32]int32),
|
||||||
|
TalentProperty: make(map[int32]int32),
|
||||||
|
HoroscopeProperty: make(map[int32]int32),
|
||||||
|
Fetters: make(map[int32]int32),
|
||||||
}
|
}
|
||||||
this.module.hero.GetVirtualHero(hero, hero.Lv)
|
this.module.hero.GetVirtualHero(hero, hero.Lv)
|
||||||
this.module.modelhero.addheros(session.GetUserId(), hero)
|
this.module.modelhero.addheros(session.GetUserId(), hero)
|
||||||
|
Loading…
Reference in New Issue
Block a user