This commit is contained in:
yoncodes
2025-10-28 21:21:28 -04:00
commit e58fd190b4
2962 changed files with 3063199 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/target
Cargo.lock

75
Cargo.toml Normal file
View File

@@ -0,0 +1,75 @@
[workspace]
members = [
"data",
"crypto",
"common",
"database",
"protocol",
"gameserver",
"httpserver",
]
resolver = "2"
[workspace.package]
edition = "2024"
version = "0.1.0"
[workspace.dependencies]
#Framework
actix-web = { version = "4.11.0", features = ["rustls-0_22"] }
rustls = "0.22"
rustls-pemfile = "2.2.0"
tokio = { version = "1", features = ["full"] }
# Database
sqlx = { version = "0.8.6", features = [
"runtime-tokio-rustls",
"sqlite",
"macros",
"migrate",
] }
#tracing
ansi_term = "0.12.1"
tracing-subscriber = "0.3.20"
tracing = "0.1.41"
anyhow = "1.0.100"
thiserror = "2.0.17"
#proto
prost = "0.14.1"
prost-types = "0.14.1"
prost-build = "0.14.1"
# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_with = "3.15.0"
serde_json = "1.0.145"
#crypto
aes = "0.8"
cbc = { version = "0.1", features = ["alloc"] }
base64 = "0.22"
sha1 = "0.10"
once_cell = "1.19"
rand = "0.9.2"
hex = "0.4.3"
#util
chrono = "0.4.42"
paste = "1.0.15"
#paths
data = { path = "data" }
crypto = { path = "crypto" }
common = { path = "common" }
database = { path = "database" }
protocol = { path = "protocol" }
gameserver = { path = "gameserver" }
httpserver = { path = "httpserver" }
[profile.release]
strip = true # Automatically strip symbols from the binary.
lto = true # Link-time optimization.
opt-level = 3 # Optimize for speed.
codegen-units = 1 # Maximum size reduction optimizations.

19
certs/cert.pem Normal file
View File

@@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDFTCCAf2gAwIBAgIUdakSdpLutwTvVbhSFVUXo4i/1IkwDQYJKoZIhvcNAQEL
BQAwNzETMBEGA1UEAwwKZ2FtZS5sb2NhbDESMBAGA1UECgwJTG9jYWwgRGV2MQww
CgYDVQQLDANEZXYwHhcNMjUwNTExMTQxOTU3WhcNMjYwNTExMTQxOTU3WjA3MRMw
EQYDVQQDDApnYW1lLmxvY2FsMRIwEAYDVQQKDAlMb2NhbCBEZXYxDDAKBgNVBAsM
A0RldjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL2lk9TMWXweKkIO
5A9r1+VtkdPh/a0xIAo/mPSvAM2wG62AU0RlP/wKzFop+8RPVnmejxoDM4ekS7TG
nU1AAlmaUfunaCNSFsbVaFqut3PwpobDO0rS3NgJb2D2qvu1ixltwL+U9alGJz+v
Y+Ev235UKDekGjHOre0BiFfCuHGcnEy/YOxN6nQCuMxBrBCI0v3lwyFiBQuEEaBM
Ulisi885K/LCiu4wWp0HdTxsfOHabIp7cLo+kMcE+2aVKkMEeggrrsSyaH0qHwjh
Ww4T05e7j8o3eB4v9ckAFl8xqN/92z6LsXRlITe7H3fM/K7pghIz3qJ8BT2kWnAF
orVpjh0CAwEAAaMZMBcwFQYDVR0RBA4wDIIKZ2FtZS5sb2NhbDANBgkqhkiG9w0B
AQsFAAOCAQEAEKMNKsbIZ6wtXf1tL8C7Q9P7id5FzEweB/W6rgyykndJVQtmpiV5
/cR7Kexqg5/3XiGLsXisiViQTAaREIThUrjpVExS7miuvQ7CeprpoRHOV7qO70hD
d0f7UNKiUIBRK67fVlTar0cC1mIX4GK7IDe3wsIbYkEl9r2kwai3NsyVsPMZVb/b
D5x6pDstqd5sZNPU0B3nL3NpEYAtcN969dusLERoEqfG9y2LRVXQACl2J6K+ifJl
RY+mBf+As8eNWb7QdqedtRm9ZQOaU6HKjlE7CT0NloeAvQel/6OYYFa2XqZ6VpPy
t6MFZvqLaNwmCvpX7LiXMJm/Yl5pPHK1+A==
-----END CERTIFICATE-----

27
certs/key.pem Normal file
View File

@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpQIBAAKCAQEAvaWT1MxZfB4qQg7kD2vX5W2R0+H9rTEgCj+Y9K8AzbAbrYBT
RGU//ArMWin7xE9WeZ6PGgMzh6RLtMadTUACWZpR+6doI1IWxtVoWq63c/CmhsM7
StLc2AlvYPaq+7WLGW3Av5T1qUYnP69j4S/bflQoN6QaMc6t7QGIV8K4cZycTL9g
7E3qdAK4zEGsEIjS/eXDIWIFC4QRoExSWKyLzzkr8sKK7jBanQd1PGx84dpsintw
uj6QxwT7ZpUqQwR6CCuuxLJofSofCOFbDhPTl7uPyjd4Hi/1yQAWXzGo3/3bPoux
dGUhN7sfd8z8rumCEjPeonwFPaRacAWitWmOHQIDAQABAoIBAQCaHVZ3VeFadgEN
UaCPz6nRLiuVrk9CUWuiKHCaVyUmAflcE66XJFjM79GFbBzHOVoi13GfR/62OhOz
wrvOLTg7rKb3BOIh4fHUf1SgbN90fpo1Za5nbdg+T9yNRadJigySC5jZl6nTd8kp
fdSDCSssDCPqo5cN5tF8iwRLnVfaKm7TF1LdT/FMmsdjpgG6jUO+uW1kB/dwxLgk
EcnLibOFFvcyFo6/vkLIzl4RpIUP/oYXvo+OPjsn2a2gIYkHRxM4fHMpLTHjQPtj
KpIxocQs8a2uONJLBsdnziDJvHt9p65H2v9cFAP1w6t1KU/ku2db3ZrFVlgEPE0v
NwXzkgeZAoGBAN0A+stsyEElwIxAhcAAhJBaugLkvg9bgT0a50KWnGfantx4Dc6F
AqD6VddD+Tmm9zs16YVdrOrcewE4Nm9hOlx5hSNJEBez34V1i6xkwr8uLKtqwScr
kXw7t6sQVJf/u5GkHPsVtZSo7Ue71GhZl8kxckgnbzlJMFRVs4GubrUHAoGBANut
c2XDfvBCygOPo9zBS77V1C4myrllsoOSKXVAeXO+kADaukT174+qyG0HGTfsB34/
T6zyRcpNnM2dDiJAvgnVD994DluDTOT71aHprgjLtDMKkmUeJOi1/TCoARAYviFE
U72OP0Mj1ecS03TR2150xZf3W5oxNaJueiKXZ567AoGBALkpJPZigbTzaEsZk/W1
eVtoaAgclZBQXgtQCwmjHg90/zw/6XFpxzYQBvOAI8LFvMWC+c+fGEz9xKDU8+aF
U1w/A+j4Qd9Z+J/cR9V75h4/FXXYz1N+ETpA3jUYTYe73u66zP0gxy1yCrrbB68V
wTHzl4gUYf9g7nj6BJdWCbLpAoGAcEi2BTvptDDPRQa0gO+kIcT2ESju0dizaCDb
Y/0ylwC+ZlFmiD0U1+A5VdEdCMJyCgueVA35si/9h/NQ+B0Thb8Lv/ODky8HrLs0
NPBWblSApN4wedLwlqn+4lHdSTb8Z9Ce5PLCTzUP7m5m+v0RHbSeEtDyV1vzyDSj
5O5ynmUCgYEAiEH688L7KHRIzDh9k40UJ5oupe8nuDltIMviT/lzETRZ4MG5OGpi
VM7a2jxwntMV3JcfMDA90QZ3X8hbylgzaxj6sytIoHwHV1mEZKxXWuKZEpHLaGNe
oBQkqBSYh7ATsDbkODT9MXJSmVzaHfuGG4iq+0rbND1OGGk+NzMdpY8=
-----END RSA PRIVATE KEY-----

10
common/Cargo.toml Normal file
View File

@@ -0,0 +1,10 @@
[package]
name = "common"
edition.workspace = true
version.workspace = true
[dependencies]
once_cell.workspace = true
ansi_term.workspace = true
tracing-subscriber.workspace = true
serde.workspace = true

23
common/src/error_type.rs Normal file
View File

@@ -0,0 +1,23 @@
#[allow(non_camel_case_types)]
pub enum EErrorType {
SESSION_DST = -1,
DB_CLOSE = -2,
QUERY_ERROR = -3,
WAIT_TIMEOUT = -4,
REQUEST_FAILED = -5,
NOT_PINGCHECK_SESSION_DST = -6,
WAIT_PROCESS_REDIRECT = -7,
RPE_REQUEST_MISSING_PARAM = -8,
RPE_XML_DATA_NOT_FOUND = -9,
RPE_PROTOBUF_ENCODING_ERROR = -10,
RPE_UPDATE_MAJOR_CLIENT_DOWN = -11,
RPE_CDN_ASSET_BUNDLE_UPDATE = -12,
PRE_NETWORK_ERROR_NEON_API = -13,
RPE_PURCHASED_DISABLED = -14,
RPE_NEON_API_ACCESS_TOKEN_EXPIRE = -15,
RPE_BLOCK_IP = -16,
PRE_BLOCK_NETWORK_TYPE = -17,
CLINET_NET_TIMEOUT = -1000,
CLIENT_LOGIC_ERROR = -9999,
None,
}

29
common/src/lib.rs Normal file
View File

