aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/CachedItemData.kt
blob: 9480e21e6490da3cd2c65c230be7217c2ae992d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package at.hannibal2.skyhanni.utils

data class CachedItemData(
    // -1 = not loaded
    var petCandies: Int? = -1,

    // "" = not loaded
    var heldItem: String? = "",

    // -1 = not loaded
    var sackInASack: Int? = -1,

    // null = not loaded
    var riftTransferable: Boolean? = null,

    // null = not loaded
    var riftExportable: Boolean? = null,

    var itemRarityLastCheck: SimpleTimeMark = SimpleTimeMark.farPast(),

    // null = not loaded
    var itemRarity: LorenzRarity? = null,

    var itemCategory: ItemCategory? = null,

    var lastInternalName: NEUInternalName? = null,

    var lastInternalNameFetchTime: SimpleTimeMark = SimpleTimeMark.farPast(),
) {
    /**
     * Delegate constructor to avoid calling a function with default arguments from java.
     * We can't call the generated no args constructors (or rather we cannot generate that constructor), because inline
     * classes are not part of the java-kotlin ABI that is super well supported (especially with default arguments).
     */
    @Suppress("ForbiddenVoid")
    constructor(void: Void?) : this()
}