playroom bug
This commit is contained in:
parent
d7a39e9635
commit
774a7bd2b7
@ -465,9 +465,10 @@ func (p *PlayroomMod) FlipCard(Pos int) (int, error) {
|
||||
return Prob, nil
|
||||
}
|
||||
|
||||
func (p *PlayroomMod) GetFlipReward() ([]*item.Item, error) {
|
||||
func (p *PlayroomMod) GetFlipReward() ([]*item.Item, int, error) {
|
||||
check := make(map[int]int)
|
||||
Items := make([]*item.Item, 0)
|
||||
T := p.Target
|
||||
for _, v := range p.Flip {
|
||||
check[v]++
|
||||
if check[v] == 3 {
|
||||
@ -488,10 +489,10 @@ func (p *PlayroomMod) GetFlipReward() ([]*item.Item, error) {
|
||||
p.GameId = 0
|
||||
p.Flip = make(map[int]int)
|
||||
p.Target = 0
|
||||
return Items, nil
|
||||
return Items, T, nil
|
||||
}
|
||||
}
|
||||
return Items, fmt.Errorf("GetFlipReward check is not 3")
|
||||
return Items, T, fmt.Errorf("GetFlipReward check is not 3")
|
||||
}
|
||||
|
||||
func (p *PlayroomMod) BuyItem(Id int) ([]*item.Item, []*item.Item) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user