fix
This commit is contained in:
parent
fd92cf0de1
commit
94e4b77ec3
@ -128,7 +128,8 @@ func (this *ActivityApi) RollDice(c *gin.Context) {
|
|||||||
|
|
||||||
awardgridids := mt.Table.MapGrid.GetAwardGridIdList()
|
awardgridids := mt.Table.MapGrid.GetAwardGridIdList()
|
||||||
user.AddAwardGrid(user.CurrGrid)
|
user.AddAwardGrid(user.CurrGrid)
|
||||||
if len(awardgridids) >= len(userAwardgrids) {
|
userAwardgrids = user.GetAwardGrids()
|
||||||
|
if len(awardgridids) <= len(userAwardgrids) {
|
||||||
fullgrid = true
|
fullgrid = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,10 +30,12 @@ func (this *MapGrid) Init1() {
|
|||||||
tmpStrs := strings.Split(this.MapGrid.GetReward(), "|")
|
tmpStrs := strings.Split(this.MapGrid.GetReward(), "|")
|
||||||
for _, tmpStr := range tmpStrs {
|
for _, tmpStr := range tmpStrs {
|
||||||
tmpStrs2 := strings.Split(tmpStr, ":")
|
tmpStrs2 := strings.Split(tmpStr, ":")
|
||||||
p := new(MapGridRewardItem)
|
if len(tmpStrs2) > 1 {
|
||||||
p.ItemId = q5.ToInt32(tmpStrs2[0])
|
p := new(MapGridRewardItem)
|
||||||
p.ItemNum = q5.ToInt32(tmpStrs2[1])
|
p.ItemId = q5.ToInt32(tmpStrs2[0])
|
||||||
q5.AppendSlice(&this.rewardItems, p)
|
p.ItemNum = q5.ToInt32(tmpStrs2[1])
|
||||||
|
q5.AppendSlice(&this.rewardItems, p)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +62,9 @@ func (this *MapGridTable) GetMaxGridId() int32 {
|
|||||||
func (this *MapGridTable) GetAwardGridIdList() []int32 {
|
func (this *MapGridTable) GetAwardGridIdList() []int32 {
|
||||||
idlist := []int32{}
|
idlist := []int32{}
|
||||||
for _, item := range this.awardGrids {
|
for _, item := range this.awardGrids {
|
||||||
idlist = append(idlist, item.GetId())
|
if item.GetId() > 0 {
|
||||||
|
idlist = append(idlist, item.GetId())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return idlist
|
return idlist
|
||||||
|
Loading…
x
Reference in New Issue
Block a user