This commit is contained in:
flswld
2023-03-29 15:52:31 +08:00
parent ecec5a67ed
commit 4c4c16efd0
3 changed files with 77 additions and 41 deletions

View File

@@ -404,11 +404,13 @@ func (g *Game) doRandDropFull(dropDataConfig *gdconf.DropData) map[uint32]uint32
dropMap := g.doRandDropOnce(dropList[0])
dropList = dropList[1:]
for dropId, count := range dropMap {
// 掉落id优先在掉落表里找 找不到就去道具表里找
subDropDataConfig := gdconf.GetDropDataById(dropId)
if subDropDataConfig != nil {
// 添加子掉落
dropList = append(dropList, subDropDataConfig)
} else {
// 添加道具
itemMap[uint32(dropId)] += uint32(count)
}
}