@@ -0,0 +1,29 @@
use once_cell::sync::Lazy;
use std::path::PathBuf;
pub mod error_type;
pub mod packet_code;
pub const GAME_SERVER_ADDRESS: &str = "0.0.0.0";
pub const GAME_SERVER_PORT: u16 = 10800;
pub static CERT_FILE_PATH: Lazy<PathBuf> =
Lazy::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../certs/cert.pem"));
pub static KEY_FILE_PATH: Lazy<PathBuf> =
Lazy::new(|| PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../certs/key.pem"));
pub static DATABASE_PATH: Lazy<PathBuf> = Lazy::new(|| {
std::env::current_exe()
.ok()
.and_then(|p| p.parent().map(|p| p.to_path_buf()))
.unwrap_or_else(|| PathBuf::from("."))
.join("db")
});
pub fn init_tracing() {
#[cfg(target_os = "windows")]
ansi_term::enable_ansi_support().unwrap();
tracing_subscriber::fmt().init();
}

1802
common/src/packet_code.rs Normal file

File diff suppressed because it is too large Load Diff

18
crypto/Cargo.toml Normal file
View File

@@ -0,0 +1,18 @@
[package]
name = "crypto"
edition.workspace = true
version.workspace = true
[dependencies]
aes.workspace = true
base64.workspace = true
once_cell.workspace = true
sha1.workspace = true
cbc.workspace = true
serde.workspace = true
prost.workspace = true
chrono.workspace = true
common.workspace = true
tracing.workspace = true
thiserror.workspace = true
serde_json.workspace = true

121
crypto/src/aestools.rs Normal file
View File

@@ -0,0 +1,121 @@
use aes::Aes256;
use base64::{engine::general_purpose, Engine as _};
use cbc::cipher::{block_padding::Pkcs7, BlockDecryptMut, BlockEncryptMut, KeyIvInit};
use once_cell::sync::Lazy;
use sha1::{Digest, Sha1};
use std::collections::HashSet;
use std::time::{SystemTime, UNIX_EPOCH};
type Aes256CbcEnc = cbc::Encryptor<Aes256>;
type Aes256CbcDec = cbc::Decryptor<Aes256>;
pub const ENCRYPT_FIX_KEY: &str = "abcdefghijkrstuv024680wxyzlmnopq";
pub const DEFAULT_KEY: &str = "688370f00a38e21a6ca65ec2d7c38a7c";
const SALT: &str = "salt_alone";
static ZERO_IV: [u8; 16] = [0u8; 16];
static ENCRYPT_FIX_PACKET_LIST: Lazy<HashSet<&'static str>> = Lazy::new(|| {
HashSet::from(["LoginUser", "JoinUser"]) // double-Base64 + AES
});
static NON_ENCRYPT_PACKET_LIST: Lazy<HashSet<&'static str>> = Lazy::new(|| {
HashSet::from([
"MaintenanceInfo",
"ServerInfo",
"ServerNowTime",
"NoticeInfo",
])
});
pub enum EncryptionKey {
Fixed, // LoginUser / JoinUser
Default, // other encrypted routes
}
pub struct AesTools;
impl AesTools {
pub fn get_key_for_route(route_name: &str) -> Option<EncryptionKey> {
let route = route_name.trim_start_matches('/').to_string();
if ENCRYPT_FIX_PACKET_LIST.contains(route.as_str()) {
Some(EncryptionKey::Fixed)
} else if NON_ENCRYPT_PACKET_LIST.contains(route.as_str()) {
None
} else {
Some(EncryptionKey::Default)
}
}
/// Encode outbound protobuf payload for a route
pub fn encode_packet(route_name: &str, protobuf_bytes: &[u8]) -> String {
match Self::get_key_for_route(route_name) {
Some(EncryptionKey::Fixed) => {
// Base64( AES( Base64(proto) ) )
let inner_b64 = general_purpose::STANDARD.encode(protobuf_bytes);
Self::aes_encrypt_raw_b64(inner_b64.as_bytes(), ENCRYPT_FIX_KEY)
}
Some(EncryptionKey::Default) => {
// Base64( AES(proto) )
//Self::aes_encrypt_raw_b64(protobuf_bytes, DEFAULT_KEY)
// Base64( AES( Base64(proto) ) )
let inner_b64 = general_purpose::STANDARD.encode(protobuf_bytes);
Self::aes_encrypt_raw_b64(inner_b64.as_bytes(), DEFAULT_KEY)
}
None => {
// Base64(proto)
general_purpose::STANDARD.encode(protobuf_bytes)
}
}
}
/// Decode inbound body → protobuf bytes
pub fn decrypt_packet(route_name: &str, body_b64: &str) -> Result<Vec<u8>, ()> {
match Self::get_key_for_route(route_name) {
Some(EncryptionKey::Fixed) => {
let decrypted = Self::aes_decrypt_raw(body_b64, ENCRYPT_FIX_KEY).map_err(|_| ())?;
let inner_b64 = String::from_utf8(decrypted).map_err(|_| ())?;
general_purpose::STANDARD.decode(inner_b64).map_err(|_| ())
}
Some(EncryptionKey::Default) => {
//Self::aes_decrypt_raw(body_b64, DEFAULT_KEY)
let decrypted = Self::aes_decrypt_raw(body_b64, DEFAULT_KEY).map_err(|_| ())?;
let inner_b64 = String::from_utf8(decrypted).map_err(|_| ())?;
general_purpose::STANDARD.decode(inner_b64).map_err(|_| ())
}
None => general_purpose::STANDARD.decode(body_b64).map_err(|_| ()),
}
}
pub fn aes_encrypt_raw_b64(plaintext: &[u8], key_str: &str) -> String {
let cipher = Aes256CbcEnc::new_from_slices(key_str.as_bytes(), &ZERO_IV).unwrap();
let encrypted = cipher.encrypt_padded_vec_mut::<Pkcs7>(plaintext);
general_purpose::STANDARD.encode(encrypted)
}
pub fn aes_decrypt_raw(cipher_b64: &str, key_str: &str) -> Result<Vec<u8>, ()> {
let decoded = general_purpose::STANDARD
.decode(cipher_b64)
.map_err(|_| ())?;
let cipher = Aes256CbcDec::new_from_slices(key_str.as_bytes(), &ZERO_IV).map_err(|_| ())?;
cipher
.decrypt_padded_vec_mut::<Pkcs7>(&decoded)
.map_err(|_| ())
}
/// SHA-1 hash with static salt suffix
pub fn sha1_hash(input: &str) -> String {
let mut hasher = Sha1::new();
hasher.update(format!("{input}{SALT}"));
format!("{:x}", hasher.finalize())
}
/// Millisecond-precision timestamp
pub fn current_timestamp() -> i64 {
SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis() as i64
}
}

2
crypto/src/lib.rs Normal file
View File

@@ -0,0 +1,2 @@
pub mod aestools;
pub mod network;

174
crypto/src/network.rs Normal file
View File

