GachaService

class GachaService(gachaRepository: GachaRepository, logger: Logger)

ガチャシステムのサービスクラス

Constructors

Link copied to clipboard
constructor(gachaRepository: GachaRepository, logger: Logger)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun consumeTickets(playerInventory: Array<ItemStack?>, amount: Int): Boolean

プレイヤーからチケットを消費

Link copied to clipboard

アクティブなガチャイベントを取得

Link copied to clipboard

イベントIDでガチャイベントを取得

Link copied to clipboard

ガチャで排出される全アイテムを取得(プレビュー用)

Link copied to clipboard
fun getPlayerPityCount(playerUuid: UUID, eventId: String): UInt

プレイヤーの現在の天井カウントを取得

Link copied to clipboard
fun getPlayerTicketCount(playerInventory: Array<ItemStack?>): Int

プレイヤーが持っているガチャチケットの枚数を取得

Link copied to clipboard

デフォルトのガチャイベントを初期化(DBに存在しない場合のみ)

Link copied to clipboard
fun pullGacha(playerUuid: UUID, eventId: String, pullCount: Int): GachaResult

ガチャを引く

Link copied to clipboard

ガチャイベントを作成または更新