@@ -100,24 +100,21 @@ async def gratting(self, ticket_type: Literal['LR', 'RO', 'ZR'] = 'LR') -> Resul
100
100
101
101
result : GrattingResult = post_datas (f"{ self .base_url } /{ ticket_id } " )
102
102
103
- # Those are single possibilities, they can't exists with another result at the same time.
104
- if any (key in result for key in ['inventories' , 'luckyLink' , 'userBanner' ]):
105
- if 'inventories' in result :
106
- for item in result ['inventories' ]: self .inventories .append (item )
107
- elif 'luckyLink' in result and 'quantity' in result :
108
- count += 1
109
- self .nbr_ticket_scratched += 1
110
- elif 'luckyLink' in result :
111
- self .luckyLink .append (result ['luckyLink' ])
112
- elif 'userBanner' in result :
113
- self .userBanner = True
114
- else : # Those can exists with another result at the same time.
115
- if 'balance' in result :
116
- self .balance += result ['balance' ]
117
- if 'loreDust' in result :
118
- self .loreDust += result ['loreDust' ]
119
- if 'loreFragment' in result :
120
- self .loreFragment += result ['loreFragment' ]
103
+ if 'inventories' in result :
104
+ for item in result ['inventories' ]: self .inventories .append (item )
105
+ if 'luckyLink' in result and 'quantity' in result :
106
+ count += 1
107
+ self .nbr_ticket_scratched += 1
108
+ elif 'luckyLink' in result :
109
+ self .luckyLink .append (result ['luckyLink' ])
110
+ if 'userBanner' in result :
111
+ self .userBanner = True
112
+ if 'balance' in result :
113
+ self .balance += result ['balance' ]
114
+ if 'loreDust' in result :
115
+ self .loreDust += result ['loreDust' ]
116
+ if 'loreFragment' in result :
117
+ self .loreFragment += result ['loreFragment' ]
121
118
122
119
count -= 1
123
120
0 commit comments