Merge branch 'meixiongfeng' of http://git.legu.cc/liwei_3d/go_dreamfactory into dev

This commit is contained in:
meixiongfeng 2022-09-20 16:25:28 +08:00
commit 257bd47c58
4 changed files with 301 additions and 276 deletions

View File

@ -318,9 +318,9 @@
"key": 36,
"recruitment_type": 1,
"card_pool_type": "base_pool1",
"star": 5,
"star": 3,
"race": 4,
"id": "45003",
"id": "13001",
"weight": 1000
},
{

View File

@ -179,16 +179,6 @@
}
]
},
{
"index": "22",
"var": [
{
"a": "hero",
"t": "11001",
"n": 1
}
]
},
{
"index": "23",
"var": [
@ -598,5 +588,35 @@
"n": 5
}
]
},
{
"index": "68",
"var": [
{
"a": "hero",
"t": "43901",
"n": 5
}
]
},
{
"index": "69",
"var": [
{
"a": "hero",
"t": "43902",
"n": 5
}
]
},
{
"index": "70",
"var": [
{
"a": "hero",
"t": "43903",
"n": 5
}
]
}
]

File diff suppressed because it is too large Load Diff

View File

@ -169,7 +169,12 @@ func (this *apiComp) DrawCard(session comm.IUserSession, req *pb.HeroDrawCardReq
}
randomIndex := this.module.modelHero.GetRandW(sz)
szCards = append(szCards, _data[int32(star)][randomIndex].Id)
if v, ok := _data[int32(star)]; ok {
if int32(len(v)) > randomIndex {
szCards = append(szCards, v[randomIndex].Id)
}
}
}
// 更新record 配置信息
update := map[string]interface{}{}