收藏室更新
This commit is contained in:
parent
30d86ce06b
commit
ad529697e9
@ -28,7 +28,7 @@ func (c *Collect) InitData() {
|
||||
if len(c.Jackpot) == 0 {
|
||||
c.Jackpot = initJackpot()
|
||||
}
|
||||
if len(c.Jackpot) <= 9 {
|
||||
if len(c.Jackpot) <= 18 {
|
||||
c.Jackpot = initJackpot2(c.Jackpot)
|
||||
}
|
||||
}
|
||||
@ -48,7 +48,7 @@ func (c *Collect) GetReward(Id, Num int) ([]*item.Item, error) {
|
||||
c.Reward = append(c.Reward, Id)
|
||||
JackpotId := 0
|
||||
JackpotId, c.Jackpot = GoUtil.PopSlice(c.Jackpot)
|
||||
if len(c.Jackpot) <= 9 {
|
||||
if len(c.Jackpot) <= 18 {
|
||||
c.Jackpot = initJackpot2(c.Jackpot)
|
||||
}
|
||||
Items := collectCfg.GetJackpotItems(JackpotId)
|
||||
@ -58,7 +58,7 @@ func (c *Collect) GetReward(Id, Num int) ([]*item.Item, error) {
|
||||
|
||||
func (c *Collect) BackData() *msg.ResCollectInfo {
|
||||
var ItemsMsg []*msg.CollectItem
|
||||
for i := 0; i < 9; i++ {
|
||||
for i := 0; i < 18; i++ {
|
||||
Items := collectCfg.GetJackpotItems(c.Jackpot[i])
|
||||
ItemsMsg = append(ItemsMsg, &msg.CollectItem{
|
||||
Id: int32(i + 1),
|
||||
@ -81,5 +81,6 @@ func initJackpot() []int {
|
||||
Ids := collectCfg.GetJackpotId()
|
||||
r1 := GoUtil.ShuffleArray(Ids)
|
||||
r2 := GoUtil.ShuffleArray(Ids)
|
||||
return append(r1, r2...)
|
||||
r3 := GoUtil.ShuffleArray(Ids)
|
||||
return append(append(r1, r2...), r3...)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user