mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 05:07:27 +08:00
[O] Better understanding of the data type of different games
This commit is contained in:
@@ -30,11 +30,11 @@ class UserRegistrar(
|
|||||||
val emailProps: EmailProperties
|
val emailProps: EmailProperties
|
||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
// Random long with length 9 (10^10 possibilities)
|
// Random long with length 9-10
|
||||||
// This is because DIVA is using int for card ID, which is at max 10 digits (2147483647)
|
// We chose 1e9 as the start because normal cards took 0...1e9-1
|
||||||
// TODO: Figure out if DIVA can handle int64
|
// This is because games can only take uint32 for card ID, which is at max 10 digits (4294967295)
|
||||||
const val cardExtIdStart = 1e9.toLong()
|
const val cardExtIdStart = 1e9.toLong()
|
||||||
const val cardExtIdEnd = 1e10.toLong() - 1
|
const val cardExtIdEnd = 4294967295
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ class Card(
|
|||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
val id: Long = 0,
|
val id: Long = 0,
|
||||||
|
|
||||||
// A external id
|
// An external id (THIS IS UINT32!!!!)
|
||||||
|
// IDK why samnyan used Long, Games cannot parse the full int64 value and will cast it to uint32
|
||||||
@Column(name = "ext_id", unique = true, nullable = false)
|
@Column(name = "ext_id", unique = true, nullable = false)
|
||||||
@JsonIgnore // Sensitive information
|
@JsonIgnore // Sensitive information
|
||||||
var extId: Long = 0,
|
var extId: Long = 0,
|
||||||
@@ -48,5 +49,6 @@ class Card(
|
|||||||
private val serialVersionUID = 1L
|
private val serialVersionUID = 1L
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Suppress("unused") // Used by serialization
|
||||||
val isLinked get() = aquaUser != null
|
val isLinked get() = aquaUser != null
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user