@@ -0,0 +1,174 @@
use crate::aestools::{AesTools, EncryptionKey, DEFAULT_KEY, ENCRYPT_FIX_KEY};
use base64::{engine::general_purpose, Engine as _};
use chrono::Utc;
use prost::Message;
use serde::{Deserialize, Serialize};
use tracing::{error, info};
#[derive(Debug, thiserror::Error)]
pub enum PacketError {
#[error("empty request body")]
EmptyBody,
#[error("decryption failed")]
DecryptionFailed,
#[error("base64 decode failed: {0}")]
Base64Error(#[from] base64::DecodeError),
#[error("protobuf decode failed: {0}")]
ProtobufError(#[from] prost::DecodeError),
#[error("utf8 decode failed")]
Utf8Error,
}
/// Parse and decrypt incoming packet data
pub fn parse_packet<M: Message + Default>(route_name: &str, body: &str) -> Result<M, PacketError> {
if body.trim().is_empty() {
error!("Empty request body for route {}", route_name);
return Err(PacketError::EmptyBody);
}
let key_type = AesTools::get_key_for_route(route_name);
// Try decryption first, fall back to plain base64 if it fails (for batch requests)
let proto_bytes = match key_type {
Some(EncryptionKey::Fixed) => {
info!("Decrypting using ENCRYPT_FIX_KEY for route {}", route_name);
// Try decrypt: Base64(AES(Base64(proto)))
match try_decrypt_double_base64(body, ENCRYPT_FIX_KEY) {
Ok(bytes) => bytes,
Err(_) => {
// Decryption failed, try plain base64 (batch request)
info!("trying plain base64 for route {}", route_name);
general_purpose::STANDARD
.decode(body)
.map_err(|e| PacketError::Base64Error(e))?
}
}
}
Some(EncryptionKey::Default) => {
info!("Decrypting using DEFAULT_KEY for route {}", route_name);
// Try decrypt: Base64(AES(Base64(proto)))
match try_decrypt_double_base64(body, DEFAULT_KEY) {
Ok(bytes) => bytes,
Err(_) => {
// Decryption failed, try plain base64 (batch request)
info!("trying plain base64 for route {}", route_name);
general_purpose::STANDARD
.decode(body)
.map_err(|e| PacketError::Base64Error(e))?
}
}
}
None => {
info!("Non-encrypted route: {}", route_name);
// Direct base64 decode
general_purpose::STANDARD.decode(body)?
}
};
if proto_bytes.is_empty() {
return Err(PacketError::DecryptionFailed);
}
Ok(M::decode(&*proto_bytes)?)
}
/// Helper function to try double base64 + AES decryption
fn try_decrypt_double_base64(body: &str, key: &str) -> Result<Vec<u8>, PacketError> {
// Decrypt: Base64(AES(Base64(proto)))
let decrypted =
AesTools::aes_decrypt_raw(body, key).map_err(|_| PacketError::DecryptionFailed)?;
// Inner layer is base64
let inner_b64 = String::from_utf8(decrypted).map_err(|_| PacketError::Utf8Error)?;
general_purpose::STANDARD
.decode(&inner_b64)
.map_err(|e| PacketError::Base64Error(e))
}
/// Encode and encrypt a protobuf message
pub fn encode_packet<M: Message>(route_name: &str, msg: &M) -> String {
let bytes = msg.encode_to_vec();
AesTools::encode_packet(route_name, &bytes)
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct BaseResponse {
pub error_type: i32,
pub error_message: String,
pub data: String,
pub length: i32,
pub ip: String,
}
impl BaseResponse {
pub fn success(data: &[u8]) -> Self {
let encoded = general_purpose::STANDARD.encode(data);
Self {
error_type: 0,
error_message: String::new(),
data: encoded,
length: 0, // Game hardcodes this
ip: "127.0.0.1".to_string(),
}
}
pub fn error(error_type: i32) -> Self {
Self {
error_type,
error_message: String::new(),
data: String::new(),
length: 0,
ip: "127.0.0.1".to_string(),
}
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct GameResponse {
pub error_type: i32,
pub packet_code: i32,
pub error_message: String,
pub length: i32,
pub data: String,
pub server_now_time: i64,
pub notify: String,
}
impl GameResponse {
pub fn success(route_name: &str, proto_bytes: &[u8], packet_code: i32) -> Self {
let inner_b64 = general_purpose::STANDARD.encode(proto_bytes);
let encrypted = AesTools::encode_packet(route_name, proto_bytes);
Self {
error_type: 0,
packet_code,
error_message: String::new(),
length: inner_b64.len() as i32,
data: encrypted,
server_now_time: Utc::now().timestamp_millis(),
notify: String::new(),
}
}
pub fn error(error_type: i32) -> Self {
Self {
error_type,
packet_code: 0,
error_message: String::new(),
length: 0,
data: String::new(),
server_now_time: 0,
notify: String::new(),
}
}
/// Attach a notify message (plain base64, not encrypted)
pub fn with_notify<M: Message>(mut self, notify: &M) -> Self {
let bytes = notify.encode_to_vec();
self.notify = general_purpose::STANDARD.encode(bytes);
self
}
}

9
data/Cargo.toml Normal file
View File

@@ -0,0 +1,9 @@
[package]
name = "data"
edition.workspace = true
version.workspace = true
[dependencies]
serde.workspace = true
serde_json.workspace = true
anyhow.workspace = true

View File

@@ -0,0 +1,66 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Achievementleveltable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "needEXP")]
pub need_e_x_p: i32,
#[serde(rename = "rewardCount")]
pub reward_count: Vec<i32>,
#[serde(rename = "rewardId")]
pub reward_id: Vec<i32>,
#[serde(rename = "rewardType")]
pub reward_type: Vec<i32>,
}
pub struct AchievementleveltableTable {
records: Vec<Achievementleveltable>,
by_id: HashMap<i32, usize>,
}
impl AchievementleveltableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Achievementleveltable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Achievementleveltable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Achievementleveltable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Achievementleveltable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,106 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Achievementtable {
#[serde(rename = "conditionSubType")]
pub condition_sub_type: Option<i32>,
#[serde(rename = "conditionType")]
pub condition_type: i32,
#[serde(rename = "conditionValue")]
pub condition_value: f32,
#[serde(rename = "contentsGroup")]
pub contents_group: Option<i32>,
#[serde(rename = "descLocalTextId")]
pub desc_local_text_id: i32,
#[serde(rename = "eventType")]
pub event_type: i32,
#[serde(rename = "exp")]
pub exp: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "iconName")]
pub icon_name: String,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "parentGroupId")]
pub parent_group_id: Option<i32>,
#[serde(rename = "rewardItemCount")]
pub reward_item_count: Option<Vec<i32>>,
#[serde(rename = "rewardItemId")]
pub reward_item_id: Option<Vec<i32>>,
#[serde(rename = "rewardItemType")]
pub reward_item_type: Option<Vec<i32>>,
#[serde(rename = "shortCutId")]
pub short_cut_id: Option<i32>,
#[serde(rename = "tabType")]
pub tab_type: Option<i32>,
#[serde(rename = "titleLocalTextId")]
pub title_local_text_id: i32,
#[serde(rename = "useBlind")]
pub use_blind: Option<i32>,
#[serde(rename = "useType")]
pub use_type: Option<i32>,
}
pub struct AchievementtableTable {
records: Vec<Achievementtable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl AchievementtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Achievementtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Achievementtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Achievementtable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Achievementtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Achievementtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,70 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongameattacktable {
#[serde(rename = "attackType")]
pub attack_type: Option<i32>,
#[serde(rename = "groggySkillValue")]
pub groggy_skill_value: Option<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "repeatCount")]
pub repeat_count: Option<i32>,
#[serde(rename = "skillValue")]
pub skill_value: Option<f32>,
#[serde(rename = "specialGaugeValue")]
pub special_gauge_value: Option<i32>,
#[serde(rename = "unblockableType")]
pub unblockable_type: Option<i32>,
}
pub struct ActiongameattacktableTable {
records: Vec<Actiongameattacktable>,
by_id: HashMap<i32, usize>,
}
impl ActiongameattacktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongameattacktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongameattacktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongameattacktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongameattacktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,78 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamebufftable {
#[serde(rename = "buffActiveType")]
pub buff_active_type: i32,
#[serde(rename = "buffApplyType")]
pub buff_apply_type: i32,
#[serde(rename = "buffDescNameTextId")]
pub buff_desc_name_text_id: Option<i32>,
#[serde(rename = "buffEffectName")]
pub buff_effect_name: Option<String>,
#[serde(rename = "buffNameTextId")]
pub buff_name_text_id: Option<i32>,
#[serde(rename = "buffSpriteName")]
pub buff_sprite_name: Option<String>,
#[serde(rename = "buffTime")]
pub buff_time: f32,
#[serde(rename = "buffValue")]
pub buff_value: Option<f32>,
#[serde(rename = "classType")]
pub class_type: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "subMagicValue")]
pub sub_magic_value: Option<Vec<f32>>,
}
pub struct ActiongamebufftableTable {
records: Vec<Actiongamebufftable>,
by_id: HashMap<i32, usize>,
}
impl ActiongamebufftableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamebufftable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamebufftable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamebufftable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamebufftable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,102 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamechartable {
#[serde(rename = "charDescNameTextId")]
pub char_desc_name_text_id: i32,
#[serde(rename = "charIcon")]
pub char_icon: String,
#[serde(rename = "charIllustName")]
pub char_illust_name: Option<String>,
#[serde(rename = "charNameImage")]
pub char_name_image: String,
#[serde(rename = "charNameTextId")]
pub char_name_text_id: i32,
#[serde(rename = "charPrefabPath")]
pub char_prefab_path: String,
#[serde(rename = "charSkillGroupId")]
pub char_skill_group_id: i32,
#[serde(rename = "charStatId")]
pub char_stat_id: i32,
#[serde(rename = "charStatImageName")]
pub char_stat_image_name: Option<String>,
#[serde(rename = "charThumName")]
pub char_thum_name: String,
#[serde(rename = "charTitleNameTextId")]
pub char_title_name_text_id: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "hitEffPrefab")]
pub hit_eff_prefab: Option<String>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "monsterPartsGroupId")]
pub monster_parts_group_id: Option<i32>,
#[serde(rename = "monsterType")]
pub monster_type: Option<i32>,
#[serde(rename = "voiceResourceName")]
pub voice_resource_name: Option<String>,
}
pub struct ActiongamechartableTable {
records: Vec<Actiongamechartable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ActiongamechartableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamechartable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.char_skill_group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamechartable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Actiongamechartable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamechartable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamechartable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,91 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamedefaulttable {
#[serde(rename = "aggroDecreaseValue")]
pub aggro_decrease_value: f32,
#[serde(rename = "alertStateBuffId")]
pub alert_state_buff_id: i32,
#[serde(rename = "blowDamageSoundName")]
pub blow_damage_sound_name: String,
#[serde(rename = "brokenBuffId")]
pub broken_buff_id: i32,
#[serde(rename = "cutDamageSoundName")]
pub cut_damage_sound_name: String,
#[serde(rename = "damageLimit")]
pub damage_limit: i32,
#[serde(rename = "emergencyHpRate")]
pub emergency_hp_rate: f32,
#[serde(rename = "eventMissionGroupId")]
pub event_mission_group_id: i32,
#[serde(rename = "healEffectPrefabName")]
pub heal_effect_prefab_name: String,
#[serde(rename = "justDodgeEffectPrefabName")]
pub just_dodge_effect_prefab_name: String,
#[serde(rename = "justDodgeInvincibleTime")]
pub just_dodge_invincible_time: f32,
#[serde(rename = "loadingLimit")]
pub loading_limit: i32,
#[serde(rename = "outGameBgmName")]
pub out_game_bgm_name: String,
#[serde(rename = "rageDamageValue")]
pub rage_damage_value: f32,
#[serde(rename = "rankMaxCount")]
pub rank_max_count: i32,
#[serde(rename = "skillHoldThreshold")]
pub skill_hold_threshold: f32,
}
pub struct ActiongamedefaulttableTable {
records: Vec<Actiongamedefaulttable>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ActiongamedefaulttableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamedefaulttable> = serde_json::from_str(&json)?;
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_group.entry(record.event_mission_group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_group,
})
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Actiongamedefaulttable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamedefaulttable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamedefaulttable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,70 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamekeybuttontable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "skillButton1")]
pub skill_button1: i32,
#[serde(rename = "skillButton1Hold")]
pub skill_button1_hold: Option<i32>,
#[serde(rename = "skillButton2")]
pub skill_button2: i32,
#[serde(rename = "skillButton3")]
pub skill_button3: i32,
#[serde(rename = "skillButton4")]
pub skill_button4: i32,
#[serde(rename = "skillButton5")]
pub skill_button5: i32,
}
pub struct ActiongamekeybuttontableTable {
records: Vec<Actiongamekeybuttontable>,
by_id: HashMap<i32, usize>,
}
impl ActiongamekeybuttontableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamekeybuttontable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamekeybuttontable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamekeybuttontable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamekeybuttontable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,76 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamemissiontable {
#[serde(rename = "conditionSubType")]
pub condition_sub_type: i32,
#[serde(rename = "conditionSubTypeParam")]
pub condition_sub_type_param: Option<i32>,
#[serde(rename = "conditionType")]
pub condition_type: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "missionDescNameTextId")]
pub mission_desc_name_text_id: i32,
#[serde(rename = "missionNameNameTextId")]
pub mission_name_name_text_id: i32,
#[serde(rename = "monsterType")]
pub monster_type: i32,
#[serde(rename = "rewardCount")]
pub reward_count: Option<i32>,
#[serde(rename = "rewardId")]
pub reward_id: Option<i32>,
#[serde(rename = "rewardType")]
pub reward_type: Option<i32>,
}
pub struct ActiongamemissiontableTable {
records: Vec<Actiongamemissiontable>,
by_id: HashMap<i32, usize>,
}
impl ActiongamemissiontableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamemissiontable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamemissiontable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamemissiontable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamemissiontable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,90 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamemonsterpartstable {
#[serde(rename = "banMonsterPatternId")]
pub ban_monster_pattern_id: Option<Vec<i32>>,
#[serde(rename = "baseModelName")]
pub base_model_name: Option<String>,
#[serde(rename = "blowWeakPartsValue")]
pub blow_weak_parts_value: Option<f32>,
#[serde(rename = "breakType")]
pub break_type: Option<i32>,
#[serde(rename = "brokenAnimationName")]
pub broken_animation_name: Option<String>,
#[serde(rename = "brokenModelName")]
pub broken_model_name: Option<String>,
#[serde(rename = "brokenValue")]
pub broken_value: Option<i32>,
#[serde(rename = "cutWeakPartsValue")]
pub cut_weak_parts_value: Option<f32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "partsNameTextId")]
pub parts_name_text_id: Option<i32>,
}
pub struct ActiongamemonsterpartstableTable {
records: Vec<Actiongamemonsterpartstable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ActiongamemonsterpartstableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamemonsterpartstable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamemonsterpartstable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Actiongamemonsterpartstable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamemonsterpartstable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamemonsterpartstable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,90 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamemonsterpatterntable {
#[serde(rename = "attackRangeMin")]
pub attack_range_min: Option<f32>,
#[serde(rename = "conditionType1")]
pub condition_type1: Option<i32>,
#[serde(rename = "conditionType2")]
pub condition_type2: Option<i32>,
#[serde(rename = "conditionValue1")]
pub condition_value1: Option<i32>,
#[serde(rename = "conditionValue2")]
pub condition_value2: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "maxCount")]
pub max_count: Option<i32>,
#[serde(rename = "priority")]
pub priority: i32,
#[serde(rename = "probability")]
pub probability: f32,
#[serde(rename = "skillId")]
pub skill_id: i32,
}
pub struct ActiongamemonsterpatterntableTable {
records: Vec<Actiongamemonsterpatterntable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ActiongamemonsterpatterntableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamemonsterpatterntable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamemonsterpatterntable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Actiongamemonsterpatterntable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamemonsterpatterntable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamemonsterpatterntable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,100 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongameskilltable {
#[serde(rename = "attackId")]
pub attack_id: Option<i32>,
#[serde(rename = "buffId")]
pub buff_id: Option<Vec<i32>>,
#[serde(rename = "comboType")]
pub combo_type: Option<i32>,
#[serde(rename = "comboValue")]
pub combo_value: Option<i32>,
#[serde(rename = "cooldown")]
pub cooldown: Option<f32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "hitSoundName")]
pub hit_sound_name: Option<String>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "skillAnimationName")]
pub skill_animation_name: Option<String>,
#[serde(rename = "skillCancelType")]
pub skill_cancel_type: Option<i32>,
#[serde(rename = "skillDescNameTextId")]
pub skill_desc_name_text_id: Option<i32>,
#[serde(rename = "skillIconSpriteName")]
pub skill_icon_sprite_name: Option<String>,
#[serde(rename = "skillNameTextId")]
pub skill_name_text_id: Option<i32>,
#[serde(rename = "skillType")]
pub skill_type: i32,
#[serde(rename = "skillTypeValue")]
pub skill_type_value: Vec<f32>,
#[serde(rename = "staminaValue")]
pub stamina_value: Option<i32>,
}
pub struct ActiongameskilltableTable {
records: Vec<Actiongameskilltable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ActiongameskilltableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongameskilltable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongameskilltable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Actiongameskilltable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongameskilltable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongameskilltable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,92 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamestagetable {
#[serde(rename = "charMonsterId")]
pub char_monster_id: i32,
#[serde(rename = "clearTime")]
pub clear_time: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "loadingSceneName")]
pub loading_scene_name: String,
#[serde(rename = "mapSceneName")]
pub map_scene_name: String,
#[serde(rename = "stageDescLocalTextId")]
pub stage_desc_local_text_id: i32,
#[serde(rename = "stageDifficulty")]
pub stage_difficulty: i32,
#[serde(rename = "stageNameLocalTextId")]
pub stage_name_local_text_id: i32,
#[serde(rename = "stageTitleLocalTextId")]
pub stage_title_local_text_id: i32,
#[serde(rename = "stageType")]
pub stage_type: i32,
#[serde(rename = "timeLimit")]
pub time_limit: i32,
}
pub struct ActiongamestagetableTable {
records: Vec<Actiongamestagetable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ActiongamestagetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamestagetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamestagetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Actiongamestagetable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamestagetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamestagetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,78 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongamestattable {
#[serde(rename = "criticalDamageRate")]
pub critical_damage_rate: Option<f32>,
#[serde(rename = "groggyHealthValue")]
pub groggy_health_value: Option<i32>,
#[serde(rename = "healthMaxValue")]
pub health_max_value: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "moveSpeed")]
pub move_speed: f32,
#[serde(rename = "powerValue")]
pub power_value: f32,
#[serde(rename = "rageMaxValue")]
pub rage_max_value: Option<i32>,
#[serde(rename = "recoveryCount")]
pub recovery_count: Option<i32>,
#[serde(rename = "specialGaugeMaxValue")]
pub special_gauge_max_value: Option<i32>,
#[serde(rename = "staminaMaxValue")]
pub stamina_max_value: Option<f32>,
#[serde(rename = "staminaRecoveryValue")]
pub stamina_recovery_value: Option<f32>,
}
pub struct ActiongamestattableTable {
records: Vec<Actiongamestattable>,
by_id: HashMap<i32, usize>,
}
impl ActiongamestattableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongamestattable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongamestattable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongamestattable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongamestattable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,78 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Actiongametable {
#[serde(rename = "battleStartTimeline")]
pub battle_start_timeline: String,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "stageGroupId")]
pub stage_group_id: i32,
#[serde(rename = "stageMonsterIcon")]
pub stage_monster_icon: String,
#[serde(rename = "stageThumName")]
pub stage_thum_name: String,
}
pub struct ActiongametableTable {
records: Vec<Actiongametable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ActiongametableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Actiongametable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.stage_group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Actiongametable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Actiongametable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Actiongametable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Actiongametable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Adventuregroupbufftable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "statType")]
pub stat_type: i32,
#[serde(rename = "statValue")]
pub stat_value: Option<f32>,
}
pub struct AdventuregroupbufftableTable {
records: Vec<Adventuregroupbufftable>,
by_id: HashMap<i32, usize>,
}
impl AdventuregroupbufftableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Adventuregroupbufftable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Adventuregroupbufftable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Adventuregroupbufftable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Adventuregroupbufftable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Alchemypictorialbooktable {
#[serde(rename = "category")]
pub category: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "itemId")]
pub item_id: i32,
}
pub struct AlchemypictorialbooktableTable {
records: Vec<Alchemypictorialbooktable>,
by_id: HashMap<i32, usize>,
}
impl AlchemypictorialbooktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Alchemypictorialbooktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Alchemypictorialbooktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Alchemypictorialbooktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Alchemypictorialbooktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,90 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Alchemytable {
#[serde(rename = "alchemyCategory")]
pub alchemy_category: i32,
#[serde(rename = "displayGroupId")]
pub display_group_id: i32,
#[serde(rename = "groupLocalTextId")]
pub group_local_text_id: Option<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "materialItemCount")]
pub material_item_count: Vec<i32>,
#[serde(rename = "materialItemId")]
pub material_item_id: Vec<i32>,
#[serde(rename = "materialItemType")]
pub material_item_type: Vec<i32>,
#[serde(rename = "resultItemCount")]
pub result_item_count: i32,
#[serde(rename = "resultItemId")]
pub result_item_id: i32,
#[serde(rename = "resultItemType")]
pub result_item_type: i32,
#[serde(rename = "talentLevel")]
pub talent_level: i32,
}
pub struct AlchemytableTable {
records: Vec<Alchemytable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl AlchemytableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Alchemytable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.display_group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Alchemytable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Alchemytable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Alchemytable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Alchemytable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,74 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Attendancealwaysgrouptable {
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "nextId")]
pub next_id: Option<i32>,
}
pub struct AttendancealwaysgrouptableTable {
records: Vec<Attendancealwaysgrouptable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl AttendancealwaysgrouptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Attendancealwaysgrouptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Attendancealwaysgrouptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Attendancealwaysgrouptable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Attendancealwaysgrouptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Attendancealwaysgrouptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,80 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Attendancealwaysrewardtable {
#[serde(rename = "attendanceCount")]
pub attendance_count: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "rewardCount")]
pub reward_count: i32,
#[serde(rename = "rewardId")]
pub reward_id: i32,
#[serde(rename = "rewardType")]
pub reward_type: i32,
}
pub struct AttendancealwaysrewardtableTable {
records: Vec<Attendancealwaysrewardtable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl AttendancealwaysrewardtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Attendancealwaysrewardtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Attendancealwaysrewardtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Attendancealwaysrewardtable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Attendancealwaysrewardtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Attendancealwaysrewardtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,74 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Attendancealwaystable {
#[serde(rename = "alwaysGroupId")]
pub always_group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "titleLocalTextId")]
pub title_local_text_id: String,
}
pub struct AttendancealwaystableTable {
records: Vec<Attendancealwaystable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl AttendancealwaystableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Attendancealwaystable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.always_group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Attendancealwaystable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Attendancealwaystable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Attendancealwaystable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Attendancealwaystable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,74 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Attendancelimitrewardtable {
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "randomBoxId")]
pub random_box_id: i32,
}
pub struct AttendancelimitrewardtableTable {
records: Vec<Attendancelimitrewardtable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl AttendancelimitrewardtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Attendancelimitrewardtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Attendancelimitrewardtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Attendancelimitrewardtable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Attendancelimitrewardtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Attendancelimitrewardtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,78 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Attendancerewardtable {
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "rewardCount")]
pub reward_count: i32,
#[serde(rename = "rewardId")]
pub reward_id: i32,
#[serde(rename = "rewardType")]
pub reward_type: i32,
}
pub struct AttendancerewardtableTable {
records: Vec<Attendancerewardtable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl AttendancerewardtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Attendancerewardtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Attendancerewardtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Attendancerewardtable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Attendancerewardtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Attendancerewardtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,110 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Battledecktable {
#[serde(rename = "battleClearLocalTextId")]
pub battle_clear_local_text_id: i32,
#[serde(rename = "battleFailLocalTextId")]
pub battle_fail_local_text_id: i32,
#[serde(rename = "battleFieldBuff")]
pub battle_field_buff: Option<Vec<i32>>,
#[serde(rename = "bonusPointLocalTextId")]
pub bonus_point_local_text_id: Option<Vec<i32>>,
#[serde(rename = "bonusPointThumnailLocalTextId")]
pub bonus_point_thumnail_local_text_id: Option<Vec<i32>>,
#[serde(rename = "bonusPointType")]
pub bonus_point_type: Option<Vec<i32>>,
#[serde(rename = "bonusPointValue1")]
pub bonus_point_value1: Option<Vec<i32>>,
#[serde(rename = "bonusPointValue2")]
pub bonus_point_value2: Option<Vec<i32>>,
#[serde(rename = "bonusRewardCount")]
pub bonus_reward_count: Option<Vec<i32>>,
#[serde(rename = "bonusRewardId")]
pub bonus_reward_id: Option<Vec<i32>>,
#[serde(rename = "bonusRewardType")]
pub bonus_reward_type: Option<Vec<i32>>,
#[serde(rename = "bonusScore")]
pub bonus_score: Option<Vec<i32>>,
#[serde(rename = "charId")]
pub char_id: Vec<i32>,
#[serde(rename = "commonSoundId")]
pub common_sound_id: i32,
#[serde(rename = "costumeId")]
pub costume_id: Vec<i32>,
#[serde(rename = "costumeId2")]
pub costume_id2: Vec<i32>,
#[serde(rename = "damageRate")]
pub damage_rate: f32,
#[serde(rename = "deathTimeStartTurnPvE")]
pub death_time_start_turn_pv_e: i32,
#[serde(rename = "failWayPointId")]
pub fail_way_point_id: i32,
#[serde(rename = "healthRate")]
pub health_rate: f32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "level")]
pub level: Vec<i32>,
#[serde(rename = "mapScenePath")]
pub map_scene_path: String,
#[serde(rename = "position")]
pub position: Vec<i32>,
#[serde(rename = "sequence")]
pub sequence: Vec<i32>,
#[serde(rename = "solutionTipTextId")]
pub solution_tip_text_id: Option<i32>,
#[serde(rename = "useBattleContinue")]
pub use_battle_continue: Option<i32>,
}
pub struct BattledecktableTable {
records: Vec<Battledecktable>,
by_id: HashMap<i32, usize>,
}
impl BattledecktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Battledecktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Battledecktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Battledecktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Battledecktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,106 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Battledefaulttable {
#[serde(rename = "AtkMax")]
pub atk_max: i32,
#[serde(rename = "CriDMax")]
pub cri_d_max: f32,
#[serde(rename = "CriMax")]
pub cri_max: f32,
#[serde(rename = "DefMax")]
pub def_max: f32,
#[serde(rename = "FieldObjectBattleRearrangeEffectTime")]
pub field_object_battle_rearrange_effect_time: i32,
#[serde(rename = "FieldObjectBattleRearrangeTime")]
pub field_object_battle_rearrange_time: i32,
#[serde(rename = "HpMaxLimit")]
pub hp_max_limit: i32,
#[serde(rename = "SpReductionMax")]
pub sp_reduction_max: i32,
#[serde(rename = "SpReductionMin")]
pub sp_reduction_min: i32,
#[serde(rename = "battleContinueCostItemCount")]
pub battle_continue_cost_item_count: i32,
#[serde(rename = "battleContinueCostItemType")]
pub battle_continue_cost_item_type: i32,
#[serde(rename = "battleContinueMaxCount")]
pub battle_continue_max_count: i32,
#[serde(rename = "battlePowerConst")]
pub battle_power_const: i32,
#[serde(rename = "chainDamageValue")]
pub chain_damage_value: f32,
#[serde(rename = "chainMaxCount")]
pub chain_max_count: i32,
#[serde(rename = "deathTimeBuffId")]
pub death_time_buff_id: i32,
#[serde(rename = "deathTimeStartTurnPvP")]
pub death_time_start_turn_pv_p: i32,
#[serde(rename = "frontMoveSec")]
pub front_move_sec: f32,
#[serde(rename = "minAttackDamage")]
pub min_attack_damage: i32,
#[serde(rename = "sideMoveSec")]
pub side_move_sec: f32,
#[serde(rename = "spGuildRaidMaxCount")]
pub sp_guild_raid_max_count: i32,
#[serde(rename = "spMaxCount")]
pub sp_max_count: i32,
#[serde(rename = "spStartGuildRaidCount")]
pub sp_start_guild_raid_count: i32,
#[serde(rename = "spStartHunterCount")]
pub sp_start_hunter_count: i32,
#[serde(rename = "spStartPvECount")]
pub sp_start_pv_e_count: i32,
#[serde(rename = "spStartPvPBLUECount")]
pub sp_start_pv_p_b_l_u_e_count: i32,
#[serde(rename = "spStartPvPREDCount")]
pub sp_start_pv_p_r_e_d_count: i32,
#[serde(rename = "spTurnAddGuildRaidCount")]
pub sp_turn_add_guild_raid_count: i32,
#[serde(rename = "spTurnAddHunterCount")]
pub sp_turn_add_hunter_count: i32,
#[serde(rename = "spTurnAddPvPCount")]
pub sp_turn_add_pv_p_count: i32,
#[serde(rename = "strongElementEffect")]
pub strong_element_effect: f32,
#[serde(rename = "turnPassSec")]
pub turn_pass_sec: f32,
}
pub struct BattledefaulttableTable {
records: Vec<Battledefaulttable>,
}
impl BattledefaulttableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Battledefaulttable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Battledefaulttable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Battledefaulttable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Battlefieldbufftable {
#[serde(rename = "buffID")]
pub buff_i_d: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "teamType")]
pub team_type: Option<i32>,
}
pub struct BattlefieldbufftableTable {
records: Vec<Battlefieldbufftable>,
by_id: HashMap<i32, usize>,
}
impl BattlefieldbufftableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Battlefieldbufftable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Battlefieldbufftable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Battlefieldbufftable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Battlefieldbufftable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,74 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Battlepowertable {
#[serde(rename = "awakePower")]
pub awake_power: i32,
#[serde(rename = "costumeGradePower")]
pub costume_grade_power: i32,
#[serde(rename = "costumePower")]
pub costume_power: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "imprintGradePower")]
pub imprint_grade_power: i32,
#[serde(rename = "levelValuePower")]
pub level_value_power: i32,
#[serde(rename = "potentialConnectionNodePower")]
pub potential_connection_node_power: i32,
#[serde(rename = "potentialPublicNodePower")]
pub potential_public_node_power: i32,
#[serde(rename = "potentialSkillNodePower")]
pub potential_skill_node_power: i32,
}
pub struct BattlepowertableTable {
records: Vec<Battlepowertable>,
by_id: HashMap<i32, usize>,
}
impl BattlepowertableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Battlepowertable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Battlepowertable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Battlepowertable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Battlepowertable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,80 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Bingocompleterewardgrouptable {
#[serde(rename = "completeCount")]
pub complete_count: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "rewardCount")]
pub reward_count: i32,
#[serde(rename = "rewardId")]
pub reward_id: Option<i32>,
#[serde(rename = "rewardType")]
pub reward_type: i32,
}
pub struct BingocompleterewardgrouptableTable {
records: Vec<Bingocompleterewardgrouptable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl BingocompleterewardgrouptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Bingocompleterewardgrouptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Bingocompleterewardgrouptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Bingocompleterewardgrouptable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Bingocompleterewardgrouptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Bingocompleterewardgrouptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,84 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Bingolinerewardgrouptable {
#[serde(rename = "clearCount")]
pub clear_count: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "lineIndex")]
pub line_index: Option<i32>,
#[serde(rename = "lineType")]
pub line_type: Option<i32>,
#[serde(rename = "rewardCount")]
pub reward_count: i32,
#[serde(rename = "rewardId")]
pub reward_id: Option<i32>,
#[serde(rename = "rewardType")]
pub reward_type: i32,
}
pub struct BingolinerewardgrouptableTable {
records: Vec<Bingolinerewardgrouptable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl BingolinerewardgrouptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Bingolinerewardgrouptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Bingolinerewardgrouptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Bingolinerewardgrouptable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Bingolinerewardgrouptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Bingolinerewardgrouptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,80 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Bingorewardgrouptable {
#[serde(rename = "clearCount")]
pub clear_count: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "rewardCount")]
pub reward_count: i32,
#[serde(rename = "rewardId")]
pub reward_id: Option<i32>,
#[serde(rename = "rewardType")]
pub reward_type: i32,
}
pub struct BingorewardgrouptableTable {
records: Vec<Bingorewardgrouptable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl BingorewardgrouptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Bingorewardgrouptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Bingorewardgrouptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Bingorewardgrouptable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Bingorewardgrouptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Bingorewardgrouptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,74 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Buffconditiontable {
#[serde(rename = "attackType")]
pub attack_type: Option<Vec<i32>>,
#[serde(rename = "buffGroup")]
pub buff_group: Option<Vec<i32>>,
#[serde(rename = "chainLess")]
pub chain_less: Option<i32>,
#[serde(rename = "chainMore")]
pub chain_more: Option<i32>,
#[serde(rename = "chainMultiple")]
pub chain_multiple: Option<i32>,
#[serde(rename = "element")]
pub element: Option<Vec<i32>>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "mainTarget")]
pub main_target: Option<i32>,
#[serde(rename = "subTarget")]
pub sub_target: Option<i32>,
}
pub struct BuffconditiontableTable {
records: Vec<Buffconditiontable>,
by_id: HashMap<i32, usize>,
}
impl BuffconditiontableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Buffconditiontable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Buffconditiontable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Buffconditiontable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Buffconditiontable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,66 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Buffimmunegrouptable {
#[serde(rename = "buffClassType")]
pub buff_class_type: Vec<String>,
#[serde(rename = "buffGroupType")]
pub buff_group_type: Vec<i32>,
#[serde(rename = "buffImmuneApplySkillTextId")]
pub buff_immune_apply_skill_text_id: Vec<i32>,
#[serde(rename = "buffSubType")]
pub buff_sub_type: Vec<i32>,
#[serde(rename = "id")]
pub id: i32,
}
pub struct BuffimmunegrouptableTable {
records: Vec<Buffimmunegrouptable>,
by_id: HashMap<i32, usize>,
}
impl BuffimmunegrouptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Buffimmunegrouptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Buffimmunegrouptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Buffimmunegrouptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Buffimmunegrouptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,106 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Bufftable {
#[serde(rename = "AddBuffId")]
pub add_buff_id: Option<i32>,
#[serde(rename = "buffApplyType")]
pub buff_apply_type: Option<i32>,
#[serde(rename = "buffConditionId")]
pub buff_condition_id: Option<i32>,
#[serde(rename = "buffCountType")]
pub buff_count_type: Option<i32>,
#[serde(rename = "buffDescSkillTextId")]
pub buff_desc_skill_text_id: Option<i32>,
#[serde(rename = "buffDisplayType")]
pub buff_display_type: Option<i32>,
#[serde(rename = "buffDisplayValue")]
pub buff_display_value: Option<i32>,
#[serde(rename = "buffGroup")]
pub buff_group: Option<i32>,
#[serde(rename = "buffIconSpriteName")]
pub buff_icon_sprite_name: Option<String>,
#[serde(rename = "buffMakerType")]
pub buff_maker_type: Option<i32>,
#[serde(rename = "buffSkillTextId")]
pub buff_skill_text_id: Option<i32>,
#[serde(rename = "buffTurn")]
pub buff_turn: Option<i32>,
#[serde(rename = "buffType")]
pub buff_type: Option<i32>,
#[serde(rename = "buffValue")]
pub buff_value: Option<f32>,
#[serde(rename = "classType")]
pub class_type: String,
#[serde(rename = "conditionAddBuffId")]
pub condition_add_buff_id: Option<i32>,
#[serde(rename = "effectPrefabName")]
pub effect_prefab_name: Option<String>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "magicValue")]
pub magic_value: Option<f32>,
#[serde(rename = "overLapCount")]
pub over_lap_count: Option<i32>,
#[serde(rename = "overLapMax")]
pub over_lap_max: Option<i32>,
#[serde(rename = "ownerType")]
pub owner_type: Option<i32>,
#[serde(rename = "specialEffectPrefabName")]
pub special_effect_prefab_name: Option<String>,
#[serde(rename = "statType")]
pub stat_type: Option<i32>,
#[serde(rename = "subType")]
pub sub_type: Option<i32>,
}
pub struct BufftableTable {
records: Vec<Bufftable>,
by_id: HashMap<i32, usize>,
}
impl BufftableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Bufftable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Bufftable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Bufftable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Bufftable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,82 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriabubbletable {
#[serde(rename = "bubbleLocalTextId")]
pub bubble_local_text_id: i32,
#[serde(rename = "emotion")]
pub emotion: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "npcId")]
pub npc_id: Option<i32>,
#[serde(rename = "npcType")]
pub npc_type: i32,
#[serde(rename = "status")]
pub status: Option<i32>,
}
pub struct CafeteriabubbletableTable {
records: Vec<Cafeteriabubbletable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CafeteriabubbletableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriabubbletable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriabubbletable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cafeteriabubbletable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriabubbletable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriabubbletable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,66 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriacostumetable {
#[serde(rename = "costumeId")]
pub costume_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "rewardId")]
pub reward_id: i32,
#[serde(rename = "rewardType")]
pub reward_type: i32,
#[serde(rename = "rewardValue")]
pub reward_value: i32,
}
pub struct CafeteriacostumetableTable {
records: Vec<Cafeteriacostumetable>,
by_id: HashMap<i32, usize>,
}
impl CafeteriacostumetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriacostumetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriacostumetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriacostumetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriacostumetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,96 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriadefaulttable {
#[serde(rename = "NpcSpawnDistance")]
pub npc_spawn_distance: i32,
#[serde(rename = "basicInteractionMaxCount")]
pub basic_interaction_max_count: i32,
#[serde(rename = "basicInteractionTerm")]
pub basic_interaction_term: i32,
#[serde(rename = "bubbleDuration")]
pub bubble_duration: i32,
#[serde(rename = "bubbleMaxCount")]
pub bubble_max_count: i32,
#[serde(rename = "cafeteriaGuideId")]
pub cafeteria_guide_id: i32,
#[serde(rename = "cafeteriaNoteConditionValue")]
pub cafeteria_note_condition_value: i32,
#[serde(rename = "dailyShopCurrencyLimit")]
pub daily_shop_currency_limit: i32,
#[serde(rename = "defaultBasicInterationCount")]
pub default_basic_interation_count: i32,
#[serde(rename = "defaultUniqueInterationCount")]
pub default_unique_interation_count: i32,
#[serde(rename = "eventRewardType")]
pub event_reward_type: i32,
#[serde(rename = "interactionIgonoreTime")]
pub interaction_igonore_time: i32,
#[serde(rename = "lowMemSpawnCount")]
pub low_mem_spawn_count: i32,
#[serde(rename = "maxRewardTime")]
pub max_reward_time: i32,
#[serde(rename = "minRewardTime")]
pub min_reward_time: i32,
#[serde(rename = "normalMemSpawnCount")]
pub normal_mem_spawn_count: i32,
#[serde(rename = "noteRewardType")]
pub note_reward_type: i32,
#[serde(rename = "noteRewardValue")]
pub note_reward_value: i32,
#[serde(rename = "questNameTextId")]
pub quest_name_text_id: i32,
#[serde(rename = "questSkipTextId")]
pub quest_skip_text_id: i32,
#[serde(rename = "startTimelineName")]
pub start_timeline_name: String,
#[serde(rename = "startVisualNovelDialogId")]
pub start_visual_novel_dialog_id: i32,
#[serde(rename = "uniqueInteractionMaxCount")]
pub unique_interaction_max_count: i32,
#[serde(rename = "uniqueInteractionTerm")]
pub unique_interaction_term: i32,
#[serde(rename = "visualNovelEndRewardCount")]
pub visual_novel_end_reward_count: i32,
#[serde(rename = "visualNovelEndRewardId")]
pub visual_novel_end_reward_id: i32,
#[serde(rename = "visualNovelEndRewardType")]
pub visual_novel_end_reward_type: i32,
}
pub struct CafeteriadefaulttableTable {
records: Vec<Cafeteriadefaulttable>,
}
impl CafeteriadefaulttableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriadefaulttable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Cafeteriadefaulttable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriadefaulttable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,86 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriaeventtable {
#[serde(rename = "TimelineName")]
pub timeline_name: Option<String>,
#[serde(rename = "bubbleIconSprite")]
pub bubble_icon_sprite: String,
#[serde(rename = "eventType")]
pub event_type: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "reactionPrefabName")]
pub reaction_prefab_name: Option<Vec<String>>,
#[serde(rename = "reactionTime")]
pub reaction_time: Option<Vec<i32>>,
#[serde(rename = "rewardCount")]
pub reward_count: i32,
#[serde(rename = "rewardType")]
pub reward_type: i32,
}
pub struct CafeteriaeventtableTable {
records: Vec<Cafeteriaeventtable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CafeteriaeventtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriaeventtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriaeventtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cafeteriaeventtable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriaeventtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriaeventtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriafacilitytable {
#[serde(rename = "facilityType")]
pub facility_type: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "objectName")]
pub object_name: String,
}
pub struct CafeteriafacilitytableTable {
records: Vec<Cafeteriafacilitytable>,
by_id: HashMap<i32, usize>,
}
impl CafeteriafacilitytableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriafacilitytable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriafacilitytable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriafacilitytable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriafacilitytable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,80 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeterialeveltable {
#[serde(rename = "bubbleCooldown")]
pub bubble_cooldown: i32,
#[serde(rename = "cafeteriaCostumeMax")]
pub cafeteria_costume_max: i32,
#[serde(rename = "cafeteriaCustomerNpcSpawnCount")]
pub cafeteria_customer_npc_spawn_count: i32,
#[serde(rename = "dayFxSoundResourceName")]
pub day_fx_sound_resource_name: String,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "mapGrade")]
pub map_grade: i32,
#[serde(rename = "nightFxSoundResourceName")]
pub night_fx_sound_resource_name: String,
#[serde(rename = "skillType")]
pub skill_type: Vec<i32>,
#[serde(rename = "skillValue1")]
pub skill_value1: Vec<i32>,
#[serde(rename = "skillValue2")]
pub skill_value2: Vec<i32>,
#[serde(rename = "skillValue3")]
pub skill_value3: Vec<i32>,
#[serde(rename = "skillValue4")]
pub skill_value4: Vec<i32>,
}
pub struct CafeterialeveltableTable {
records: Vec<Cafeterialeveltable>,
by_id: HashMap<i32, usize>,
}
impl CafeterialeveltableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeterialeveltable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeterialeveltable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeterialeveltable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeterialeveltable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,86 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriamanagetable {
#[serde(rename = "costType")]
pub cost_type: i32,
#[serde(rename = "costValue")]
pub cost_value: Option<i32>,
#[serde(rename = "facilityId")]
pub facility_id: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: Option<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "manageIconResourceName")]
pub manage_icon_resource_name: String,
#[serde(rename = "manageLocalTextId")]
pub manage_local_text_id: i32,
#[serde(rename = "parttimeId")]
pub parttime_id: Option<i32>,
}
pub struct CafeteriamanagetableTable {
records: Vec<Cafeteriamanagetable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CafeteriamanagetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriamanagetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
if let Some(group_id) = record.group_id {
by_group.entry(group_id).or_insert_with(Vec::new).push(idx);
}
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriamanagetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cafeteriamanagetable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriamanagetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriamanagetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,60 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriamaptable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "pointPositionId")]
pub point_position_id: i32,
}
pub struct CafeteriamaptableTable {
records: Vec<Cafeteriamaptable>,
by_id: HashMap<i32, usize>,
}
impl CafeteriamaptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriamaptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriamaptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriamaptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriamaptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,76 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriamovepatterntable {
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "movePatternRepeat")]
pub move_pattern_repeat: i32,
#[serde(rename = "stopTime")]
pub stop_time: Option<i32>,
}
pub struct CafeteriamovepatterntableTable {
records: Vec<Cafeteriamovepatterntable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CafeteriamovepatterntableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriamovepatterntable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriamovepatterntable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cafeteriamovepatterntable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriamovepatterntable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriamovepatterntable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,88 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeterianpctable {
#[serde(rename = "gender")]
pub gender: Option<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "movePatternGroupId")]
pub move_pattern_group_id: Option<i32>,
#[serde(rename = "npcNameTextId")]
pub npc_name_text_id: Option<i32>,
#[serde(rename = "parttimePrefabName")]
pub parttime_prefab_name: String,
#[serde(rename = "parttimeType")]
pub parttime_type: i32,
#[serde(rename = "rewardCount")]
pub reward_count: Option<i32>,
#[serde(rename = "rewardId")]
pub reward_id: Option<i32>,
#[serde(rename = "rewardType")]
pub reward_type: Option<i32>,
}
pub struct CafeterianpctableTable {
records: Vec<Cafeterianpctable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CafeterianpctableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeterianpctable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
if let Some(group_id) = record.move_pattern_group_id {
by_group.entry(group_id).or_insert_with(Vec::new).push(idx);
}
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeterianpctable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cafeterianpctable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeterianpctable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeterianpctable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,66 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriatimetable {
#[serde(rename = "BgmParameter")]
pub bgm_parameter: Option<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "lightParameter")]
pub light_parameter: Option<i32>,
#[serde(rename = "spawnTime")]
pub spawn_time: i32,
#[serde(rename = "startTime")]
pub start_time: String,
}
pub struct CafeteriatimetableTable {
records: Vec<Cafeteriatimetable>,
by_id: HashMap<i32, usize>,
}
impl CafeteriatimetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriatimetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriatimetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriatimetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriatimetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,66 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cafeteriauniquenpcspawntable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "occurrenceRatio")]
pub occurrence_ratio: Vec<i32>,
#[serde(rename = "spawnMaxTime")]
pub spawn_max_time: i32,
#[serde(rename = "spawnMinTime")]
pub spawn_min_time: i32,
#[serde(rename = "spawnNpcId")]
pub spawn_npc_id: Vec<i32>,
}
pub struct CafeteriauniquenpcspawntableTable {
records: Vec<Cafeteriauniquenpcspawntable>,
by_id: HashMap<i32, usize>,
}
impl CafeteriauniquenpcspawntableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cafeteriauniquenpcspawntable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cafeteriauniquenpcspawntable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cafeteriauniquenpcspawntable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cafeteriauniquenpcspawntable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,100 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cashpackagetable {
#[serde(rename = "badgeResourceName")]
pub badge_resource_name: Option<String>,
#[serde(rename = "bannerFontLocalTextId")]
pub banner_font_local_text_id: Option<i32>,
#[serde(rename = "categoryResourceName")]
pub category_resource_name: Option<String>,
#[serde(rename = "contentsGroupId")]
pub contents_group_id: Option<i32>,
#[serde(rename = "contentsLocalTextId")]
pub contents_local_text_id: Option<i32>,
#[serde(rename = "contentsResourceName")]
pub contents_resource_name: Option<String>,
#[serde(rename = "contentsSortId")]
pub contents_sort_id: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "isActiveOnEnter")]
pub is_active_on_enter: Option<i32>,
#[serde(rename = "packageType")]
pub package_type: Option<i32>,
#[serde(rename = "paidShopGroupId")]
pub paid_shop_group_id: i32,
#[serde(rename = "paidShopId")]
pub paid_shop_id: i32,
#[serde(rename = "priority")]
pub priority: Option<i32>,
#[serde(rename = "resourceName")]
pub resource_name: Option<String>,
#[serde(rename = "saleGroup")]
pub sale_group: Option<i32>,
}
pub struct CashpackagetableTable {
records: Vec<Cashpackagetable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CashpackagetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cashpackagetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cashpackagetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cashpackagetable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cashpackagetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cashpackagetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,96 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cashproducttable {
#[serde(rename = "appleInAppId")]
pub apple_in_app_id: Option<String>,
#[serde(rename = "googleInAppId")]
pub google_in_app_id: Option<String>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "priceCount")]
pub price_count: Option<i32>,
#[serde(rename = "priceId")]
pub price_id: Option<i32>,
#[serde(rename = "priceType")]
pub price_type: Option<i32>,
#[serde(rename = "priority")]
pub priority: Option<i32>,
#[serde(rename = "productLocalTextId")]
pub product_local_text_id: i32,
#[serde(rename = "purchaseLimitCount")]
pub purchase_limit_count: Option<i32>,
#[serde(rename = "purchaseLimitType")]
pub purchase_limit_type: Option<i32>,
#[serde(rename = "randomboxId")]
pub randombox_id: i32,
#[serde(rename = "saleGroup")]
pub sale_group: Option<i32>,
#[serde(rename = "timeLimitType")]
pub time_limit_type: Option<i32>,
}
pub struct CashproducttableTable {
records: Vec<Cashproducttable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CashproducttableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cashproducttable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cashproducttable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cashproducttable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cashproducttable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cashproducttable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,86 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cashshoptable {
#[serde(rename = "bgImageName")]
pub bg_image_name: Option<String>,
#[serde(rename = "dialogueLocalTextId")]
pub dialogue_local_text_id: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "illustName")]
pub illust_name: String,
#[serde(rename = "priceId")]
pub price_id: Vec<i32>,
#[serde(rename = "priceType")]
pub price_type: Vec<i32>,
#[serde(rename = "priority")]
pub priority: i32,
#[serde(rename = "productGroupId")]
pub product_group_id: i32,
}
pub struct CashshoptableTable {
records: Vec<Cashshoptable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CashshoptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cashshoptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cashshoptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cashshoptable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cashshoptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cashshoptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,76 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Changemissiontable {
#[serde(rename = "endDate")]
pub end_date: String,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "startDate")]
pub start_date: String,
}
pub struct ChangemissiontableTable {
records: Vec<Changemissiontable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ChangemissiontableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Changemissiontable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Changemissiontable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Changemissiontable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Changemissiontable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Changemissiontable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,80 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Characterpictorialbooktable {
#[serde(rename = "charId")]
pub char_id: Vec<i32>,
#[serde(rename = "collectionBuffId")]
pub collection_buff_id: i32,
#[serde(rename = "groupDescLocalTextId")]
pub group_desc_local_text_id: i32,
#[serde(rename = "groupLocalTextId")]
pub group_local_text_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "tabType")]
pub tab_type: i32,
}
pub struct CharacterpictorialbooktableTable {
records: Vec<Characterpictorialbooktable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CharacterpictorialbooktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Characterpictorialbooktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_desc_local_text_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Characterpictorialbooktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Characterpictorialbooktable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Characterpictorialbooktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Characterpictorialbooktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,64 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Characterquickuitable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "quickUi")]
pub quick_ui: i32,
#[serde(rename = "quickUiLocalTextId")]
pub quick_ui_local_text_id: i32,
#[serde(rename = "quickUiSpriteName")]
pub quick_ui_sprite_name: String,
}
pub struct CharacterquickuitableTable {
records: Vec<Characterquickuitable>,
by_id: HashMap<i32, usize>,
}
impl CharacterquickuitableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Characterquickuitable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Characterquickuitable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Characterquickuitable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Characterquickuitable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,68 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Charawakegrowthtable {
#[serde(rename = "growthItemCount")]
pub growth_item_count: Option<Vec<i32>>,
#[serde(rename = "growthItemId")]
pub growth_item_id: Option<Vec<i32>>,
#[serde(rename = "growthItemType")]
pub growth_item_type: Option<Vec<i32>>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "statType")]
pub stat_type: i32,
#[serde(rename = "statValue")]
pub stat_value: f32,
}
pub struct CharawakegrowthtableTable {
records: Vec<Charawakegrowthtable>,
by_id: HashMap<i32, usize>,
}
impl CharawakegrowthtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Charawakegrowthtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Charawakegrowthtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Charawakegrowthtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Charawakegrowthtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,68 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Charawaketable {
#[serde(rename = "active")]
pub active: i32,
#[serde(rename = "growthId")]
pub growth_id: Vec<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "imprintSlot1")]
pub imprint_slot1: i32,
#[serde(rename = "imprintSlot2")]
pub imprint_slot2: i32,
#[serde(rename = "imprintSlot3")]
pub imprint_slot3: i32,
}
pub struct CharawaketableTable {
records: Vec<Charawaketable>,
by_id: HashMap<i32, usize>,
}
impl CharawaketableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Charawaketable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Charawaketable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Charawaketable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Charawaketable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,64 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Charfieldvoicetable {
#[serde(rename = "damageVoiceName")]
pub damage_voice_name: Option<String>,
#[serde(rename = "dashVoiceName")]
pub dash_voice_name: Option<String>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "liftVoiceName")]
pub lift_voice_name: Option<String>,
}
pub struct CharfieldvoicetableTable {
records: Vec<Charfieldvoicetable>,
by_id: HashMap<i32, usize>,
}
impl CharfieldvoicetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Charfieldvoicetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Charfieldvoicetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Charfieldvoicetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Charfieldvoicetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,76 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Chargrouptable {
#[serde(rename = "charId")]
pub char_id: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "level")]
pub level: i32,
}
pub struct ChargrouptableTable {
records: Vec<Chargrouptable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ChargrouptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Chargrouptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Chargrouptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Chargrouptable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Chargrouptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Chargrouptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,80 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Chargrowthtable {
#[serde(rename = "charLevelGroupId")]
pub char_level_group_id: i32,
#[serde(rename = "classupItemCount")]
pub classup_item_count: Option<Vec<i32>>,
#[serde(rename = "classupItemId")]
pub classup_item_id: Option<Vec<i32>>,
#[serde(rename = "classupItemType")]
pub classup_item_type: Option<Vec<i32>>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "maxLevel")]
pub max_level: i32,
}
pub struct ChargrowthtableTable {
records: Vec<Chargrowthtable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ChargrowthtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Chargrowthtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.char_level_group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Chargrowthtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Chargrowthtable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Chargrowthtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Chargrowthtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,60 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Charimprinttable {
#[serde(rename = "growthId")]
pub growth_id: Vec<i32>,
#[serde(rename = "id")]
pub id: i32,
}
pub struct CharimprinttableTable {
records: Vec<Charimprinttable>,
by_id: HashMap<i32, usize>,
}
impl CharimprinttableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Charimprinttable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Charimprinttable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Charimprinttable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Charimprinttable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,80 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Charleveltable {
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "health")]
pub health: Option<f32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "levelupExp")]
pub levelup_exp: Option<i32>,
#[serde(rename = "magicPower")]
pub magic_power: Option<f32>,
#[serde(rename = "physicalPower")]
pub physical_power: Option<f32>,
}
pub struct CharleveltableTable {
records: Vec<Charleveltable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CharleveltableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Charleveltable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Charleveltable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Charleveltable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Charleveltable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Charleveltable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,42 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Charlisttable {}
pub struct CharlisttableTable {
records: Vec<Charlisttable>,
}
impl CharlisttableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Charlisttable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Charlisttable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Charlisttable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,66 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Charrecoverytable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "recoveryAddItemCount")]
pub recovery_add_item_count: i32,
#[serde(rename = "recoveryItemCount")]
pub recovery_item_count: i32,
#[serde(rename = "recoveryItemType")]
pub recovery_item_type: i32,
#[serde(rename = "recoverySquadLevel")]
pub recovery_squad_level: i32,
}
pub struct CharrecoverytableTable {
records: Vec<Charrecoverytable>,
by_id: HashMap<i32, usize>,
}
impl CharrecoverytableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Charrecoverytable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Charrecoverytable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Charrecoverytable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Charrecoverytable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,98 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Chartable {
#[serde(rename = "charGrowthId")]
pub char_growth_id: i32,
#[serde(rename = "charNameTextId")]
pub char_name_text_id: i32,
#[serde(rename = "criticalChanceValue")]
pub critical_chance_value: Option<f32>,
#[serde(rename = "criticalDamageRateValue")]
pub critical_damage_rate_value: Option<f32>,
#[serde(rename = "defaultCostumeId")]
pub default_costume_id: i32,
#[serde(rename = "element")]
pub element: Option<i32>,
#[serde(rename = "elementDefenseValue")]
pub element_defense_value: Option<f32>,
#[serde(rename = "elementPowerValue")]
pub element_power_value: Option<f32>,
#[serde(rename = "grade")]
pub grade: i32,
#[serde(rename = "growthgrade")]
pub growthgrade: i32,
#[serde(rename = "healthValue")]
pub health_value: f32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "magicDefenseValue")]
pub magic_defense_value: Option<f32>,
#[serde(rename = "magicPowerValue")]
pub magic_power_value: Option<f32>,
#[serde(rename = "nextCharId")]
pub next_char_id: Option<i32>,
#[serde(rename = "physicalDefenseValue")]
pub physical_defense_value: Option<f32>,
#[serde(rename = "physicalPowerValue")]
pub physical_power_value: Option<f32>,
#[serde(rename = "talentId")]
pub talent_id: Option<i32>,
#[serde(rename = "type")]
pub r#type: Option<i32>,
#[serde(rename = "uniqueCharId")]
pub unique_char_id: i32,
#[serde(rename = "usePackTemporary")]
pub use_pack_temporary: Option<i32>,
}
pub struct ChartableTable {
records: Vec<Chartable>,
by_id: HashMap<i32, usize>,
}
impl ChartableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Chartable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Chartable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Chartable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Chartable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Chatresourcetable {
#[serde(rename = "chatResourceType")]
pub chat_resource_type: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "resourceName")]
pub resource_name: String,
}
pub struct ChatresourcetableTable {
records: Vec<Chatresourcetable>,
by_id: HashMap<i32, usize>,
}
impl ChatresourcetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Chatresourcetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Chatresourcetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Chatresourcetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Chatresourcetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,106 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cinematalktable {
#[serde(rename = "acceptTimeline")]
pub accept_timeline: Option<i32>,
#[serde(rename = "backgroundImgName")]
pub background_img_name: Option<String>,
#[serde(rename = "bubbleType")]
pub bubble_type: Option<i32>,
#[serde(rename = "dialogStoryTextId")]
pub dialog_story_text_id: Option<i32>,
#[serde(rename = "emotionType")]
pub emotion_type: Option<i32>,
#[serde(rename = "faceIllustName")]
pub face_illust_name: Option<String>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "illustCharAnimation")]
pub illust_char_animation: Option<Vec<String>>,
#[serde(rename = "illustUniqueCharId")]
pub illust_unique_char_id: Option<Vec<i32>>,
#[serde(rename = "nameTextId")]
pub name_text_id: Option<i32>,
#[serde(rename = "packId")]
pub pack_id: Option<i32>,
#[serde(rename = "packIndex")]
pub pack_index: Option<String>,
#[serde(rename = "questGroupId")]
pub quest_group_id: Option<i32>,
#[serde(rename = "questGroupIndex")]
pub quest_group_index: Option<i32>,
#[serde(rename = "speakerName")]
pub speaker_name: Option<String>,
#[serde(rename = "state")]
pub state: Option<i32>,
#[serde(rename = "tabType")]
pub tab_type: Option<i32>,
#[serde(rename = "voiceResourceName")]
pub voice_resource_name: Option<String>,
}
pub struct CinematalktableTable {
records: Vec<Cinematalktable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CinematalktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cinematalktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
if let Some(group_id) = record.quest_group_id {
by_group.entry(group_id).or_insert_with(Vec::new).push(idx);
}
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cinematalktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Cinematalktable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cinematalktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cinematalktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,42 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cleardatatable {}
pub struct CleardatatableTable {
records: Vec<Cleardatatable>,
}
impl CleardatatableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cleardatatable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Cleardatatable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cleardatatable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,71 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Clearevilcastletable {
#[serde(rename = "contentsTicketId")]
pub contents_ticket_id: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "rewardRandomBoxId")]
pub reward_random_box_id: i32,
#[serde(rename = "towerMagicId")]
pub tower_magic_id: i32,
#[serde(rename = "towerType")]
pub tower_type: i32,
#[serde(rename = "type")]
pub r#type: Option<i32>,
}
pub struct ClearevilcastletableTable {
records: Vec<Clearevilcastletable>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ClearevilcastletableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Clearevilcastletable> = serde_json::from_str(&json)?;
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_group,
})
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Clearevilcastletable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Clearevilcastletable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Clearevilcastletable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,71 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Clearpacktable {
#[serde(rename = "contentsTicketId")]
pub contents_ticket_id: i32,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "packId")]
pub pack_id: i32,
#[serde(rename = "packLevel")]
pub pack_level: Option<i32>,
#[serde(rename = "rewardRandomBoxId")]
pub reward_random_box_id: i32,
#[serde(rename = "type")]
pub r#type: Option<i32>,
}
pub struct ClearpacktableTable {
records: Vec<Clearpacktable>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ClearpacktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Clearpacktable> = serde_json::from_str(&json)?;
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_group,
})
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Clearpacktable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Clearpacktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Clearpacktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,60 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Collabotable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "nameTextId")]
pub name_text_id: String,
}
pub struct CollabotableTable {
records: Vec<Collabotable>,
by_id: HashMap<i32, usize>,
}
impl CollabotableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Collabotable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Collabotable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Collabotable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Collabotable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,70 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Collectiontable {
#[serde(rename = "grade")]
pub grade: i32,
#[serde(rename = "iconSpriteName")]
pub icon_sprite_name: String,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "itemDescNameTextId")]
pub item_desc_name_text_id: i32,
#[serde(rename = "itemNameTextId")]
pub item_name_text_id: i32,
#[serde(rename = "itemSubNameTextId")]
pub item_sub_name_text_id: i32,
#[serde(rename = "notTrash")]
pub not_trash: i32,
}
pub struct CollectiontableTable {
records: Vec<Collectiontable>,
by_id: HashMap<i32, usize>,
}
impl CollectiontableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Collectiontable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Collectiontable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Collectiontable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Collectiontable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,72 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Commonsoundtable {
#[serde(rename = "bgmPlayerHidden")]
pub bgm_player_hidden: Option<i32>,
#[serde(rename = "contentTicketId")]
pub content_ticket_id: Option<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "packId")]
pub pack_id: Option<i32>,
#[serde(rename = "sortId")]
pub sort_id: Option<i32>,
#[serde(rename = "soundNameTextId")]
pub sound_name_text_id: Option<i32>,
#[serde(rename = "soundPath")]
pub sound_path: String,
#[serde(rename = "soundSourceNameTextId")]
pub sound_source_name_text_id: Option<i32>,
}
pub struct CommonsoundtableTable {
records: Vec<Commonsoundtable>,
by_id: HashMap<i32, usize>,
}
impl CommonsoundtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Commonsoundtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Commonsoundtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Commonsoundtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Commonsoundtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,52 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Communitydefinetable {
#[serde(rename = "friendSendExpireDay")]
pub friend_send_expire_day: i32,
#[serde(rename = "maxFriendCount")]
pub max_friend_count: i32,
#[serde(rename = "maxFriendRecommendCount")]
pub max_friend_recommend_count: i32,
#[serde(rename = "maxFriendRecvCount")]
pub max_friend_recv_count: i32,
#[serde(rename = "maxFriendSendCount")]
pub max_friend_send_count: i32,
}
pub struct CommunitydefinetableTable {
records: Vec<Communitydefinetable>,
}
impl CommunitydefinetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Communitydefinetable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Communitydefinetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Communitydefinetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,114 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Communityweblinktable {
#[serde(rename = "communityRewardCount")]
pub community_reward_count: Vec<i32>,
#[serde(rename = "communityRewardId")]
pub community_reward_id: Vec<i32>,
#[serde(rename = "communityRewardType")]
pub community_reward_type: Vec<i32>,
#[serde(rename = "linkIconCn1")]
pub link_icon_cn1: String,
#[serde(rename = "linkIconCn2")]
pub link_icon_cn2: String,
#[serde(rename = "linkIconCn3")]
pub link_icon_cn3: String,
#[serde(rename = "linkIconEn1")]
pub link_icon_en1: String,
#[serde(rename = "linkIconEn2")]
pub link_icon_en2: String,
#[serde(rename = "linkIconEn3")]
pub link_icon_en3: String,
#[serde(rename = "linkIconJp1")]
pub link_icon_jp1: String,
#[serde(rename = "linkIconJp2")]
pub link_icon_jp2: String,
#[serde(rename = "linkIconJp3")]
pub link_icon_jp3: String,
#[serde(rename = "linkIconKr1")]
pub link_icon_kr1: String,
#[serde(rename = "linkIconKr2")]
pub link_icon_kr2: String,
#[serde(rename = "linkIconKr3")]
pub link_icon_kr3: String,
#[serde(rename = "linkIconTw1")]
pub link_icon_tw1: String,
#[serde(rename = "linkIconTw2")]
pub link_icon_tw2: String,
#[serde(rename = "linkIconTw3")]
pub link_icon_tw3: String,
#[serde(rename = "linkUrlPathCn1")]
pub link_url_path_cn1: String,
#[serde(rename = "linkUrlPathCn2")]
pub link_url_path_cn2: String,
#[serde(rename = "linkUrlPathCn3")]
pub link_url_path_cn3: String,
#[serde(rename = "linkUrlPathEn1")]
pub link_url_path_en1: String,
#[serde(rename = "linkUrlPathEn2")]
pub link_url_path_en2: String,
#[serde(rename = "linkUrlPathEn3")]
pub link_url_path_en3: String,
#[serde(rename = "linkUrlPathJp1")]
pub link_url_path_jp1: String,
#[serde(rename = "linkUrlPathJp2")]
pub link_url_path_jp2: String,
#[serde(rename = "linkUrlPathJp3")]
pub link_url_path_jp3: String,
#[serde(rename = "linkUrlPathKr1")]
pub link_url_path_kr1: String,
#[serde(rename = "linkUrlPathKr2")]
pub link_url_path_kr2: String,
#[serde(rename = "linkUrlPathKr3")]
pub link_url_path_kr3: String,
#[serde(rename = "linkUrlPathTw1")]
pub link_url_path_tw1: String,
#[serde(rename = "linkUrlPathTw2")]
pub link_url_path_tw2: String,
#[serde(rename = "linkUrlPathTw3")]
pub link_url_path_tw3: String,
#[serde(rename = "surveyRewardCount")]
pub survey_reward_count: Vec<i32>,
#[serde(rename = "surveyRewardId")]
pub survey_reward_id: Vec<i32>,
#[serde(rename = "surveyRewardType")]
pub survey_reward_type: Vec<i32>,
}
pub struct CommunityweblinktableTable {
records: Vec<Communityweblinktable>,
}
impl CommunityweblinktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Communityweblinktable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Communityweblinktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Communityweblinktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Contentgenretable {
#[serde(rename = "genreDescQuestTextId")]
pub genre_desc_quest_text_id: i32,
#[serde(rename = "genreTitleQuestTextId")]
pub genre_title_quest_text_id: Vec<i32>,
#[serde(rename = "id")]
pub id: i32,
}
pub struct ContentgenretableTable {
records: Vec<Contentgenretable>,
by_id: HashMap<i32, usize>,
}
impl ContentgenretableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Contentgenretable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Contentgenretable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Contentgenretable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Contentgenretable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,68 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Contentopenguidetable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "magicValue")]
pub magic_value: i32,
#[serde(rename = "openDescLocalTextId")]
pub open_desc_local_text_id: i32,
#[serde(rename = "openIconName")]
pub open_icon_name: String,
#[serde(rename = "openTitleLocalTextId")]
pub open_title_local_text_id: i32,
#[serde(rename = "type")]
pub r#type: i32,
}
pub struct ContentopenguidetableTable {
records: Vec<Contentopenguidetable>,
by_id: HashMap<i32, usize>,
}
impl ContentopenguidetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Contentopenguidetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Contentopenguidetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Contentopenguidetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Contentopenguidetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,76 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Contentopentable {
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "openHelpLocalTextId")]
pub open_help_local_text_id: Option<i32>,
#[serde(rename = "ticketId")]
pub ticket_id: i32,
}
pub struct ContentopentableTable {
records: Vec<Contentopentable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl ContentopentableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Contentopentable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Contentopentable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Contentopentable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Contentopentable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Contentopentable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Contentrankinfotable {
#[serde(rename = "evilCastleFloorMyRankMaxCount")]
pub evil_castle_floor_my_rank_max_count: i32,
#[serde(rename = "evilCastleFloorTopRankMaxCount")]
pub evil_castle_floor_top_rank_max_count: i32,
#[serde(rename = "evilCastleTotalMyRankMaxCount")]
pub evil_castle_total_my_rank_max_count: i32,
#[serde(rename = "evilCastleTotalTopRankMaxCount")]
pub evil_castle_total_top_rank_max_count: i32,
#[serde(rename = "mirrorWarMyRankMaxCount")]
pub mirror_war_my_rank_max_count: i32,
#[serde(rename = "mirrorWarTopRankMaxCount")]
pub mirror_war_top_rank_max_count: i32,
#[serde(rename = "monsterHuntMyRankMaxCount")]
pub monster_hunt_my_rank_max_count: i32,
#[serde(rename = "monsterHuntTopRankMaxCount")]
pub monster_hunt_top_rank_max_count: i32,
#[serde(rename = "roguelikeMyRankMaxCount")]
pub roguelike_my_rank_max_count: i32,
#[serde(rename = "roguelikeTopRankMaxCount")]
pub roguelike_top_rank_max_count: i32,
}
pub struct ContentrankinfotableTable {
records: Vec<Contentrankinfotable>,
}
impl ContentrankinfotableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Contentrankinfotable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Contentrankinfotable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Contentrankinfotable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,70 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Contentsrankrewardtable {
#[serde(rename = "contentsType")]
pub contents_type: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "rank")]
pub rank: i32,
#[serde(rename = "rewardCount")]
pub reward_count: Vec<i32>,
#[serde(rename = "rewardId")]
pub reward_id: Vec<i32>,
#[serde(rename = "rewardType")]
pub reward_type: Vec<i32>,
#[serde(rename = "season")]
pub season: Option<i32>,
}
pub struct ContentsrankrewardtableTable {
records: Vec<Contentsrankrewardtable>,
by_id: HashMap<i32, usize>,
}
impl ContentsrankrewardtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Contentsrankrewardtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Contentsrankrewardtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Contentsrankrewardtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Contentsrankrewardtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,68 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Contenttickettable {
#[serde(rename = "iconSpriteName")]
pub icon_sprite_name: Option<String>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "itemDescNameTextId")]
pub item_desc_name_text_id: Option<i32>,
#[serde(rename = "itemNameTextId")]
pub item_name_text_id: Option<i32>,
#[serde(rename = "itemSubNameTextId")]
pub item_sub_name_text_id: Option<i32>,
#[serde(rename = "type")]
pub r#type: i32,
}
pub struct ContenttickettableTable {
records: Vec<Contenttickettable>,
by_id: HashMap<i32, usize>,
}
impl ContenttickettableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Contenttickettable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Contenttickettable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Contenttickettable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Contenttickettable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,68 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Contentweblinktable {
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "linkUrlPathCn")]
pub link_url_path_cn: String,
#[serde(rename = "linkUrlPathEn")]
pub link_url_path_en: String,
#[serde(rename = "linkUrlPathJp")]
pub link_url_path_jp: String,
#[serde(rename = "linkUrlPathKr")]
pub link_url_path_kr: String,
#[serde(rename = "linkUrlPathTw")]
pub link_url_path_tw: String,
}
pub struct ContentweblinktableTable {
records: Vec<Contentweblinktable>,
by_id: HashMap<i32, usize>,
}
impl ContentweblinktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Contentweblinktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Contentweblinktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Contentweblinktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Contentweblinktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,62 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cookingpictorialbooktable {
#[serde(rename = "collectionBuffId")]
pub collection_buff_id: i32,
#[serde(rename = "cookingId")]
pub cooking_id: i32,
#[serde(rename = "id")]
pub id: i32,
}
pub struct CookingpictorialbooktableTable {
records: Vec<Cookingpictorialbooktable>,
by_id: HashMap<i32, usize>,
}
impl CookingpictorialbooktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cookingpictorialbooktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cookingpictorialbooktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cookingpictorialbooktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cookingpictorialbooktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,48 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cookingresearchtable {
#[serde(rename = "catalystValue")]
pub catalyst_value: Vec<i32>,
#[serde(rename = "failItemId")]
pub fail_item_id: i32,
#[serde(rename = "useSlotCount")]
pub use_slot_count: Vec<i32>,
}
pub struct CookingresearchtableTable {
records: Vec<Cookingresearchtable>,
}
impl CookingresearchtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cookingresearchtable> = serde_json::from_str(&json)?;
Ok(Self {
records,
})
}
#[inline]
pub fn all(&self) -> &[Cookingresearchtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cookingresearchtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,84 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Cookingtable {
#[serde(rename = "grade")]
pub grade: i32,
#[serde(rename = "iconSpriteName")]
pub icon_sprite_name: String,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "itemAcquireId")]
pub item_acquire_id: Option<Vec<i32>>,
#[serde(rename = "itemDescNameTextId")]
pub item_desc_name_text_id: i32,
#[serde(rename = "itemSubNameTextId")]
pub item_sub_name_text_id: i32,
#[serde(rename = "materialItemCount")]
pub material_item_count: Vec<i32>,
#[serde(rename = "materialItemId")]
pub material_item_id: Vec<i32>,
#[serde(rename = "packId")]
pub pack_id: i32,
#[serde(rename = "recipeNameTextId")]
pub recipe_name_text_id: i32,
#[serde(rename = "resultItemCount")]
pub result_item_count: i32,
#[serde(rename = "resultItemId")]
pub result_item_id: i32,
#[serde(rename = "stackCount")]
pub stack_count: i32,
#[serde(rename = "talentLevel")]
pub talent_level: i32,
}
pub struct CookingtableTable {
records: Vec<Cookingtable>,
by_id: HashMap<i32, usize>,
}
impl CookingtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Cookingtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Cookingtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Cookingtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Cookingtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,100 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Costumedesignconceptinfotable {
#[serde(rename = "ageProfileTextId")]
pub age_profile_text_id: i32,
#[serde(rename = "associationProfileTextId")]
pub association_profile_text_id: i32,
#[serde(rename = "birthDayProfileTextId")]
pub birth_day_profile_text_id: i32,
#[serde(rename = "cutSceneDialogProfileTextId")]
pub cut_scene_dialog_profile_text_id: Option<Vec<i32>>,
#[serde(rename = "cutSceneDialogVoiceResourceName")]
pub cut_scene_dialog_voice_resource_name: Option<Vec<String>>,
#[serde(rename = "dislikeProfileTextId")]
pub dislike_profile_text_id: i32,
#[serde(rename = "favoriteProfileTextId")]
pub favorite_profile_text_id: i32,
#[serde(rename = "generalDialogProfileTextId")]
pub general_dialog_profile_text_id: Vec<i32>,
#[serde(rename = "generalDialogVoiceResourceName")]
pub general_dialog_voice_resource_name: Vec<String>,
#[serde(rename = "heightProfileTextId")]
pub height_profile_text_id: i32,
#[serde(rename = "hobbyProfileTextId")]
pub hobby_profile_text_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "preciousProfileTextId")]
pub precious_profile_text_id: i32,
#[serde(rename = "rumor1ProfileTextId")]
pub rumor1_profile_text_id: i32,
#[serde(rename = "rumor2ProfileTextId")]
pub rumor2_profile_text_id: i32,
#[serde(rename = "skillDialogProfileTextId")]
pub skill_dialog_profile_text_id: Option<Vec<i32>>,
#[serde(rename = "skillDialogVoiceResourceName")]
pub skill_dialog_voice_resource_name: Option<Vec<String>>,
#[serde(rename = "summaryProfileTextId")]
pub summary_profile_text_id: i32,
#[serde(rename = "talentDialogProfileTextId")]
pub talent_dialog_profile_text_id: Option<Vec<i32>>,
#[serde(rename = "talentDialogVoiceResourceName")]
pub talent_dialog_voice_resource_name: Option<Vec<String>>,
#[serde(rename = "victoryDialogProfileTextId")]
pub victory_dialog_profile_text_id: Vec<i32>,
#[serde(rename = "victoryDialogVoiceResourceName")]
pub victory_dialog_voice_resource_name: Vec<String>,
}
pub struct CostumedesignconceptinfotableTable {
records: Vec<Costumedesignconceptinfotable>,
by_id: HashMap<i32, usize>,
}
impl CostumedesignconceptinfotableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Costumedesignconceptinfotable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Costumedesignconceptinfotable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Costumedesignconceptinfotable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Costumedesignconceptinfotable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,88 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Costumedesigntable {
#[serde(rename = "costumeId")]
pub costume_id: Option<i32>,
#[serde(rename = "faceIconName")]
pub face_icon_name: Option<String>,
#[serde(rename = "faceIllustName")]
pub face_illust_name: Option<String>,
#[serde(rename = "iconSpriteName")]
pub icon_sprite_name: Option<String>,
#[serde(rename = "id")]
pub id: Option<i32>,
#[serde(rename = "illustName")]
pub illust_name: Option<String>,
#[serde(rename = "inventoryIllustName")]
pub inventory_illust_name: Option<String>,
#[serde(rename = "isCollabo")]
pub is_collabo: Option<i32>,
#[serde(rename = "lobbyCutscene")]
pub lobby_cutscene: Option<String>,
#[serde(rename = "loopPrefabName")]
pub loop_prefab_name: Option<Vec<String>>,
#[serde(rename = "prefabName")]
pub prefab_name: Option<String>,
#[serde(rename = "simpleIllustName")]
pub simple_illust_name: Option<String>,
#[serde(rename = "skillIllustName")]
pub skill_illust_name: Option<Vec<String>>,
#[serde(rename = "skillTimelineName")]
pub skill_timeline_name: Option<String>,
#[serde(rename = "voiceResourceName")]
pub voice_resource_name: Option<String>,
}
pub struct CostumedesigntableTable {
records: Vec<Costumedesigntable>,
by_id: HashMap<i32, usize>,
}
impl CostumedesigntableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Costumedesigntable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
if let Some(id) = record.id {
by_id.insert(id, idx);
}
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Costumedesigntable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Costumedesigntable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Costumedesigntable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,92 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Costumegrowthtable {
#[serde(rename = "getExchangeItemCount")]
pub get_exchange_item_count: Option<i32>,
#[serde(rename = "getExchangeItemId")]
pub get_exchange_item_id: Option<i32>,
#[serde(rename = "getExchangeItemType")]
pub get_exchange_item_type: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "growthItemCount")]
pub growth_item_count: Option<Vec<i32>>,
#[serde(rename = "growthItemId")]
pub growth_item_id: Option<Vec<i32>>,
#[serde(rename = "growthItemType")]
pub growth_item_type: Option<Vec<i32>>,
#[serde(rename = "id")]
pub id: Option<i32>,
#[serde(rename = "mileageItemCount")]
pub mileage_item_count: Option<i32>,
#[serde(rename = "mileageItemType")]
pub mileage_item_type: Option<i32>,
#[serde(rename = "overExchangeCount")]
pub over_exchange_count: Option<i32>,
}
pub struct CostumegrowthtableTable {
records: Vec<Costumegrowthtable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CostumegrowthtableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Costumegrowthtable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
if let Some(id) = record.id {
by_id.insert(id, idx);
}
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Costumegrowthtable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Costumegrowthtable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Costumegrowthtable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Costumegrowthtable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,64 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Costumenodegrouptable {
#[serde(rename = "charUniqueId")]
pub char_unique_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "isActive")]
pub is_active: Option<i32>,
#[serde(rename = "nodeUIPrefab")]
pub node_u_i_prefab: Option<String>,
}
pub struct CostumenodegrouptableTable {
records: Vec<Costumenodegrouptable>,
by_id: HashMap<i32, usize>,
}
impl CostumenodegrouptableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Costumenodegrouptable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Costumenodegrouptable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Costumenodegrouptable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Costumenodegrouptable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,124 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Costumenodetable {
#[serde(rename = "activeItemCount")]
pub active_item_count: Vec<i32>,
#[serde(rename = "activeItemId")]
pub active_item_id: Vec<i32>,
#[serde(rename = "activeItemType")]
pub active_item_type: Vec<i32>,
#[serde(rename = "addBuffId")]
pub add_buff_id: Option<i32>,
#[serde(rename = "addBuffModifyBuffMagicValue")]
pub add_buff_modify_buff_magic_value: Option<f32>,
#[serde(rename = "addBuffModifyBuffTurn")]
pub add_buff_modify_buff_turn: Option<i32>,
#[serde(rename = "addBuffModifyBuffValue")]
pub add_buff_modify_buff_value: Option<f32>,
#[serde(rename = "addBuffOrder")]
pub add_buff_order: Option<i32>,
#[serde(rename = "addBuffTextOrder")]
pub add_buff_text_order: Option<i32>,
#[serde(rename = "attackRange")]
pub attack_range: Option<i32>,
#[serde(rename = "attackRangeCount")]
pub attack_range_count: Option<i32>,
#[serde(rename = "conditionAddBuffModifyBuffOrder")]
pub condition_add_buff_modify_buff_order: Option<i32>,
#[serde(rename = "conditionAddBuffModifyBuffTurn")]
pub condition_add_buff_modify_buff_turn: Option<i32>,
#[serde(rename = "conditionAddBuffModifyBuffValue")]
pub condition_add_buff_modify_buff_value: Option<f32>,
#[serde(rename = "conditionGrade")]
pub condition_grade: Option<i32>,
#[serde(rename = "conditionNodeId")]
pub condition_node_id: Option<Vec<i32>>,
#[serde(rename = "cooldownDecreaseValue")]
pub cooldown_decrease_value: Option<i32>,
#[serde(rename = "groupId")]
pub group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "modifyBuffMagicValue")]
pub modify_buff_magic_value: Option<f32>,
#[serde(rename = "modifyBuffOrder")]
pub modify_buff_order: Option<i32>,
#[serde(rename = "modifyBuffTurn")]
pub modify_buff_turn: Option<i32>,
#[serde(rename = "modifyBuffValue")]
pub modify_buff_value: Option<f32>,
#[serde(rename = "nodeGroupType")]
pub node_group_type: i32,
#[serde(rename = "nodeType")]
pub node_type: i32,
#[serde(rename = "spDecreaseValue")]
pub sp_decrease_value: Option<i32>,
#[serde(rename = "statType")]
pub stat_type: Option<i32>,
#[serde(rename = "statValue")]
pub stat_value: Option<f32>,
}
pub struct CostumenodetableTable {
records: Vec<Costumenodetable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CostumenodetableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Costumenodetable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Costumenodetable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Costumenodetable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Costumenodetable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Costumenodetable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,68 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Costumepictorialbooktable {
#[serde(rename = "chaUniqueId")]
pub cha_unique_id: i32,
#[serde(rename = "collectionBuffId")]
pub collection_buff_id: Vec<i32>,
#[serde(rename = "costumeID")]
pub costume_i_d: i32,
#[serde(rename = "enhanceValue")]
pub enhance_value: Vec<i32>,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "tabType")]
pub tab_type: i32,
}
pub struct CostumepictorialbooktableTable {
records: Vec<Costumepictorialbooktable>,
by_id: HashMap<i32, usize>,
}
impl CostumepictorialbooktableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Costumepictorialbooktable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
}
Ok(Self {
records,
by_id,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Costumepictorialbooktable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Costumepictorialbooktable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Costumepictorialbooktable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

View File

@@ -0,0 +1,74 @@
// Auto-generated from JSON data
// Do not edit manually
use serde::{Deserialize, Serialize};
use anyhow::Result;
use std::collections::HashMap;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Costumeselecttable {
#[serde(rename = "costumeRewardGroupId")]
pub costume_reward_group_id: i32,
#[serde(rename = "id")]
pub id: i32,
#[serde(rename = "recommendCostumeId")]
pub recommend_costume_id: Vec<i32>,
}
pub struct CostumeselecttableTable {
records: Vec<Costumeselecttable>,
by_id: HashMap<i32, usize>,
by_group: HashMap<i32, Vec<usize>>,
}
impl CostumeselecttableTable {
pub fn load(path: &str) -> Result<Self> {
let json = std::fs::read_to_string(path)?;
let records: Vec<Costumeselecttable> = serde_json::from_str(&json)?;
let mut by_id = HashMap::with_capacity(records.len());
let mut by_group: HashMap<i32, Vec<usize>> = HashMap::new();
for (idx, record) in records.iter().enumerate() {
by_id.insert(record.id, idx);
by_group.entry(record.costume_reward_group_id).or_insert_with(Vec::new).push(idx);
}
Ok(Self {
records,
by_id,
by_group,
})
}
#[inline]
pub fn get(&self, id: i32) -> Option<&Costumeselecttable> {
self.by_id.get(&id).map(|&idx| &self.records[idx])
}
pub fn by_group(&self, group_id: i32) -> impl Iterator<Item = &Costumeselecttable> + '_ {
self.by_group
.get(&group_id)
.into_iter()
.flat_map(|indices| indices.iter())
.map(|&idx| &self.records[idx])
}
#[inline]
pub fn all(&self) -> &[Costumeselecttable] {
&self.records
}
#[inline]
pub fn iter(&self) -> std::slice::Iter<Costumeselecttable> {
self.records.iter()
}
pub fn len(&self) -> usize {
self.records.len()
}
pub fn is_empty(&self) -> bool {
self.records.is_empty()
}
}

Some files were not shown because too many files have changed in this diff Show More