[+] Implement infinite penguins

matching
Azalea 2024-12-29 01:42:00 -05:00
parent 27ca67b6f9
commit 6d8948cdf1
3 changed files with 30 additions and 15 deletions

View File

@ -1,19 +1,21 @@
# Chusan dev notes
## Item types
| ItemKind | Name | Single / Multiple | Notes |
|----------|-------------------|-------------------|-------------------------------|
| 1 | Nameplate | Single | - |
| 2 | Frame | Single | - |
| 3 | Trophy | Single | - |
| 4 | Skill | Multiple | Stock is level of skill |
| 5 | Ticket | Multiple | - |
| 6 | Present | Multiple? | - |
| 7 | Music (Unlock) | Single | - |
| 8 | Map Icon | Single | - |
| 9 | System Voice | Single | - |
| 10 | Symbol Chat | Single | - |
| 11 | Avatar Accessory | Single |Part can determined by category|
| ItemKind | Name | Single / Multiple | Notes |
|----------|------------------|-------------------|---------------------------------|
| 1 | Nameplate | Single | - |
| 2 | Frame | Single | - |
| 3 | Trophy | Single | - |
| 4 | Skill | Multiple | Stock is level of skill |
| 5 | Ticket | Multiple | - |
| 6 | Present | Multiple? | - |
| 7 | Music (Unlock) | Single | - |
| 8 | Map Icon | Single | - |
| 9 | System Voice | Single | - |
| 10 | Symbol Chat | Single | - |
| 11 | Avatar Accessory | Single | Part can determined by category |
Note: Chuni penguin statues are tickets (ok that sounds dumb)
## Avatar accessory category
| Category ID | Part name |

View File

@ -21,7 +21,6 @@ import java.security.MessageDigest
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneId
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
import java.util.*
import java.util.concurrent.locks.Lock

View File

@ -6,6 +6,7 @@ import icu.samnyan.aqua.sega.chusan.model.response.data.MatchingMemberInfo
import icu.samnyan.aqua.sega.chusan.model.response.data.MatchingWaitState
import icu.samnyan.aqua.sega.chusan.model.response.data.UserEmoney
import icu.samnyan.aqua.sega.chusan.model.userdata.UserCharge
import icu.samnyan.aqua.sega.chusan.model.userdata.UserItem
import icu.samnyan.aqua.sega.chusan.model.userdata.UserMusicDetail
import icu.samnyan.aqua.sega.general.model.response.UserRecentRating
import java.time.format.DateTimeFormatter
@ -91,13 +92,26 @@ val chusanInit: ChusanController.() -> Unit = {
}
}
// Check dev/chusan_dev_notes for more item information
val penguins = ls(8000, 8010, 8020, 8030)
"GetUserItem".pagedWithKind("userItemList") {
val rawIndex = data["nextIndex"]!!.long
val kind = parsing { (rawIndex / 10000000000L).int }
data["nextIndex"] = rawIndex % 10000000000L
mapOf("itemKind" to kind) grabs {
// TODO: All unlock
db.userItem.findAllByUser_Card_ExtIdAndItemKind(uid, kind)
val items = db.userItem.findAllByUser_Card_ExtIdAndItemKind(uid, kind).toMutableList()
// Check game options
db.userData.findByCard_ExtId(uid)()?.card?.aquaUser?.gameOptions?.let {
if (it.chusanInfinitePenguins && kind == 5) {
items.removeAll { it.itemId in penguins }
items.addAll(penguins.map { UserItem(kind, it, 999, true) })
}
}
items
} postProcess {
val ni = it["nextIndex"]!!.long
if (ni != -1L) it["nextIndex"] = ni + (kind * 10000000000L)