File tree 1 file changed +8
-7
lines changed
src/main/scala/com/github/unchama/seichiassist/subsystems/gacha/bukkit
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -244,12 +244,13 @@ class GachaCommand[F[_]: OnMinecraftServerThread: ConcurrentEffect](
244
244
ContextualExecutorBuilder .beginConfiguration.buildWithExecutionCSEffect { context =>
245
245
val eventName = context.args.yetToBeParsed.headOption.map(GachaEventName )
246
246
Kleisli .liftF(gachaPrizeAPI.allGachaPrizeList).flatMap { gachaPrizes =>
247
- val gachaPrizeInformation = gachaPrizes
248
- .filter { gachaPrize =>
249
- if (eventName.isEmpty) gachaPrize.nonGachaEventItem
250
- else
251
- gachaPrize.gachaEvent.map(_.eventName) == eventName
252
- }
247
+ val eventGachaPrizes = gachaPrizes.filter { gachaPrize =>
248
+ if (eventName.isEmpty) gachaPrize.nonGachaEventItem
249
+ else
250
+ gachaPrize.gachaEvent.map(_.eventName) == eventName
251
+ }
252
+
253
+ val gachaPrizeInformation = eventGachaPrizes
253
254
.sortBy(_.id.id)
254
255
.map { gachaPrize =>
255
256
val itemStack = gachaPrize.itemStack
@@ -261,7 +262,7 @@ class GachaCommand[F[_]: OnMinecraftServerThread: ConcurrentEffect](
261
262
}
262
263
.toList
263
264
264
- val totalProbability = gachaPrizes .map(_.probability.value).sum
265
+ val totalProbability = eventGachaPrizes .map(_.probability.value).sum
265
266
MessageEffectF (
266
267
List (s " ${RED }アイテム番号|アイテム名|アイテム数|出現確率 " ) ++ gachaPrizeInformation ++ List (
267
268
s " ${RED }合計確率: $totalProbability( ${totalProbability * 100 }%) " ,
You can’t perform that action at this time.
0 commit comments