Merge remote-tracking branch 'origin/development' into development

# Conflicts:
#	README.md
This commit is contained in:
KingRainbow44
2023-12-05 21:40:51 -05:00
229 changed files with 21308 additions and 878 deletions

View File

@@ -2,7 +2,6 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto

View File

@@ -1,6 +1,11 @@
# Lunar Core
A game server reimplementation for version 1.5.0 of a certain turn-based anime game for educational purposes.\
For any extra support, questions, or discussions, check out our [Discord](https://discord.gg/cfPKJ6N5hw).
![LunarCore](https://socialify.git.ci/Melledy/LunarCore/image?description=1&descriptionEditable=A%20game%20server%20reimplementation%20for%20version%201.5.0%20of%20a%20certain%20turn-based%20anime%20game%20for%20educational%20purposes.%20&font=Inter&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
<div align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Melledy/LunarCore?logo=java&style=for-the-badge"> <img alt="GitHub" src="https://img.shields.io/github/license/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Melledy/LunarCore/build.yml?branch=development&logo=github&style=for-the-badge"></div>
<div align="center"><a href="https://discord.gg/cfPKJ6N5hw"><img alt="Discord - Grasscutter" src="https://img.shields.io/discord/1163718404067303444?label=Discord&logo=discord&style=for-the-badge"></a></div>
[EN](README.md) | [简中](docs/README_zh-CN.md) | [繁中](docs/README_zh-TW.md) | [JP](docs/README_ja-JP.md) | [RU](docs/README_ru-RU.md) | [FR](docs/README_fr-FR.md) | [KR](docs/README_ko-KR.md)
**Attention:** For any extra support, questions, or discussions, check out our [Discord](https://discord.gg/cfPKJ6N5hw).
### Notable features
- Basic game features: Logging in, team setup, inventory, basic scene/entity management
@@ -23,19 +28,18 @@ For any extra support, questions, or discussions, check out our [Discord](https:
* [MongoDB 4.0+](https://www.mongodb.com/try/download/community)
### Compiling the server
1. Download the files from [https://gitlab.com/Melledy/LunarCore-Protos](https://gitlab.com/Melledy/LunarCore-Protos) and place the proto folder into your server directory
2. Open your system terminal, and compile the server with `./gradlew jar`
3. Create a folder named `resources` in your server directory
4. Download the `Config`, `TextMap`, and `ExcelBin` folders from [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) and place them into your resources folder.
5. Download the `Config` folder from [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) and place them into your resources folder. REPLACE any files that your system asks about. These are for world spawns and are quite important for the server.
6. Run the server with `java -jar LunarCore.jar` from your system terminal. Lunar Core comes with a built-in internal MongoDB server for its database, so no MongoDB installation is required. However, it is highly recommended to install Mongodb anyway.
7. If you have `autoCreateAccount` set to true in the config, then you can skip creating an account. Otherwise, use the `/account` command in the server console to create one.
1. Open your system terminal, and compile the server with `./gradlew jar`
2. Create a folder named `resources` in your server directory
3. Download the `Config`, `TextMap`, and `ExcelBin` folders from [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) and place them into your resources folder.
4. Download the `Config` folder from [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) and place them into your resources folder. REPLACE any files that your system asks about. These are for world spawns and are quite important for the server.
5. Run the server with `java -jar LunarCore.jar` from your system terminal. Lunar Core comes with a built-in internal MongoDB server for its database, so no Mongodb installation is required. However, it is highly recommended to install Mongodb anyway.
6. If you have `autoCreateAccount` set to true in the config, then you can skip creating an account. Otherwise, use the `/account` command in the server console to create one.
### Connecting with the client (Fiddler)
1. **Login with the client to an official server and HoYoverse account at least once to download game data.**
1. **Login with the client to an official server and Hoyoverse account at least once to download game data.**
2. Install and have [Fiddler Classic](https://www.telerik.com/fiddler) running.
3. Set Fiddler to decrypt https traffic. (Tools -> Options -> HTTPS -> Decrypt HTTPS traffic) Make sure `Ignore server certificate errors` is checked as well.
4. Copy and paste the following code into the `Fiddlerscript` tab of Fiddler Classic:
3. Set fiddler to decrypt https traffic. (Tools -> Options -> HTTPS -> Decrypt HTTPS traffic) Make sure `ignore server certificate errors` is checked as well.
4. Copy and paste the following code into the Fiddlerscript tab of Fiddler Classic:
```
import System;
@@ -60,14 +64,17 @@ Server commands can be run in the server console or in-game. There is a dummy us
```
/account {create | delete} [username] (reserved player uid). Creates or deletes an account.
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). Sets the current avatar's properties
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). Sets the current avatar's properties.
/clear {relics | lightcones | materials | items}. Removes filtered items from the player inventory.
/gender {male | female}. Sets the player gender.
/give [item id] x[amount]. Gives the targetted player an item.
/giveall {materials | avatars}. Gives the targeted player items.
/give [item id] x[amount] lv[number]. Gives the targetted player an item.
/giveall {materials | avatars | lightcones | relics}. Gives the targeted player items.
/heal. Heals your avatars.
/help. Displays a list of available commands.
/kick @[player id]. Kicks a player from the server.
/mail [content]. Sends the targeted player a system mail.
/permission {add | remove | clear} [permission]. Gives/removes a permission from the targeted player.
/refill. Refill your skill points in open world.
/reload. Reloads the server config.
/scene [scene id] [floor id]. Teleports the player to the specified scene.
/spawn [monster/prop id] x[amount] s[stage id]. Spawns a monster or prop near the targeted player.

View File

@@ -70,8 +70,8 @@ dependencies {
implementation fileTree(dir: 'lib', include: ['*.jar'])
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.9'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.11'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.11'
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.4.14'
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.4.14'
implementation group: 'it.unimi.dsi', name: 'fastutil-core', version: '8.5.12'
implementation group: 'org.reflections', name: 'reflections', version: '0.10.2'
@@ -79,19 +79,19 @@ dependencies {
implementation group: 'com.google.code.gson', name: 'gson', version: '2.10.1'
implementation group: 'us.hebi.quickbuf', name: 'quickbuf-runtime', version: '1.3.1'
implementation group: 'io.javalin', name: 'javalin', version: '5.6.2'
implementation group: 'io.javalin', name: 'javalin', version: '5.6.3'
implementation group: 'io.netty', name: 'netty-common', version: '4.1.98.Final'
implementation group: 'io.netty', name: 'netty-handler', version: '4.1.98.Final'
implementation group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.98.Final'
implementation group: 'io.netty', name: 'netty-transport-native-kqueue', version: '4.1.98.Final'
implementation group: 'io.netty', name: 'netty-common', version: '4.1.101.Final'
implementation group: 'io.netty', name: 'netty-handler', version: '4.1.101.Final'
implementation group: 'io.netty', name: 'netty-transport-native-epoll', version: '4.1.101.Final'
implementation group: 'io.netty', name: 'netty-transport-native-kqueue', version: '4.1.101.Final'
implementation group: 'dev.morphia.morphia', name: 'morphia-core', version: '2.3.8'
implementation group: 'dev.morphia.morphia', name: 'morphia-core', version: '2.3.9'
implementation group: 'de.bwaldvogel', name: 'mongo-java-server', version: '1.44.0'
implementation group: 'de.bwaldvogel', name: 'mongo-java-server-h2-backend', version: '1.44.0'
implementation group: 'org.jline', name: 'jline', version: '3.23.0'
implementation group: 'org.jline', name: 'jline-terminal-jansi', version: '3.23.0'
implementation group: 'org.jline', name: 'jline', version: '3.24.1'
implementation group: 'org.jline', name: 'jline-terminal-jansi', version: '3.24.1'
protobuf files('proto/')

View File

@@ -1,61 +1,374 @@
[
{
"id": 1001,
"gachaType": "Normal",
"beginTime": 0,
"endTime": 0,
"rateUpItems5": [],
"rateUpItems4": []
},
{
"id": 2014,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1217],
"rateUpItems4": [1002, 1008, 1103]
},
{
"id": 3014,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"eventChance": 75,
"rateUpItems5": [23017],
"rateUpItems4": [21007, 21016, 21017]
},
{
"id": 2015,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1302],
"rateUpItems4": [1009, 1110, 1215]
},
{
"id": 3015,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"eventChance": 75,
"rateUpItems5": [23018],
"rateUpItems4": [21000, 21006, 21019]
},
{
"id": 2016,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1006],
"rateUpItems4": [1009, 1110, 1215]
},
{
"id": 3016,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"eventChance": 75,
"rateUpItems5": [23007],
"rateUpItems4": [21000, 21006, 21019]
}
{
"id": 1001,
"gachaType": "Normal",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [1001,1002,1003,1004,1008,1009,1013,1101,1103,1104,1105,1106,1107,1108,1109,1201,1202,1206,1209,1211,21000,21001,21002,21003,21004,21005,21006,21007,21008,21009,21010,21011,21012,21013,21014,21015,21016,21017,21018,21019,21020,23000,23002,23003,23004,23005,23012,23013],
"rateUpItems4": [23002,1003,1101,1104,23000,23003]
},
{
"id": 2001,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1102
],
"rateUpItems4": [
1105,
1106,
1109
]
},
{
"id": 3001,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23001
],
"rateUpItems4": [
21001,
21005,
21000
]
},
{
"id": 2002,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1204
],
"rateUpItems4": [
1206,
1001,
1103
]
},
{
"id": 3002,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23010
],
"rateUpItems4": [
21003,
21002,
21013
]
},
{
"id": 2005,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1006
],
"rateUpItems4": [
1002,
1009,
1103
]
},
{
"id": 3005,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23007
],
"rateUpItems4": [
21017,
21004,
21013
]
},
{
"id": 2006,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1203
],
"rateUpItems4": [
1106,
1201,
1207
]
},
{
"id": 3006,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23008
],
"rateUpItems4": [
21001,
21018,
21020
]
},
{
"id": 2007,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1205
],
"rateUpItems4": [
1008,
1206,
1105
]
},
{
"id": 3007,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23009
],
"rateUpItems4": [
21012,
21010,
21007
]
},
{
"id": 2008,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1005
],
"rateUpItems4": [
1111,
1108,
1103
]
},
{
"id": 3008,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23006
],
"rateUpItems4": [
21015,
21008,
21006
]
},
{
"id": 2009,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1213
],
"rateUpItems4": [
1207,
1009,
1001
]
},
{
"id": 3009,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23015
],
"rateUpItems4": [
21011,
21018,
21009
]
},
{
"id": 2010,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1208
],
"rateUpItems4": [
1110,
1109,
1106
]
},
{
"id": 3010,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23011
],
"rateUpItems4": [
21016,
21014,
21019
]
},
{
"id": 2011,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1212
],
"rateUpItems4": [
1202,
1201,
1108
]
},
{
"id": 3011,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23014
],
"rateUpItems4": [
21008,
21004,
21013
]
},
{
"id": 2012,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1112
],
"rateUpItems4": [
1210,
1111,
1206
]
},
{
"id": 3012,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23016
],
"rateUpItems4": [
21003,
21018,
21015
]
},
{
"id": 2014,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1217
],
"rateUpItems4": [
1002,
1008,
1103
]
},
{
"id": 3014,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23017
],
"rateUpItems4": [
21007,
21017,
21016
]
},
{
"id": 2015,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1302
],
"rateUpItems4": [
1215,
1110,
1009
]
},
{
"id": 3015,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23018
],
"rateUpItems4": [
21019,
21000,
21006
]
},
{
"id": 2016,
"gachaType": "AvatarUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
1006
],
"rateUpItems4": [
1215,
1110,
1009
]
},
{
"id": 3016,
"gachaType": "WeaponUp",
"beginTime": 0,
"endTime": 1924992000,
"rateUpItems5": [
23007
],
"rateUpItems4": [
21019,
21000,
21006
]
}
]

View File

@@ -6,9 +6,9 @@
"32": [122311, 122321, 122331],
"4": [122611, 122612, 131611, 131612],
"5": [122511, 122512, 122513],
"6": [300121, 300122, 300132],
"6": [300112, 300122, 300132],
"71": [300412, 300422, 300432],
"72": [300212, 300222, 300232, 300242],
"72": [300212, 300222, 300242],
"8": [300611, 300612],
"9": [300511, 300512, 300513],
"10": [131213, 131223, 131233],

83
docs/README_fr-FR.md Normal file
View File

@@ -0,0 +1,83 @@
![LunarCore](https://socialify.git.ci/Melledy/LunarCore/image?description=1&descriptionEditable=A%20game%20server%20reimplementation%20for%20version%201.5.0%20of%20a%20certain%20turn-based%20anime%20game%20for%20educational%20purposes.%20&font=Inter&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
<div align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Melledy/LunarCore?logo=java&style=for-the-badge"> <img alt="GitHub" src="https://img.shields.io/github/license/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Melledy/LunarCore/build.yml?branch=development&logo=github&style=for-the-badge"></div>
<div align="center"><a href="https://discord.gg/cfPKJ6N5hw"><img alt="Discord - Grasscutter" src="https://img.shields.io/discord/1163718404067303444?label=Discord&logo=discord&style=for-the-badge"></a></div>
[EN](../README.md) | [简中](README_zh-CN.md) | [繁中](README_zh-TW.md) | [JP](README_ja-JP.md) | [RU](README_ru-RU.md) | [FR](README_fr-FR.md) | [KR](README_ko-KR.md)
**Attention:** Pour tout soutien supplémentaire, questions ou discussions, consultez notre [Discord](https://discord.gg/cfPKJ6N5hw).
### Caractéristiques notables
- Fonctionnalités de base du jeu : Connexion, configuration de l'équipe, inventaire, gestion de base des scènes et des entités
- Les batailles de monstres fonctionnent
- Apparition de monstres/prop/NPC dans le monde naturel
- La plupart des techniques de personnages sont gérées
- Les boutiques de PNJ sont gérées
- Système de Gacha
- Système de courrier
- Système d'amis (les aides ne fonctionnent pas encore)
- Salle oubliée (avec les fonctionnalités de la 1.4.0)
- Univers simulé (les runs peuvent être terminés, mais il manque de nombreuses fonctionnalités)
# Exécution du serveur et du client
### Prérequis
* [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
### Recommandé
* [MongoDB 4.0+](https://www.mongodb.com/try/download/community)
### Compilation du serveur
1. Ouvrez votre terminal système, et compilez le serveur avec `./gradlew jar`
2. Créez un dossier nommé `resources` dans le répertoire de votre serveur.
3. Téléchargez les dossiers `Config`, `TextMap`, et `ExcelBin` depuis [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) et placez-les dans votre dossier resources.
4. Téléchargez le dossier `Config` depuis [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) et placez-le dans votre dossier resources. Remplacez tous les fichiers demandés par votre système. Ceux-ci sont destinés à l'apparition des mondes et sont très importants pour le serveur.
5. Lancez le serveur avec `java -jar LunarCore.jar` depuis votre terminal. Lunar Core est livré avec un serveur MongoDB interne intégré pour sa base de données, donc aucune installation de Mongodb n'est nécessaire. Cependant, il est fortement recommandé d'installer Mongodb de toute façon.
6. Si vous avez mis `autoCreateAccount` à true dans la configuration, alors vous pouvez sauter la création d'un compte. Sinon, utilisez la commande `/account` dans la console du serveur pour en créer un.
### Connexion avec le client (Fiddler)
1. **Connectez-vous avec le client à un serveur officiel et à un compte Hoyoverse au moins une fois pour télécharger les données du jeu**.
2. Installez et lancez [Fiddler Classic](https://www.telerik.com/fiddler).
3. Configurez fiddler pour décrypter le trafic https. (Tools -> Options -> HTTPS -> Decrypt HTTPS traffic) Assurez-vous que `ignore server certificate errors` est également coché.
4. Copiez et collez le code suivant dans l'onglet Fiddlerscript de Fiddler Classic :
```
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
class Handlers
{
static function OnBeforeRequest(oS: Session) {
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
oS.host = "localhost"; // Elle peut également être remplacée par une autre adresse IP.
}
}
};
```
5. Connectez-vous avec votre nom de compte, le mot de passe peut être défini comme vous le souhaitez.
### Commandes du serveur
Les commandes du serveur peuvent être exécutées dans la console du serveur ou dans le jeu. Il y a un utilisateur fictif nommé "Server" dans la liste d'amis de chaque joueur auquel vous pouvez envoyer un message pour utiliser les commandes dans le jeu.
```
/account {create | delete} [username] (reserved player uid). Crée ou supprime un compte.
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). Définit les propriétés de l'avatar actuel.
/clear {relics | lightcones | materials | items}. Supprime les objets filtrés de l'inventaire du joueur.
/gender {male | female}. Définit le sexe du joueur.
/give [item id] x[amount] lv[number]. Donne un objet au joueur ciblé.
/giveall {materials | avatars | lightcones | relics}. Donne des objets au joueur ciblé.
/heal. Guérit vos avatars.
/help. Affiche une liste des commandes disponibles.
/kick @[player id]. Expulse un joueur du serveur.
/mail [content]. Envoie un message système au joueur ciblé.
/permission {add | remove | clear} [permission]. Donne/retire une permission au joueur ciblé.
/refill. Recharge vos points de compétence en monde ouvert.
/reload. Recharge la configuration du serveur.
/scene [scene id] [floor id]. Téléporte le joueur vers la scène spécifiée.
/spawn [monster/prop id] x[amount] s[stage id]. Fait apparaître un monstre ou un accessoire à proximité du joueur ciblé.
/unstuck @[player id]. Décroche un joueur hors ligne s'il se trouve dans une scène qui ne se charge pas.
/worldlevel [world level]. Fixe le niveau d'équilibre du joueur ciblé.
```

83
docs/README_ja-JP.md Normal file
View File

@@ -0,0 +1,83 @@
![LunarCore](https://socialify.git.ci/Melledy/LunarCore/image?description=1&descriptionEditable=A%20game%20server%20reimplementation%20for%20version%201.5.0%20of%20a%20certain%20turn-based%20anime%20game%20for%20educational%20purposes.%20&font=Inter&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
<div align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Melledy/LunarCore?logo=java&style=for-the-badge"> <img alt="GitHub" src="https://img.shields.io/github/license/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Melledy/LunarCore/build.yml?branch=development&logo=github&style=for-the-badge"></div>
<div align="center"><a href="https://discord.gg/cfPKJ6N5hw"><img alt="Discord - Grasscutter" src="https://img.shields.io/discord/1163718404067303444?label=Discord&logo=discord&style=for-the-badge"></a></div>
[EN](../README.md) | [简中](README_zh-CN.md) | [繁中](README_zh-TW.md) | [JP](README_ja-JP.md) | [RU](README_ru-RU.md) | [FR](README_fr-FR.md) | [KR](README_ko-KR.md)
**Attention:** 追加のサポート、質問、または議論がある場合は、 [Discord](https://discord.gg/cfPKJ6N5hw).
### 注目すべき機能
- 基本ゲーム機能:ログイン、チームのセットアップ、バッグ、基本的なシーン/エンティティの管理
- モンスター戦闘
- オーバーワールドのモンスター/プロップ/NPCのスポーン
- ほぼ全ての秘技
- NPCショップ
- ガチャシステム
- メールシステム
- フレンドシステム(アシストはまだ機能していません)
- 忘却の庭1.4.0の機能付き)
- 模擬宇宙(ランは終了できますが、多くの機能が不足しています)
# サーバーとクライアントの実行
### 必要条件
* [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
### お勧め
* [MongoDB 4.0+](https://www.mongodb.com/try/download/community)
### サーバーのコンパイル
1. システムのターミナルを開き、`./gradlew jar` でサーバーをコンパイルします。
2. サーバーディレクトリに `resources` という名前のフォルダを作成します。
3. [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) から `Config``TextMap`、および `ExcelBin` フォルダをダウンロードし、それらをリソースフォルダに配置します。
4. [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) から `Config` フォルダをダウンロードし、それをリソースフォルダに配置します。システムが問い合わせているファイルはすべて置き換えます。これらはワールドの生成に関するもので、サーバーにとって非常に重要です。
5. システムのターミナルから `java -jar LunarCore.jar` を使用してサーバーを実行します。Lunar Coreにはデータベースのための組み込みの内部MongoDBサーバーが付属しているため、MongoDBのインストールは必要ありません。ただし、MongoDBのインストールを強くお勧めします。
6. 設定で `autoCreateAccount` をtrueに設定している場合は、アカウントの作成をスキップできます。そうでない場合は、サーバーコンソールで `/account` コマンドを使用してアカウントを作成します。
### クライアントとの接続Fiddler
1. **同じクライアントで公式サーバーとHoyoverseアカウントに少なくとも一度ログインしてゲームデータをダウンロードしてください。**
2. [Fiddler Classic](https://www.telerik.com/fiddler) をインストールし、実行します。
3. Fiddlerをhttpsトラフィックを復号化するように設定しますツール -> オプション -> HTTPS -> HTTPSトラフィックを復号化`サーバー証明書のエラーを無視する` がチェックされていることを確認してください。
4. Fiddler ClassicのFiddlerscriptタブに以下のコードをコピーして貼り付けます
```javascript
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
class Handlers
{
static function OnBeforeRequest(oS: Session) {
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
oS.host = "localhost"; // これは別のIPアドレスに置き換えることもできます。
}
}
};
```
5. 作成したアカウント名と任意のパスワードでログインします。
### サーバーコマンド
サーバーコマンドはサーバーコンソールまたはゲーム内で実行できます。各プレイヤーのフレンドリストには、ゲーム内でコマンドを使用するための "Server" という名前のユーザーがいます。
```
/account {create | delete} [username] (予約プレイヤーuid). アカウントを作成または削除します。
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). 現在のアバターのプロパティを設定します。
/clear {relics | lightcones | materials | items}. プレイヤーのインベントリからフィルタリングされたアイテムを削除します。
/gender {male | female}. プレイヤーの性別を設定します。
/give [item id] x[amount] lv[number]. ターゲットのプレイヤーにアイテムを与えます。
/giveall {materials | avatars}. ターゲットのプレイヤーにアイテムを与えます。
/heal. あなたのキャラクターを癒します。
/help. 利用可能なコマンドの一覧を表示します。
/kick @[player id]. サーバーからプレーヤーをキックする。
/mail [content]. ターゲットのプレイヤーにシステムメールを送信します。
/permission {add | remove | clear} [permission]. ターゲットのプレイヤーから権限を付与/削除します。
/refill. SPを回復します。
/reload. サーバーコンフィギュレーションを再読み込みします。
/scene [scene id] [floor id]. プレイヤーを指定したシーンにテレポートします。
/spawn [monster/prop id] x[amount] s[stage id]. ターゲットのプレイヤーの近くにモンスターまたはプロップを生成します。
/unstuck @[player id]. オフラインプレイヤーが読み込み不可のシーンにいる場合、スタックを解除します。
/worldlevel [world level]. ターゲットのプレイヤーの平衡レベルを設定します。
```

83
docs/README_ko-KR.md Normal file
View File

@@ -0,0 +1,83 @@
![LunarCore](https://socialify.git.ci/Melledy/LunarCore/image?description=1&descriptionEditable=A%20game%20server%20reimplementation%20for%20version%201.5.0%20of%20a%20certain%20turn-based%20anime%20game%20for%20educational%20purposes.%20&font=Inter&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
<div align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Melledy/LunarCore?logo=java&style=for-the-badge"> <img alt="GitHub" src="https://img.shields.io/github/license/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Melledy/LunarCore/build.yml?branch=development&logo=github&style=for-the-badge"></div>
<div align="center"><a href="https://discord.gg/cfPKJ6N5hw"><img alt="Discord - Grasscutter" src="https://img.shields.io/discord/1163718404067303444?label=Discord&logo=discord&style=for-the-badge"></a></div>
[EN](../README.md) | [简中](README_zh-CN.md) | [繁中](README_zh-TW.md) | [JP](README_ja-JP.md) | [RU](README_ru-RU.md) | [FR](README_fr-FR.md) | [KR](README_ko-KR.md)
**주의: **추가 지원, 질문 또는 토론이 필요한 경우, [Discord](https://discord.gg/cfPKJ6N5hw) 를 확인하세요.
### 주목할 만한 기능
- 기본적인 게임 기능: 로그인, 팀 설정, 인벤토리, 기본 장면/엔티티 관리
- 몬스터 전투 작동
- 자연계 몬스터/소품/NPC 생성
- 대부분의 캐릭터 기술 처리
- NPC 상점 처리
- 뽑기 시스템
- 메일 시스템
- 친구 시스템(어시스트는 아직 작동하지 않음)
- 잊혀진 홀 (1.4.0 기능 포함)
- 시뮬레이션된 우주(실행은 가능하지만 많은 기능이 누락됨)
# 서버 및 클라이언트 실행
### 전제 조건
* [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
### 추천
* [MongoDB 4.0+](https://www.mongodb.com/try/download/community)
서버 컴파일하기 ###
1. 시스템 터미널을 열고 다음을 사용하여 서버를 컴파일합니다. `./gradlew jar`
2. 서버 디렉터리에 `resources`라는 이름의 폴더를 만듭니다.
3. [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) 에서 `Config`, `TextMap`, `ExcelBin` 폴더를 다운로드하여 리소스 폴더에 넣습니다.
4. [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) 에서 `Config` 폴더를 다운로드하여 리소스 폴더에 넣습니다. 시스템에서 요청하는 파일을 모두 교체하세요. 이 파일들은 월드 스폰을 위한 것으로 서버에 매우 중요합니다.
5. 시스템 터미널에서 `java -jar LunarCore.jar`로 서버를 실행합니다. Lunar Core에는 데이터베이스를 위한 내부 MongoDB 서버가 내장되어 있으므로 Mongodb를 설치할 필요가 없습니다. 하지만 어쨌든 Mongodb를 설치하는 것을 적극 권장합니다.
6. 설정에서 `autoCreateAccount`가 true로 설정되어 있으면 계정 생성을 건너뛸 수 있습니다. 그렇지 않은 경우 서버 콘솔에서 `/account` 명령을 사용하여 계정을 생성합니다.
### 클라이언트와 연결하기(피들러)
1. **게임 데이터를 다운로드하려면 클라이언트로 공식 서버와 호오버스 계정에 한 번 이상 로그인합니다.
2. [Fiddler Classic](https://www.telerik.com/fiddler) 을 설치하여 실행합니다.
3. 피들러가 https 트래픽을 복호화하도록 설정합니다. (도구 -> 옵션 -> HTTPS -> HTTPS 트래픽 복호화) '서버 인증서 오류 무시'도 체크되어 있는지 확인합니다.
4. 피들러 클래식의 피들러스크립트 탭에 다음 코드를 복사하여 붙여넣습니다:
```
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
class Handlers
{
static function OnBeforeRequest(oS: Session) {
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
oS.host = "localhost"; // 이 주소는 다른 IP 주소로 대체할 수도 있습니다.
}
}
};
```
5. 계정 이름으로 로그인하며, 비밀번호는 아무거나 설정할 수 있습니다.
### 서버 명령
서버 명령은 서버 콘솔이나 게임 내에서 실행할 수 있습니다. 모든 플레이어의 친구 목록에 "서버"라는 이름의 더미 사용자가 있으며, 이 사용자에게 게임 내 명령을 사용하도록 메시지를 보낼 수 있습니다.
```
/account {create | delete} [username] (reserved player uid). 계정을 만들거나 삭제합니다.
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). 현재 아바타의 속성을 설정합니다.
/clear {relics | lightcones | materials | items}. 플레이어 인벤토리에서 필터링된 아이템을 제거합니다.
/gender {male | female}. 플레이어 성별을 설정합니다.
/give [item id] x[amount] lv[number]. 대상 플레이어에게 아이템을 부여합니다.
/giveall {materials | avatars | lightcones | relics}. 대상 플레이어에게 아이템을 부여합니다.
/heal. 아바타를 치료합니다.
/help. 사용 가능한 명령 목록을 표시합니다.
/kick @[player id]. 플레이어를 서버에서 내쫓습니다.
/mail [content]. 대상 플레이어에게 시스템 메일을 보냅니다.
/permission {add | remove | clear} [permission]. 대상 플레이어에게 권한을 부여/제거합니다.
/refill. 오픈 월드에서 스킬 포인트를 다시 채웁니다.
/reload. 서버 구성을 다시 로드합니다.
/scene [scene id] [floor id]. 플레이어를 지정된 장면으로 순간이동시킵니다.
/spawn [monster/prop id] x[amount] s[stage id]. 대상 플레이어 근처에 몬스터나 소품을 스폰합니다.
/unstuck @[player id]. 오프라인 플레이어가 로딩되지 않는 장면에 있을 경우 플레이어를 고정 해제합니다.
/worldlevel [world level]. 대상 플레이어의 평형 레벨을 설정합니다.
```

83
docs/README_ru-RU.md Normal file
View File

@@ -0,0 +1,83 @@
![LunarCore](https://socialify.git.ci/Melledy/LunarCore/image?description=1&descriptionEditable=A%20game%20server%20reimplementation%20for%20version%201.5.0%20of%20a%20certain%20turn-based%20anime%20game%20for%20educational%20purposes.%20&font=Inter&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
<div align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Melledy/LunarCore?logo=java&style=for-the-badge"> <img alt="GitHub" src="https://img.shields.io/github/license/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Melledy/LunarCore/build.yml?branch=development&logo=github&style=for-the-badge"></div>
<div align="center"><a href="https://discord.gg/cfPKJ6N5hw"><img alt="Discord - Grasscutter" src="https://img.shields.io/discord/1163718404067303444?label=Discord&logo=discord&style=for-the-badge"></a></div>
[EN](../README.md) | [简中](README_zh-CN.md) | [繁中](README_zh-TW.md) | [JP](README_ja-JP.md) | [RU](README_ru-RU.md) | [FR](README_fr-FR.md) | [KR](README_ko-KR.md)
**Внимание:** Для получения дополнительной поддержки, вопросов или обсуждений заходите на наш [Discord](https://discord.gg/cfPKJ6N5hw).
### Примечательные особенности
- Основные возможности игры: Вход в игру, настройка команды, инвентарь, базовое управление сценой/содержимым
- Работают сражения с монстрами
- Спавны монстров/природы/NPC в естественном мире
- Работает большинство техник персонажей
- Работают магазины Npc
- Система гача
- Почтовая система
- Система друзей (помощники пока не работают)
- Забытый зал (с функциями 1.4.0)
- Симулированная вселенная (Запуск может быть закончен, но многие функции отсутствуют)
# Запуск сервера и клиента
### Необходимые условия
* [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
### Рекомендуем
* [MongoDB 4.0+](https://www.mongodb.com/try/download/community)
Компиляция сервера
1. Откройте системный терминал и скомпилируйте сервер с помощью `./gradlew jar`.
2. Создайте папку с именем `resources` в каталоге сервера.
3. Скачайте папки `Config`, `TextMap` и `ExcelBin` с сайта [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) и поместите их в папку resources.
4. Скачайте папку `Config` с сайта [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) и поместите ее в папку resources. Замените все файлы, которые запрашивает ваша система. Они предназначены для спавна мира и очень важны для сервера.
5. Запустите сервер с помощью команды `java -jar LunarCore.jar` из системного терминала. Lunar Core поставляется со встроенным внутренним сервером MongoDB для своей базы данных, поэтому установка Mongodb не требуется. Однако настоятельно рекомендуется установить Mongodb в любом случае.
6. Если в конфиге `autoCreateAccount` установлено значение true, то создание учетной записи можно пропустить. В противном случае используйте команду `/account` в консоли сервера для ее создания.
### Подключение к клиенту (Fiddler)
1. **Войдите с клиентом на официальный сервер и в аккаунт Hoyoverse хотя бы один раз, чтобы загрузить игровые данные**.
2. Установите и запустите [Fiddler Classic](https://www.telerik.com/fiddler).
3. Настройте fiddler на расшифровку https-трафика. (Tools -> Options -> HTTPS -> Decrypt HTTPS traffic) Убедитесь, что `ignore server certificate errors` также отмечен.
4. Скопируйте и вставьте следующий код во вкладку Fiddlerscript в Fiddler Classic:
```
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
class Handlers
{
static function OnBeforeRequest(oS: Session) {
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
oS.host = "localhost"; // Его также можно заменить другим IP-адресом.
}
}
};
```
5. Войдите в систему под своим именем, пароль может быть любым.
### Команды сервера
Команды сервера можно выполнять в консоли сервера или в игре. В списке друзей каждого игрока есть фиктивный пользователь с именем "Сервер", которому можно написать сообщение, чтобы использовать внутриигровые команды.
```
/account {create | delete} [username] (reserved player uid). Создает или удаляет учетную запись.
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). Устанавливает свойства текущего аватара.
/clear {relics | lightcones | materials | items}. Удаляет отфильтрованные предметы из инвентаря игрока.
/gender {male | female}. Устанавливает пол игрока.
/give [item id] x[amount] lv[number]. Дает целевому игроку предмет.
/giveall {materials | avatars | lightcones | relics}. Дает целевому игроку предметы.
/heal. Лечит ваши аватары.
/help. Отображает список доступных команд.
/kick @[player id]. Выгоняет игрока с сервера.
/mail [content]. Отправляет целевому игроку системное письмо.
/permission {add | remove | clear} [permission]. Дает/снимает разрешение с выбранного игрока.
/refill. Пополнение очков навыков в открытом мире.
/reload. Перезагружает конфигурацию сервера.
/scene [scene id] [floor id]. Телепортирует игрока в указанную сцену.
/spawn [monster/prop id] x[amount] s[stage id]. Порождает монстра или реквизит рядом с игроком.
/unstuck @[player id]. Отключает оффлайн-игрока, если он находится в сцене, которая не загружается.
/worldlevel [world level]. Устанавливает равновесный уровень целевого игрока.
```

83
docs/README_zh-CN.md Normal file
View File

@@ -0,0 +1,83 @@
![LunarCore](https://socialify.git.ci/Melledy/LunarCore/image?description=1&descriptionEditable=A%20game%20server%20reimplementation%20for%20version%201.5.0%20of%20a%20certain%20turn-based%20anime%20game%20for%20educational%20purposes.%20&font=Inter&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
<div align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Melledy/LunarCore?logo=java&style=for-the-badge"> <img alt="GitHub" src="https://img.shields.io/github/license/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Melledy/LunarCore/build.yml?branch=development&logo=github&style=for-the-badge"></div>
<div align="center"><a href="https://discord.gg/cfPKJ6N5hw"><img alt="Discord - Grasscutter" src="https://img.shields.io/discord/1163718404067303444?label=Discord&logo=discord&style=for-the-badge"></a></div>
[EN](../README.md) | [简中](README_zh-CN.md) | [繁中](README_zh-TW.md) | [JP](README_ja-JP.md) | [RU](README_ru-RU.md) | [FR](README_fr-FR.md) | [KR](README_ko-KR.md)
**注意:** 如果需要任何额外的支持、问题或者讨论,请查看我们的 [Discord](https://discord.gg/cfPKJ6N5hw).
### 显著特点
- 基本游戏功能:登录、队伍配置、背包、基本场景/实体管理
- 战斗功能
- 自然世界怪物/道具/NPC生成
- 大多数角色技能已处理
- NPC商店已处理
- 祈愿系统
- 邮件系统
- 好友系统(好友支援尚未实现)
- 忘却之庭带有1.4.0功能)
- 模拟宇宙(可以运行,但缺少许多功能)
# 运行服务端和客户端
### 必需条件
* [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
### 推荐安装
* [MongoDB 4.0+](https://www.mongodb.com/try/download/community)
### 编译服务端核心
1. 打开系统终端,使用 `./gradlew jar` 编译服务端核心
2. 在服务器目录中创建一个名为 `resources` 的文件夹
3. 从 [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) 下载 `Config``TextMap``ExcelBin` 文件夹,并将它们放入资源文件夹
4. 从 [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) 下载 `Config` 文件夹,并将其放入资源文件夹。替换系统询问的任何文件。这些文件用于世界生成,对服务器非常重要。
5. 从系统终端使用 `java -jar LunarCore.jar` 运行服务端。Lunar Core带有一个内置的MongoDB数据库服务因此不需要安装MongoDB。但是强烈建议安装MongoDB。
6. 如果在配置中将 `autoCreateAccount` 设置为true则可以跳过创建帐户的步骤。否则需要在服务器控制台使用 `/account` 命令创建一个帐户。
### 与客户端Fiddler连接
1. **使用客户端至少一次登录到官方服务器和Hoyoverse账户以下载游戏数据。**
2. 安装并运行 [Fiddler Classic](https://www.telerik.com/fiddler)。
3. 将Fiddler设置为解密https流量工具 -> 选项 -> HTTPS -> 解密HTTPS流量确保选中 `忽略服务器证书错误`
4. 将以下代码复制并粘贴到Fiddler Classic的Fiddlerscript选项卡中
```javascript
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
class Handlers
{
static function OnBeforeRequest(oS: Session) {
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
oS.host = "localhost"; // 这也可以替换为其他IP地址。
}
}
};
```
5. 使用您的帐户名称登录,密码可以设置为任何值。
### 服务器命令
服务器命令可以在服务器控制台或游戏中运行。每个玩家的好友列表中都有一个名为 "Server" 的虚拟用户,您可以向其发送消息以使用游戏中的命令。
```
/account {create | delete} [username] (保留玩家uid). 创建或删除一个帐户。
/avatar lv(level) p(ascension) r(eidolon) s(skill levels). 设置当前角色的属性。
/clear {relics | lightcones | materials | items}. 从玩家库存中删除过滤的物品。
/gender {male | female}. 设置玩家性别。
/give [item id] x[amount] lv[number]. 给予目标玩家一个物品。
/giveall {materials | avatars}. 给予目标玩家物品。
/heal. 治疗你的角色。
/help 显示可用命令列表。
/kick @[player id]. 将一名玩家踢出服务器。
/mail [content]. 发送系统邮件给目标玩家。
/permission {add | remove | clear} [permission]. 向目标玩家授予/移除权限。
/refill. 在开放世界中补充战技点。
/reload. 重载服务器配置。
/scene [scene id] [floor id]. 将玩家传送到指定的场景。
/spawn [monster/prop id] x[amount] s[stage id]. 在目标玩家附近生成怪物或道具。
/unstuck @[player id]. 如果离线玩家卡在不加载的场景中,解除卡住。
/worldlevel [world level]. 设置目标玩家的均衡等级。
```

83
docs/README_zh-TW.md Normal file
View File

@@ -0,0 +1,83 @@
![LunarCore](https://socialify.git.ci/Melledy/LunarCore/image?description=1&descriptionEditable=A%20game%20server%20reimplementation%20for%20version%201.5.0%20of%20a%20certain%20turn-based%20anime%20game%20for%20educational%20purposes.%20&font=Inter&forks=1&issues=1&language=1&name=1&owner=1&pulls=1&stargazers=1&theme=Light)
<div align="center"><img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/Melledy/LunarCore?logo=java&style=for-the-badge"> <img alt="GitHub" src="https://img.shields.io/github/license/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Melledy/LunarCore?style=for-the-badge"> <img alt="GitHub Workflow Status" src="https://img.shields.io/github/actions/workflow/status/Melledy/LunarCore/build.yml?branch=development&logo=github&style=for-the-badge"></div>
<div align="center"><a href="https://discord.gg/cfPKJ6N5hw"><img alt="Discord - Grasscutter" src="https://img.shields.io/discord/1163718404067303444?label=Discord&logo=discord&style=for-the-badge"></a></div>
[EN](../README.md) | [简中](README_zh-CN.md) | [繁中](README_zh-TW.md) | [JP](README_ja-JP.md) | [RU](README_ru-RU.md) | [FR](README_fr-FR.md) | [KR](README_ko-KR.md)
**請注意:** 如果需要任何額外的支持、問題或者討論,請查看我們的 [Discord](https://discord.gg/cfPKJ6N5hw).
### 當前功能
- 基本遊戲功能:登錄、隊伍配置、背包、基本場景/實體管理
- 戰鬥功能
- 自然世界怪物/道具/NPC生成
- 大多數角色技能
- NPC商店
- 躍遷/抽卡系統
- 郵件系統
- 好友系統(支援角色尚未實現)
- 忘卻之庭帶有1.4.0功能)
- 模擬宇宙(可以運行,但缺少許多功能)
# 運行伺服器端和用戶端
### 必需條件
* [Java 17 JDK](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
### 推薦安裝
* [MongoDB 4.0+](https://www.mongodb.com/try/download/community)
### 編譯伺服器端核心
1. 打開系統終端,使用 `./gradlew jar` 編譯伺服器端核心
2. 在伺服器目錄中創建一個名為 `resources` 的文件夾
3. 從 [https://github.com/Dimbreath/StarRailData](https://github.com/Dimbreath/StarRailData) 下載 `Config``TextMap``ExcelBin` 文件夾,並將它們放入資源文件夾
4. 從 [https://gitlab.com/Melledy/LunarCore-Configs](https://gitlab.com/Melledy/LunarCore-Configs) 下載 `Config` 文件夾,並將其放入資源文件夾。替換系統詢問的任何文件。這些文件用於世界生成,對伺服器非常重要。
5. 從系統終端使用 `java -jar LunarCore.jar` 運行伺服器端。Lunar Core帶有一個內建的MongoDB資料庫服務因此不需要安裝MongoDB。但是還是強烈建議安裝MongoDB。
6. 如果在配置中將 `autoCreateAccount` 設置為true則可以跳過創建帳戶的步驟。否則需要在伺服器控制台使用 `/account` 命令創建一個帳戶。
### 與用戶端連接Fiddler
1. **使用用戶端至少一次登錄到官方伺服器和Hoyoverse帳戶以下載遊戲數據。**
2. 安裝並運行 [Fiddler Classic](https://www.telerik.com/fiddler)。
3. 將Fiddler設置為解密https流量工具 -> 選項 -> HTTPS -> 解密HTTPS流量確保選中 `忽略伺服器證書錯誤 (Ignore server certificate errors)`
4. 將以下代碼複製並黏貼到Fiddler Classic的Fiddlerscript選項卡中
```
import System;
import System.Windows.Forms;
import Fiddler;
import System.Text.RegularExpressions;
class Handlers
{
static function OnBeforeRequest(oS: Session) {
if (oS.host.EndsWith(".starrails.com") || oS.host.EndsWith(".hoyoverse.com") || oS.host.EndsWith(".mihoyo.com") || oS.host.EndsWith(".bhsr.com")) {
oS.host = "localhost"; // 這也可以替換為其他IP位址。
}
}
};
```
5. 使用您的帳戶名稱登入,密碼可以隨機輸入。
### 伺服器命令
伺服器命令可以在伺服器控制台或遊戲中運行。每個玩家的好友列表中都有一個名為 "Server" 的虛擬用戶,您可以向其發送消息以使用遊戲中的命令。
```
/account {create | delete} [username] (玩家UID). 創建或刪除一個帳戶。
/avatar lv(level) p(ascension) r(eidolon) s(skill levels) 設置當前角色的屬性。
/clear {relics | lightcones | materials | items} 從玩家庫存中刪除過濾的物品。
/gender {male | female} 設置目標玩家性別。
/give [item id] x[amount] lv[number] 給予目標玩家指定物品。
/giveall {materials | avatars} 給予目標玩家所有物品/角色。
/heal. 治癒你的角色。
/help 顯示可用命令列表。
/kick @[player id]. 將一名玩家踢出伺服器。
/mail [content] 發送系統郵件給目標玩家。
/permission {add | remove | clear} [permission] 向目標玩家授予/移除權限。
/refill. 在開放世界中補充戰技點。
/reload 重載伺服器配置。
/scene [scene id] [floor id] 將玩家傳送到指定的場景。
/spawn [monster/prop id] x[amount] s[stage id] 在目標玩家附近生成怪物或實體。
/unstuck @[player id]. 如果離線目標玩家卡在無法載入的場景中,將會把目標玩家傳送到初始場景。
/worldlevel [world level]. 設置目標玩家的均衡等級。
```

View File

@@ -11,6 +11,7 @@ import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
import us.hebi.quickbuf.RepeatedMessage;
public final class ArchiveDataOuterClass {
/**
@@ -29,6 +30,16 @@ public final class ArchiveDataOuterClass {
*/
private final RepeatedInt archiveAvatarIdList = RepeatedInt.newEmptyInstance();
/**
* <code>repeated .MonsterArchive archive_monster_id_list = 7;</code>
*/
private final RepeatedMessage<MonsterArchiveOuterClass.MonsterArchive> archiveMonsterIdList = RepeatedMessage.newEmptyInstance(MonsterArchiveOuterClass.MonsterArchive.getFactory());
/**
* <code>repeated .RelicArchive archive_relic_list = 11;</code>
*/
private final RepeatedMessage<RelicArchiveOuterClass.RelicArchive> archiveRelicList = RepeatedMessage.newEmptyInstance(RelicArchiveOuterClass.RelicArchive.getFactory());
private ArchiveData() {
}
@@ -175,6 +186,145 @@ public final class ArchiveDataOuterClass {
return this;
}
/**
* <code>repeated .MonsterArchive archive_monster_id_list = 7;</code>
* @return whether the archiveMonsterIdList field is set
*/
public boolean hasArchiveMonsterIdList() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>repeated .MonsterArchive archive_monster_id_list = 7;</code>
* @return this
*/
public ArchiveData clearArchiveMonsterIdList() {
bitField0_ &= ~0x00000004;
archiveMonsterIdList.clear();
return this;
}
/**
* <code>repeated .MonsterArchive archive_monster_id_list = 7;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableArchiveMonsterIdList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<MonsterArchiveOuterClass.MonsterArchive> getArchiveMonsterIdList() {
return archiveMonsterIdList;
}
/**
* <code>repeated .MonsterArchive archive_monster_id_list = 7;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<MonsterArchiveOuterClass.MonsterArchive> getMutableArchiveMonsterIdList(
) {
bitField0_ |= 0x00000004;
return archiveMonsterIdList;
}
/**
* <code>repeated .MonsterArchive archive_monster_id_list = 7;</code>
* @param value the archiveMonsterIdList to add
* @return this
*/
public ArchiveData addArchiveMonsterIdList(
final MonsterArchiveOuterClass.MonsterArchive value) {
bitField0_ |= 0x00000004;
archiveMonsterIdList.add(value);
return this;
}
/**
* <code>repeated .MonsterArchive archive_monster_id_list = 7;</code>
* @param values the archiveMonsterIdList to add
* @return this
*/
public ArchiveData addAllArchiveMonsterIdList(
final MonsterArchiveOuterClass.MonsterArchive... values) {
bitField0_ |= 0x00000004;
archiveMonsterIdList.addAll(values);
return this;
}
/**
* <code>repeated .RelicArchive archive_relic_list = 11;</code>
* @return whether the archiveRelicList field is set
*/
public boolean hasArchiveRelicList() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>repeated .RelicArchive archive_relic_list = 11;</code>
* @return this
*/
public ArchiveData clearArchiveRelicList() {
bitField0_ &= ~0x00000008;
archiveRelicList.clear();
return this;
}
/**
* <code>repeated .RelicArchive archive_relic_list = 11;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableArchiveRelicList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<RelicArchiveOuterClass.RelicArchive> getArchiveRelicList() {
return archiveRelicList;
}
/**
* <code>repeated .RelicArchive archive_relic_list = 11;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<RelicArchiveOuterClass.RelicArchive> getMutableArchiveRelicList() {
bitField0_ |= 0x00000008;
return archiveRelicList;
}
/**
* <code>repeated .RelicArchive archive_relic_list = 11;</code>
* @param value the archiveRelicList to add
* @return this
*/
public ArchiveData addArchiveRelicList(final RelicArchiveOuterClass.RelicArchive value) {
bitField0_ |= 0x00000008;
archiveRelicList.add(value);
return this;
}
/**
* <code>repeated .RelicArchive archive_relic_list = 11;</code>
* @param values the archiveRelicList to add
* @return this
*/
public ArchiveData addAllArchiveRelicList(final RelicArchiveOuterClass.RelicArchive... values) {
bitField0_ |= 0x00000008;
archiveRelicList.addAll(values);
return this;
}
@Override
public ArchiveData copyFrom(final ArchiveData other) {
cachedSize = other.cachedSize;
@@ -182,6 +332,8 @@ public final class ArchiveDataOuterClass {
bitField0_ = other.bitField0_;
archiveEquipmentIdList.copyFrom(other.archiveEquipmentIdList);
archiveAvatarIdList.copyFrom(other.archiveAvatarIdList);
archiveMonsterIdList.copyFrom(other.archiveMonsterIdList);
archiveRelicList.copyFrom(other.archiveRelicList);
}
return this;
}
@@ -198,6 +350,12 @@ public final class ArchiveDataOuterClass {
if (other.hasArchiveAvatarIdList()) {
getMutableArchiveAvatarIdList().addAll(other.archiveAvatarIdList);
}
if (other.hasArchiveMonsterIdList()) {
getMutableArchiveMonsterIdList().addAll(other.archiveMonsterIdList);
}
if (other.hasArchiveRelicList()) {
getMutableArchiveRelicList().addAll(other.archiveRelicList);
}
return this;
}
@@ -210,6 +368,8 @@ public final class ArchiveDataOuterClass {
bitField0_ = 0;
archiveEquipmentIdList.clear();
archiveAvatarIdList.clear();
archiveMonsterIdList.clear();
archiveRelicList.clear();
return this;
}
@@ -222,6 +382,8 @@ public final class ArchiveDataOuterClass {
bitField0_ = 0;
archiveEquipmentIdList.clear();
archiveAvatarIdList.clear();
archiveMonsterIdList.clearQuick();
archiveRelicList.clearQuick();
return this;
}
@@ -236,7 +398,9 @@ public final class ArchiveDataOuterClass {
ArchiveData other = (ArchiveData) o;
return bitField0_ == other.bitField0_
&& (!hasArchiveEquipmentIdList() || archiveEquipmentIdList.equals(other.archiveEquipmentIdList))
&& (!hasArchiveAvatarIdList() || archiveAvatarIdList.equals(other.archiveAvatarIdList));
&& (!hasArchiveAvatarIdList() || archiveAvatarIdList.equals(other.archiveAvatarIdList))
&& (!hasArchiveMonsterIdList() || archiveMonsterIdList.equals(other.archiveMonsterIdList))
&& (!hasArchiveRelicList() || archiveRelicList.equals(other.archiveRelicList));
}
@Override
@@ -253,6 +417,18 @@ public final class ArchiveDataOuterClass {
output.writeUInt32NoTag(archiveAvatarIdList.array()[i]);
}
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < archiveMonsterIdList.length(); i++) {
output.writeRawByte((byte) 58);
output.writeMessageNoTag(archiveMonsterIdList.get(i));
}
}
if ((bitField0_ & 0x00000008) != 0) {
for (int i = 0; i < archiveRelicList.length(); i++) {
output.writeRawByte((byte) 90);
output.writeMessageNoTag(archiveRelicList.get(i));
}
}
}
@Override
@@ -264,6 +440,12 @@ public final class ArchiveDataOuterClass {
if ((bitField0_ & 0x00000002) != 0) {
size += (1 * archiveAvatarIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(archiveAvatarIdList);
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * archiveMonsterIdList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(archiveMonsterIdList);
}
if ((bitField0_ & 0x00000008) != 0) {
size += (1 * archiveRelicList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(archiveRelicList);
}
return size;
}
@@ -288,6 +470,22 @@ public final class ArchiveDataOuterClass {
input.readPackedUInt32(archiveAvatarIdList, tag);
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 58) {
break;
}
}
case 58: {
// archiveMonsterIdList
tag = input.readRepeatedMessage(archiveMonsterIdList, tag);
bitField0_ |= 0x00000004;
if (tag != 90) {
break;
}
}
case 90: {
// archiveRelicList
tag = input.readRepeatedMessage(archiveRelicList, tag);
bitField0_ |= 0x00000008;
if (tag != 0) {
break;
}
@@ -327,6 +525,12 @@ public final class ArchiveDataOuterClass {
if ((bitField0_ & 0x00000002) != 0) {
output.writeRepeatedUInt32(FieldNames.archiveAvatarIdList, archiveAvatarIdList);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedMessage(FieldNames.archiveMonsterIdList, archiveMonsterIdList);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRepeatedMessage(FieldNames.archiveRelicList, archiveRelicList);
}
output.endObject();
}
@@ -361,6 +565,30 @@ public final class ArchiveDataOuterClass {
}
break;
}
case 912174897:
case 1817787488: {
if (input.isAtField(FieldNames.archiveMonsterIdList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(archiveMonsterIdList);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case 1742876687:
case 2101828999: {
if (input.isAtField(FieldNames.archiveRelicList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(archiveRelicList);
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
@@ -416,6 +644,10 @@ public final class ArchiveDataOuterClass {
static final FieldName archiveEquipmentIdList = FieldName.forField("archiveEquipmentIdList", "archive_equipment_id_list");
static final FieldName archiveAvatarIdList = FieldName.forField("archiveAvatarIdList", "archive_avatar_id_list");
static final FieldName archiveMonsterIdList = FieldName.forField("archiveMonsterIdList", "archive_monster_id_list");
static final FieldName archiveRelicList = FieldName.forField("archiveRelicList", "archive_relic_list");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,362 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class ClientTurnSnapshotOuterClass {
/**
* Protobuf type {@code ClientTurnSnapshot}
*/
public static final class ClientTurnSnapshot extends ProtoMessage<ClientTurnSnapshot> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 battle_event_id = 1;</code>
*/
private int battleEventId;
/**
* <code>optional .ClientTurnSnapshotStatus status = 2;</code>
*/
private final ClientTurnSnapshotStatusOuterClass.ClientTurnSnapshotStatus status = ClientTurnSnapshotStatusOuterClass.ClientTurnSnapshotStatus.newInstance();
private ClientTurnSnapshot() {
}
/**
* @return a new empty instance of {@code ClientTurnSnapshot}
*/
public static ClientTurnSnapshot newInstance() {
return new ClientTurnSnapshot();
}
/**
* <code>optional uint32 battle_event_id = 1;</code>
* @return whether the battleEventId field is set
*/
public boolean hasBattleEventId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 battle_event_id = 1;</code>
* @return this
*/
public ClientTurnSnapshot clearBattleEventId() {
bitField0_ &= ~0x00000001;
battleEventId = 0;
return this;
}
/**
* <code>optional uint32 battle_event_id = 1;</code>
* @return the battleEventId
*/
public int getBattleEventId() {
return battleEventId;
}
/**
* <code>optional uint32 battle_event_id = 1;</code>
* @param value the battleEventId to set
* @return this
*/
public ClientTurnSnapshot setBattleEventId(final int value) {
bitField0_ |= 0x00000001;
battleEventId = value;
return this;
}
/**
* <code>optional .ClientTurnSnapshotStatus status = 2;</code>
* @return whether the status field is set
*/
public boolean hasStatus() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional .ClientTurnSnapshotStatus status = 2;</code>
* @return this
*/
public ClientTurnSnapshot clearStatus() {
bitField0_ &= ~0x00000002;
status.clear();
return this;
}
/**
* <code>optional .ClientTurnSnapshotStatus status = 2;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableStatus()} if you want to modify it.
*
* @return internal storage object for reading
*/
public ClientTurnSnapshotStatusOuterClass.ClientTurnSnapshotStatus getStatus() {
return status;
}
/**
* <code>optional .ClientTurnSnapshotStatus status = 2;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public ClientTurnSnapshotStatusOuterClass.ClientTurnSnapshotStatus getMutableStatus() {
bitField0_ |= 0x00000002;
return status;
}
/**
* <code>optional .ClientTurnSnapshotStatus status = 2;</code>
* @param value the status to set
* @return this
*/
public ClientTurnSnapshot setStatus(
final ClientTurnSnapshotStatusOuterClass.ClientTurnSnapshotStatus value) {
bitField0_ |= 0x00000002;
status.copyFrom(value);
return this;
}
@Override
public ClientTurnSnapshot copyFrom(final ClientTurnSnapshot other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
battleEventId = other.battleEventId;
status.copyFrom(other.status);
}
return this;
}
@Override
public ClientTurnSnapshot mergeFrom(final ClientTurnSnapshot other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasBattleEventId()) {
setBattleEventId(other.battleEventId);
}
if (other.hasStatus()) {
getMutableStatus().mergeFrom(other.status);
}
return this;
}
@Override
public ClientTurnSnapshot clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
battleEventId = 0;
status.clear();
return this;
}
@Override
public ClientTurnSnapshot clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
status.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ClientTurnSnapshot)) {
return false;
}
ClientTurnSnapshot other = (ClientTurnSnapshot) o;
return bitField0_ == other.bitField0_
&& (!hasBattleEventId() || battleEventId == other.battleEventId)
&& (!hasStatus() || status.equals(other.status));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(battleEventId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 18);
output.writeMessageNoTag(status);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(battleEventId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(status);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public ClientTurnSnapshot mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 8: {
// battleEventId
battleEventId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 18) {
break;
}
}
case 18: {
// status
input.readMessage(status);
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.battleEventId, battleEventId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeMessage(FieldNames.status, status);
}
output.endObject();
}
@Override
public ClientTurnSnapshot mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -79510147:
case -766250873: {
if (input.isAtField(FieldNames.battleEventId)) {
if (!input.trySkipNullValue()) {
battleEventId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -892481550: {
if (input.isAtField(FieldNames.status)) {
if (!input.trySkipNullValue()) {
input.readMessage(status);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public ClientTurnSnapshot clone() {
return new ClientTurnSnapshot().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static ClientTurnSnapshot parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new ClientTurnSnapshot(), data).checkInitialized();
}
public static ClientTurnSnapshot parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientTurnSnapshot(), input).checkInitialized();
}
public static ClientTurnSnapshot parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientTurnSnapshot(), input).checkInitialized();
}
/**
* @return factory for creating ClientTurnSnapshot messages
*/
public static MessageFactory<ClientTurnSnapshot> getFactory() {
return ClientTurnSnapshotFactory.INSTANCE;
}
private enum ClientTurnSnapshotFactory implements MessageFactory<ClientTurnSnapshot> {
INSTANCE;
@Override
public ClientTurnSnapshot create() {
return ClientTurnSnapshot.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName battleEventId = FieldName.forField("battleEventId", "battle_event_id");
static final FieldName status = FieldName.forField("status");
}
}
}

View File

@@ -0,0 +1,281 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class ClientTurnSnapshotStatusOuterClass {
/**
* Protobuf type {@code ClientTurnSnapshotStatus}
*/
public static final class ClientTurnSnapshotStatus extends ProtoMessage<ClientTurnSnapshotStatus> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional .SpBarInfo sp_bar = 2;</code>
*/
private final SpBarInfoOuterClass.SpBarInfo spBar = SpBarInfoOuterClass.SpBarInfo.newInstance();
private ClientTurnSnapshotStatus() {
}
/**
* @return a new empty instance of {@code ClientTurnSnapshotStatus}
*/
public static ClientTurnSnapshotStatus newInstance() {
return new ClientTurnSnapshotStatus();
}
/**
* <code>optional .SpBarInfo sp_bar = 2;</code>
* @return whether the spBar field is set
*/
public boolean hasSpBar() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional .SpBarInfo sp_bar = 2;</code>
* @return this
*/
public ClientTurnSnapshotStatus clearSpBar() {
bitField0_ &= ~0x00000001;
spBar.clear();
return this;
}
/**
* <code>optional .SpBarInfo sp_bar = 2;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableSpBar()} if you want to modify it.
*
* @return internal storage object for reading
*/
public SpBarInfoOuterClass.SpBarInfo getSpBar() {
return spBar;
}
/**
* <code>optional .SpBarInfo sp_bar = 2;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public SpBarInfoOuterClass.SpBarInfo getMutableSpBar() {
bitField0_ |= 0x00000001;
return spBar;
}
/**
* <code>optional .SpBarInfo sp_bar = 2;</code>
* @param value the spBar to set
* @return this
*/
public ClientTurnSnapshotStatus setSpBar(final SpBarInfoOuterClass.SpBarInfo value) {
bitField0_ |= 0x00000001;
spBar.copyFrom(value);
return this;
}
@Override
public ClientTurnSnapshotStatus copyFrom(final ClientTurnSnapshotStatus other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
spBar.copyFrom(other.spBar);
}
return this;
}
@Override
public ClientTurnSnapshotStatus mergeFrom(final ClientTurnSnapshotStatus other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasSpBar()) {
getMutableSpBar().mergeFrom(other.spBar);
}
return this;
}
@Override
public ClientTurnSnapshotStatus clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
spBar.clear();
return this;
}
@Override
public ClientTurnSnapshotStatus clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
spBar.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ClientTurnSnapshotStatus)) {
return false;
}
ClientTurnSnapshotStatus other = (ClientTurnSnapshotStatus) o;
return bitField0_ == other.bitField0_
&& (!hasSpBar() || spBar.equals(other.spBar));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 18);
output.writeMessageNoTag(spBar);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(spBar);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public ClientTurnSnapshotStatus mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 18: {
// spBar
input.readMessage(spBar);
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeMessage(FieldNames.spBar, spBar);
}
output.endObject();
}
@Override
public ClientTurnSnapshotStatus mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 109608054:
case -896253135: {
if (input.isAtField(FieldNames.spBar)) {
if (!input.trySkipNullValue()) {
input.readMessage(spBar);
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public ClientTurnSnapshotStatus clone() {
return new ClientTurnSnapshotStatus().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static ClientTurnSnapshotStatus parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new ClientTurnSnapshotStatus(), data).checkInitialized();
}
public static ClientTurnSnapshotStatus parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientTurnSnapshotStatus(), input).checkInitialized();
}
public static ClientTurnSnapshotStatus parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new ClientTurnSnapshotStatus(), input).checkInitialized();
}
/**
* @return factory for creating ClientTurnSnapshotStatus messages
*/
public static MessageFactory<ClientTurnSnapshotStatus> getFactory() {
return ClientTurnSnapshotStatusFactory.INSTANCE;
}
private enum ClientTurnSnapshotStatusFactory implements MessageFactory<ClientTurnSnapshotStatus> {
INSTANCE;
@Override
public ClientTurnSnapshotStatus create() {
return ClientTurnSnapshotStatus.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName spBar = FieldName.forField("spBar", "sp_bar");
}
}
}

View File

@@ -0,0 +1,501 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
import us.hebi.quickbuf.RepeatedMessage;
public final class DailyActiveInfoNotifyOuterClass {
/**
* Protobuf type {@code DailyActiveInfoNotify}
*/
public static final class DailyActiveInfoNotify extends ProtoMessage<DailyActiveInfoNotify> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 daily_active_point = 12;</code>
*/
private int dailyActivePoint;
/**
* <code>repeated uint32 daily_active_quest_id_list = 1;</code>
*/
private final RepeatedInt dailyActiveQuestIdList = RepeatedInt.newEmptyInstance();
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 2;</code>
*/
private final RepeatedMessage<DailyActivityInfoOuterClass.DailyActivityInfo> dailyActiveLevelList = RepeatedMessage.newEmptyInstance(DailyActivityInfoOuterClass.DailyActivityInfo.getFactory());
private DailyActiveInfoNotify() {
}
/**
* @return a new empty instance of {@code DailyActiveInfoNotify}
*/
public static DailyActiveInfoNotify newInstance() {
return new DailyActiveInfoNotify();
}
/**
* <code>optional uint32 daily_active_point = 12;</code>
* @return whether the dailyActivePoint field is set
*/
public boolean hasDailyActivePoint() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 daily_active_point = 12;</code>
* @return this
*/
public DailyActiveInfoNotify clearDailyActivePoint() {
bitField0_ &= ~0x00000001;
dailyActivePoint = 0;
return this;
}
/**
* <code>optional uint32 daily_active_point = 12;</code>
* @return the dailyActivePoint
*/
public int getDailyActivePoint() {
return dailyActivePoint;
}
/**
* <code>optional uint32 daily_active_point = 12;</code>
* @param value the dailyActivePoint to set
* @return this
*/
public DailyActiveInfoNotify setDailyActivePoint(final int value) {
bitField0_ |= 0x00000001;
dailyActivePoint = value;
return this;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 1;</code>
* @return whether the dailyActiveQuestIdList field is set
*/
public boolean hasDailyActiveQuestIdList() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 1;</code>
* @return this
*/
public DailyActiveInfoNotify clearDailyActiveQuestIdList() {
bitField0_ &= ~0x00000002;
dailyActiveQuestIdList.clear();
return this;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 1;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableDailyActiveQuestIdList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getDailyActiveQuestIdList() {
return dailyActiveQuestIdList;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 1;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableDailyActiveQuestIdList() {
bitField0_ |= 0x00000002;
return dailyActiveQuestIdList;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 1;</code>
* @param value the dailyActiveQuestIdList to add
* @return this
*/
public DailyActiveInfoNotify addDailyActiveQuestIdList(final int value) {
bitField0_ |= 0x00000002;
dailyActiveQuestIdList.add(value);
return this;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 1;</code>
* @param values the dailyActiveQuestIdList to add
* @return this
*/
public DailyActiveInfoNotify addAllDailyActiveQuestIdList(final int... values) {
bitField0_ |= 0x00000002;
dailyActiveQuestIdList.addAll(values);
return this;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 2;</code>
* @return whether the dailyActiveLevelList field is set
*/
public boolean hasDailyActiveLevelList() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 2;</code>
* @return this
*/
public DailyActiveInfoNotify clearDailyActiveLevelList() {
bitField0_ &= ~0x00000004;
dailyActiveLevelList.clear();
return this;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 2;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableDailyActiveLevelList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<DailyActivityInfoOuterClass.DailyActivityInfo> getDailyActiveLevelList(
) {
return dailyActiveLevelList;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 2;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<DailyActivityInfoOuterClass.DailyActivityInfo> getMutableDailyActiveLevelList(
) {
bitField0_ |= 0x00000004;
return dailyActiveLevelList;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 2;</code>
* @param value the dailyActiveLevelList to add
* @return this
*/
public DailyActiveInfoNotify addDailyActiveLevelList(
final DailyActivityInfoOuterClass.DailyActivityInfo value) {
bitField0_ |= 0x00000004;
dailyActiveLevelList.add(value);
return this;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 2;</code>
* @param values the dailyActiveLevelList to add
* @return this
*/
public DailyActiveInfoNotify addAllDailyActiveLevelList(
final DailyActivityInfoOuterClass.DailyActivityInfo... values) {
bitField0_ |= 0x00000004;
dailyActiveLevelList.addAll(values);
return this;
}
@Override
public DailyActiveInfoNotify copyFrom(final DailyActiveInfoNotify other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
dailyActivePoint = other.dailyActivePoint;
dailyActiveQuestIdList.copyFrom(other.dailyActiveQuestIdList);
dailyActiveLevelList.copyFrom(other.dailyActiveLevelList);
}
return this;
}
@Override
public DailyActiveInfoNotify mergeFrom(final DailyActiveInfoNotify other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasDailyActivePoint()) {
setDailyActivePoint(other.dailyActivePoint);
}
if (other.hasDailyActiveQuestIdList()) {
getMutableDailyActiveQuestIdList().addAll(other.dailyActiveQuestIdList);
}
if (other.hasDailyActiveLevelList()) {
getMutableDailyActiveLevelList().addAll(other.dailyActiveLevelList);
}
return this;
}
@Override
public DailyActiveInfoNotify clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
dailyActivePoint = 0;
dailyActiveQuestIdList.clear();
dailyActiveLevelList.clear();
return this;
}
@Override
public DailyActiveInfoNotify clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
dailyActiveQuestIdList.clear();
dailyActiveLevelList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof DailyActiveInfoNotify)) {
return false;
}
DailyActiveInfoNotify other = (DailyActiveInfoNotify) o;
return bitField0_ == other.bitField0_
&& (!hasDailyActivePoint() || dailyActivePoint == other.dailyActivePoint)
&& (!hasDailyActiveQuestIdList() || dailyActiveQuestIdList.equals(other.dailyActiveQuestIdList))
&& (!hasDailyActiveLevelList() || dailyActiveLevelList.equals(other.dailyActiveLevelList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 96);
output.writeUInt32NoTag(dailyActivePoint);
}
if ((bitField0_ & 0x00000002) != 0) {
for (int i = 0; i < dailyActiveQuestIdList.length(); i++) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(dailyActiveQuestIdList.array()[i]);
}
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < dailyActiveLevelList.length(); i++) {
output.writeRawByte((byte) 18);
output.writeMessageNoTag(dailyActiveLevelList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(dailyActivePoint);
}
if ((bitField0_ & 0x00000002) != 0) {
size += (1 * dailyActiveQuestIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(dailyActiveQuestIdList);
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * dailyActiveLevelList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dailyActiveLevelList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public DailyActiveInfoNotify mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 96: {
// dailyActivePoint
dailyActivePoint = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 10) {
break;
}
}
case 10: {
// dailyActiveQuestIdList [packed=true]
input.readPackedUInt32(dailyActiveQuestIdList, tag);
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 18) {
break;
}
}
case 18: {
// dailyActiveLevelList
tag = input.readRepeatedMessage(dailyActiveLevelList, tag);
bitField0_ |= 0x00000004;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 8: {
// dailyActiveQuestIdList [packed=false]
tag = input.readRepeatedUInt32(dailyActiveQuestIdList, tag);
bitField0_ |= 0x00000002;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.dailyActivePoint, dailyActivePoint);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRepeatedUInt32(FieldNames.dailyActiveQuestIdList, dailyActiveQuestIdList);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedMessage(FieldNames.dailyActiveLevelList, dailyActiveLevelList);
}
output.endObject();
}
@Override
public DailyActiveInfoNotify mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 859671121:
case 1952864125: {
if (input.isAtField(FieldNames.dailyActivePoint)) {
if (!input.trySkipNullValue()) {
dailyActivePoint = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1903124444:
case -752691246: {
if (input.isAtField(FieldNames.dailyActiveQuestIdList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(dailyActiveQuestIdList);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 705251971:
case 1821477548: {
if (input.isAtField(FieldNames.dailyActiveLevelList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(dailyActiveLevelList);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public DailyActiveInfoNotify clone() {
return new DailyActiveInfoNotify().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static DailyActiveInfoNotify parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new DailyActiveInfoNotify(), data).checkInitialized();
}
public static DailyActiveInfoNotify parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new DailyActiveInfoNotify(), input).checkInitialized();
}
public static DailyActiveInfoNotify parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new DailyActiveInfoNotify(), input).checkInitialized();
}
/**
* @return factory for creating DailyActiveInfoNotify messages
*/
public static MessageFactory<DailyActiveInfoNotify> getFactory() {
return DailyActiveInfoNotifyFactory.INSTANCE;
}
private enum DailyActiveInfoNotifyFactory implements MessageFactory<DailyActiveInfoNotify> {
INSTANCE;
@Override
public DailyActiveInfoNotify create() {
return DailyActiveInfoNotify.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName dailyActivePoint = FieldName.forField("dailyActivePoint", "daily_active_point");
static final FieldName dailyActiveQuestIdList = FieldName.forField("dailyActiveQuestIdList", "daily_active_quest_id_list");
static final FieldName dailyActiveLevelList = FieldName.forField("dailyActiveLevelList", "daily_active_level_list");
}
}
}

View File

@@ -0,0 +1,502 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class DailyActivityInfoOuterClass {
/**
* Protobuf type {@code DailyActivityInfo}
*/
public static final class DailyActivityInfo extends ProtoMessage<DailyActivityInfo> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 level = 5;</code>
*/
private int level;
/**
* <code>optional uint32 daily_active_point = 9;</code>
*/
private int dailyActivePoint;
/**
* <code>optional uint32 world_level = 10;</code>
*/
private int worldLevel;
/**
* <code>optional bool is_has_taken = 13;</code>
*/
private boolean isHasTaken;
private DailyActivityInfo() {
}
/**
* @return a new empty instance of {@code DailyActivityInfo}
*/
public static DailyActivityInfo newInstance() {
return new DailyActivityInfo();
}
/**
* <code>optional uint32 level = 5;</code>
* @return whether the level field is set
*/
public boolean hasLevel() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 level = 5;</code>
* @return this
*/
public DailyActivityInfo clearLevel() {
bitField0_ &= ~0x00000001;
level = 0;
return this;
}
/**
* <code>optional uint32 level = 5;</code>
* @return the level
*/
public int getLevel() {
return level;
}
/**
* <code>optional uint32 level = 5;</code>
* @param value the level to set
* @return this
*/
public DailyActivityInfo setLevel(final int value) {
bitField0_ |= 0x00000001;
level = value;
return this;
}
/**
* <code>optional uint32 daily_active_point = 9;</code>
* @return whether the dailyActivePoint field is set
*/
public boolean hasDailyActivePoint() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 daily_active_point = 9;</code>
* @return this
*/
public DailyActivityInfo clearDailyActivePoint() {
bitField0_ &= ~0x00000002;
dailyActivePoint = 0;
return this;
}
/**
* <code>optional uint32 daily_active_point = 9;</code>
* @return the dailyActivePoint
*/
public int getDailyActivePoint() {
return dailyActivePoint;
}
/**
* <code>optional uint32 daily_active_point = 9;</code>
* @param value the dailyActivePoint to set
* @return this
*/
public DailyActivityInfo setDailyActivePoint(final int value) {
bitField0_ |= 0x00000002;
dailyActivePoint = value;
return this;
}
/**
* <code>optional uint32 world_level = 10;</code>
* @return whether the worldLevel field is set
*/
public boolean hasWorldLevel() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 world_level = 10;</code>
* @return this
*/
public DailyActivityInfo clearWorldLevel() {
bitField0_ &= ~0x00000004;
worldLevel = 0;
return this;
}
/**
* <code>optional uint32 world_level = 10;</code>
* @return the worldLevel
*/
public int getWorldLevel() {
return worldLevel;
}
/**
* <code>optional uint32 world_level = 10;</code>
* @param value the worldLevel to set
* @return this
*/
public DailyActivityInfo setWorldLevel(final int value) {
bitField0_ |= 0x00000004;
worldLevel = value;
return this;
}
/**
* <code>optional bool is_has_taken = 13;</code>
* @return whether the isHasTaken field is set
*/
public boolean hasIsHasTaken() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>optional bool is_has_taken = 13;</code>
* @return this
*/
public DailyActivityInfo clearIsHasTaken() {
bitField0_ &= ~0x00000008;
isHasTaken = false;
return this;
}
/**
* <code>optional bool is_has_taken = 13;</code>
* @return the isHasTaken
*/
public boolean getIsHasTaken() {
return isHasTaken;
}
/**
* <code>optional bool is_has_taken = 13;</code>
* @param value the isHasTaken to set
* @return this
*/
public DailyActivityInfo setIsHasTaken(final boolean value) {
bitField0_ |= 0x00000008;
isHasTaken = value;
return this;
}
@Override
public DailyActivityInfo copyFrom(final DailyActivityInfo other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
level = other.level;
dailyActivePoint = other.dailyActivePoint;
worldLevel = other.worldLevel;
isHasTaken = other.isHasTaken;
}
return this;
}
@Override
public DailyActivityInfo mergeFrom(final DailyActivityInfo other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasLevel()) {
setLevel(other.level);
}
if (other.hasDailyActivePoint()) {
setDailyActivePoint(other.dailyActivePoint);
}
if (other.hasWorldLevel()) {
setWorldLevel(other.worldLevel);
}
if (other.hasIsHasTaken()) {
setIsHasTaken(other.isHasTaken);
}
return this;
}
@Override
public DailyActivityInfo clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
level = 0;
dailyActivePoint = 0;
worldLevel = 0;
isHasTaken = false;
return this;
}
@Override
public DailyActivityInfo clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof DailyActivityInfo)) {
return false;
}
DailyActivityInfo other = (DailyActivityInfo) o;
return bitField0_ == other.bitField0_
&& (!hasLevel() || level == other.level)
&& (!hasDailyActivePoint() || dailyActivePoint == other.dailyActivePoint)
&& (!hasWorldLevel() || worldLevel == other.worldLevel)
&& (!hasIsHasTaken() || isHasTaken == other.isHasTaken);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 40);
output.writeUInt32NoTag(level);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 72);
output.writeUInt32NoTag(dailyActivePoint);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 80);
output.writeUInt32NoTag(worldLevel);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 104);
output.writeBoolNoTag(isHasTaken);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(level);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(dailyActivePoint);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(worldLevel);
}
if ((bitField0_ & 0x00000008) != 0) {
size += 2;
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public DailyActivityInfo mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 40: {
// level
level = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 72) {
break;
}
}
case 72: {
// dailyActivePoint
dailyActivePoint = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 80) {
break;
}
}
case 80: {
// worldLevel
worldLevel = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 104) {
break;
}
}
case 104: {
// isHasTaken
isHasTaken = input.readBool();
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.level, level);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.dailyActivePoint, dailyActivePoint);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.worldLevel, worldLevel);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeBool(FieldNames.isHasTaken, isHasTaken);
}
output.endObject();
}
@Override
public DailyActivityInfo mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 102865796: {
if (input.isAtField(FieldNames.level)) {
if (!input.trySkipNullValue()) {
level = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 859671121:
case 1952864125: {
if (input.isAtField(FieldNames.dailyActivePoint)) {
if (!input.trySkipNullValue()) {
dailyActivePoint = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 440007442:
case 1305257111: {
if (input.isAtField(FieldNames.worldLevel)) {
if (!input.trySkipNullValue()) {
worldLevel = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -663154281:
case -1240296947: {
if (input.isAtField(FieldNames.isHasTaken)) {
if (!input.trySkipNullValue()) {
isHasTaken = input.readBool();
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public DailyActivityInfo clone() {
return new DailyActivityInfo().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static DailyActivityInfo parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new DailyActivityInfo(), data).checkInitialized();
}
public static DailyActivityInfo parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new DailyActivityInfo(), input).checkInitialized();
}
public static DailyActivityInfo parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new DailyActivityInfo(), input).checkInitialized();
}
/**
* @return factory for creating DailyActivityInfo messages
*/
public static MessageFactory<DailyActivityInfo> getFactory() {
return DailyActivityInfoFactory.INSTANCE;
}
private enum DailyActivityInfoFactory implements MessageFactory<DailyActivityInfo> {
INSTANCE;
@Override
public DailyActivityInfo create() {
return DailyActivityInfo.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName level = FieldName.forField("level");
static final FieldName dailyActivePoint = FieldName.forField("dailyActivePoint", "daily_active_point");
static final FieldName worldLevel = FieldName.forField("worldLevel", "world_level");
static final FieldName isHasTaken = FieldName.forField("isHasTaken", "is_has_taken");
}
}
}

View File

@@ -24,6 +24,11 @@ public final class DoGachaScRspOuterClass {
*/
private int gachaId;
/**
* <code>optional uint32 ceiling_num = 5;</code>
*/
private int ceilingNum;
/**
* <code>optional uint32 gacha_num = 11;</code>
*/
@@ -86,12 +91,49 @@ public final class DoGachaScRspOuterClass {
return this;
}
/**
* <code>optional uint32 ceiling_num = 5;</code>
* @return whether the ceilingNum field is set
*/
public boolean hasCeilingNum() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 ceiling_num = 5;</code>
* @return this
*/
public DoGachaScRsp clearCeilingNum() {
bitField0_ &= ~0x00000002;
ceilingNum = 0;
return this;
}
/**
* <code>optional uint32 ceiling_num = 5;</code>
* @return the ceilingNum
*/
public int getCeilingNum() {
return ceilingNum;
}
/**
* <code>optional uint32 ceiling_num = 5;</code>
* @param value the ceilingNum to set
* @return this
*/
public DoGachaScRsp setCeilingNum(final int value) {
bitField0_ |= 0x00000002;
ceilingNum = value;
return this;
}
/**
* <code>optional uint32 gacha_num = 11;</code>
* @return whether the gachaNum field is set
*/
public boolean hasGachaNum() {
return (bitField0_ & 0x00000002) != 0;
return (bitField0_ & 0x00000004) != 0;
}
/**
@@ -99,7 +141,7 @@ public final class DoGachaScRspOuterClass {
* @return this
*/
public DoGachaScRsp clearGachaNum() {
bitField0_ &= ~0x00000002;
bitField0_ &= ~0x00000004;
gachaNum = 0;
return this;
}
@@ -118,7 +160,7 @@ public final class DoGachaScRspOuterClass {
* @return this
*/
public DoGachaScRsp setGachaNum(final int value) {
bitField0_ |= 0x00000002;
bitField0_ |= 0x00000004;
gachaNum = value;
return this;
}
@@ -128,7 +170,7 @@ public final class DoGachaScRspOuterClass {
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000004) != 0;
return (bitField0_ & 0x00000008) != 0;
}
/**
@@ -136,7 +178,7 @@ public final class DoGachaScRspOuterClass {
* @return this
*/
public DoGachaScRsp clearRetcode() {
bitField0_ &= ~0x00000004;
bitField0_ &= ~0x00000008;
retcode = 0;
return this;
}
@@ -155,7 +197,7 @@ public final class DoGachaScRspOuterClass {
* @return this
*/
public DoGachaScRsp setRetcode(final int value) {
bitField0_ |= 0x00000004;
bitField0_ |= 0x00000008;
retcode = value;
return this;
}
@@ -165,7 +207,7 @@ public final class DoGachaScRspOuterClass {
* @return whether the gachaItemList field is set
*/
public boolean hasGachaItemList() {
return (bitField0_ & 0x00000008) != 0;
return (bitField0_ & 0x00000010) != 0;
}
/**
@@ -173,7 +215,7 @@ public final class DoGachaScRspOuterClass {
* @return this
*/
public DoGachaScRsp clearGachaItemList() {
bitField0_ &= ~0x00000008;
bitField0_ &= ~0x00000010;
gachaItemList.clear();
return this;
}
@@ -202,7 +244,7 @@ public final class DoGachaScRspOuterClass {
* @return internal storage object for modifications
*/
public RepeatedMessage<GachaItemOuterClass.GachaItem> getMutableGachaItemList() {
bitField0_ |= 0x00000008;
bitField0_ |= 0x00000010;
return gachaItemList;
}
@@ -212,7 +254,7 @@ public final class DoGachaScRspOuterClass {
* @return this
*/
public DoGachaScRsp addGachaItemList(final GachaItemOuterClass.GachaItem value) {
bitField0_ |= 0x00000008;
bitField0_ |= 0x00000010;
gachaItemList.add(value);
return this;
}
@@ -223,7 +265,7 @@ public final class DoGachaScRspOuterClass {
* @return this
*/
public DoGachaScRsp addAllGachaItemList(final GachaItemOuterClass.GachaItem... values) {
bitField0_ |= 0x00000008;
bitField0_ |= 0x00000010;
gachaItemList.addAll(values);
return this;
}
@@ -234,6 +276,7 @@ public final class DoGachaScRspOuterClass {
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
gachaId = other.gachaId;
ceilingNum = other.ceilingNum;
gachaNum = other.gachaNum;
retcode = other.retcode;
gachaItemList.copyFrom(other.gachaItemList);
@@ -250,6 +293,9 @@ public final class DoGachaScRspOuterClass {
if (other.hasGachaId()) {
setGachaId(other.gachaId);
}
if (other.hasCeilingNum()) {
setCeilingNum(other.ceilingNum);
}
if (other.hasGachaNum()) {
setGachaNum(other.gachaNum);
}
@@ -270,6 +316,7 @@ public final class DoGachaScRspOuterClass {
cachedSize = -1;
bitField0_ = 0;
gachaId = 0;
ceilingNum = 0;
gachaNum = 0;
retcode = 0;
gachaItemList.clear();
@@ -298,6 +345,7 @@ public final class DoGachaScRspOuterClass {
DoGachaScRsp other = (DoGachaScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasGachaId() || gachaId == other.gachaId)
&& (!hasCeilingNum() || ceilingNum == other.ceilingNum)
&& (!hasGachaNum() || gachaNum == other.gachaNum)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasGachaItemList() || gachaItemList.equals(other.gachaItemList));
@@ -310,14 +358,18 @@ public final class DoGachaScRspOuterClass {
output.writeUInt32NoTag(gachaId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 40);
output.writeUInt32NoTag(ceilingNum);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 88);
output.writeUInt32NoTag(gachaNum);
}
if ((bitField0_ & 0x00000004) != 0) {
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 104);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000008) != 0) {
if ((bitField0_ & 0x00000010) != 0) {
for (int i = 0; i < gachaItemList.length(); i++) {
output.writeRawByte((byte) 74);
output.writeMessageNoTag(gachaItemList.get(i));
@@ -332,12 +384,15 @@ public final class DoGachaScRspOuterClass {
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaNum);
size += 1 + ProtoSink.computeUInt32SizeNoTag(ceilingNum);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaNum);
}
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000010) != 0) {
size += (1 * gachaItemList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(gachaItemList);
}
return size;
@@ -355,6 +410,15 @@ public final class DoGachaScRspOuterClass {
gachaId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 40) {
break;
}
}
case 40: {
// ceilingNum
ceilingNum = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 88) {
break;
}
@@ -362,7 +426,7 @@ public final class DoGachaScRspOuterClass {
case 88: {
// gachaNum
gachaNum = input.readUInt32();
bitField0_ |= 0x00000002;
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 104) {
break;
@@ -371,7 +435,7 @@ public final class DoGachaScRspOuterClass {
case 104: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000004;
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 74) {
break;
@@ -380,7 +444,7 @@ public final class DoGachaScRspOuterClass {
case 74: {
// gachaItemList
tag = input.readRepeatedMessage(gachaItemList, tag);
bitField0_ |= 0x00000008;
bitField0_ |= 0x00000010;
if (tag != 0) {
break;
}
@@ -406,12 +470,15 @@ public final class DoGachaScRspOuterClass {
output.writeUInt32(FieldNames.gachaId, gachaId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.gachaNum, gachaNum);
output.writeUInt32(FieldNames.ceilingNum, ceilingNum);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
output.writeUInt32(FieldNames.gachaNum, gachaNum);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRepeatedMessage(FieldNames.gachaItemList, gachaItemList);
}
output.endObject();
@@ -436,12 +503,24 @@ public final class DoGachaScRspOuterClass {
}
break;
}
case -1655838327:
case 209119492: {
if (input.isAtField(FieldNames.ceilingNum)) {
if (!input.trySkipNullValue()) {
ceilingNum = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -2052317532:
case 803166025: {
if (input.isAtField(FieldNames.gachaNum)) {
if (!input.trySkipNullValue()) {
gachaNum = input.readUInt32();
bitField0_ |= 0x00000002;
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
@@ -452,7 +531,7 @@ public final class DoGachaScRspOuterClass {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000004;
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
@@ -464,7 +543,7 @@ public final class DoGachaScRspOuterClass {
if (input.isAtField(FieldNames.gachaItemList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(gachaItemList);
bitField0_ |= 0x00000008;
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
@@ -525,6 +604,8 @@ public final class DoGachaScRspOuterClass {
static class FieldNames {
static final FieldName gachaId = FieldName.forField("gachaId", "gacha_id");
static final FieldName ceilingNum = FieldName.forField("ceilingNum", "ceiling_num");
static final FieldName gachaNum = FieldName.forField("gachaNum", "gacha_num");
static final FieldName retcode = FieldName.forField("retcode");

View File

@@ -0,0 +1,341 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class ExchangeGachaCeilingCsReqOuterClass {
/**
* Protobuf type {@code ExchangeGachaCeilingCsReq}
*/
public static final class ExchangeGachaCeilingCsReq extends ProtoMessage<ExchangeGachaCeilingCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 gacha_type = 10;</code>
*/
private int gachaType;
/**
* <code>optional uint32 avatar_id = 12;</code>
*/
private int avatarId;
private ExchangeGachaCeilingCsReq() {
}
/**
* @return a new empty instance of {@code ExchangeGachaCeilingCsReq}
*/
public static ExchangeGachaCeilingCsReq newInstance() {
return new ExchangeGachaCeilingCsReq();
}
/**
* <code>optional uint32 gacha_type = 10;</code>
* @return whether the gachaType field is set
*/
public boolean hasGachaType() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 gacha_type = 10;</code>
* @return this
*/
public ExchangeGachaCeilingCsReq clearGachaType() {
bitField0_ &= ~0x00000001;
gachaType = 0;
return this;
}
/**
* <code>optional uint32 gacha_type = 10;</code>
* @return the gachaType
*/
public int getGachaType() {
return gachaType;
}
/**
* <code>optional uint32 gacha_type = 10;</code>
* @param value the gachaType to set
* @return this
*/
public ExchangeGachaCeilingCsReq setGachaType(final int value) {
bitField0_ |= 0x00000001;
gachaType = value;
return this;
}
/**
* <code>optional uint32 avatar_id = 12;</code>
* @return whether the avatarId field is set
*/
public boolean hasAvatarId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 avatar_id = 12;</code>
* @return this
*/
public ExchangeGachaCeilingCsReq clearAvatarId() {
bitField0_ &= ~0x00000002;
avatarId = 0;
return this;
}
/**
* <code>optional uint32 avatar_id = 12;</code>
* @return the avatarId
*/
public int getAvatarId() {
return avatarId;
}
/**
* <code>optional uint32 avatar_id = 12;</code>
* @param value the avatarId to set
* @return this
*/
public ExchangeGachaCeilingCsReq setAvatarId(final int value) {
bitField0_ |= 0x00000002;
avatarId = value;
return this;
}
@Override
public ExchangeGachaCeilingCsReq copyFrom(final ExchangeGachaCeilingCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
gachaType = other.gachaType;
avatarId = other.avatarId;
}
return this;
}
@Override
public ExchangeGachaCeilingCsReq mergeFrom(final ExchangeGachaCeilingCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasGachaType()) {
setGachaType(other.gachaType);
}
if (other.hasAvatarId()) {
setAvatarId(other.avatarId);
}
return this;
}
@Override
public ExchangeGachaCeilingCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
gachaType = 0;
avatarId = 0;
return this;
}
@Override
public ExchangeGachaCeilingCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ExchangeGachaCeilingCsReq)) {
return false;
}
ExchangeGachaCeilingCsReq other = (ExchangeGachaCeilingCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasGachaType() || gachaType == other.gachaType)
&& (!hasAvatarId() || avatarId == other.avatarId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 80);
output.writeUInt32NoTag(gachaType);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 96);
output.writeUInt32NoTag(avatarId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaType);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(avatarId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public ExchangeGachaCeilingCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 80: {
// gachaType
gachaType = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 96) {
break;
}
}
case 96: {
// avatarId
avatarId = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.gachaType, gachaType);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.avatarId, avatarId);
}
output.endObject();
}
@Override
public ExchangeGachaCeilingCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 802848732:
case -871474217: {
if (input.isAtField(FieldNames.gachaType)) {
if (!input.trySkipNullValue()) {
gachaType = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1787287636:
case -428636735: {
if (input.isAtField(FieldNames.avatarId)) {
if (!input.trySkipNullValue()) {
avatarId = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public ExchangeGachaCeilingCsReq clone() {
return new ExchangeGachaCeilingCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static ExchangeGachaCeilingCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new ExchangeGachaCeilingCsReq(), data).checkInitialized();
}
public static ExchangeGachaCeilingCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new ExchangeGachaCeilingCsReq(), input).checkInitialized();
}
public static ExchangeGachaCeilingCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new ExchangeGachaCeilingCsReq(), input).checkInitialized();
}
/**
* @return factory for creating ExchangeGachaCeilingCsReq messages
*/
public static MessageFactory<ExchangeGachaCeilingCsReq> getFactory() {
return ExchangeGachaCeilingCsReqFactory.INSTANCE;
}
private enum ExchangeGachaCeilingCsReqFactory implements MessageFactory<ExchangeGachaCeilingCsReq> {
INSTANCE;
@Override
public ExchangeGachaCeilingCsReq create() {
return ExchangeGachaCeilingCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName gachaType = FieldName.forField("gachaType", "gacha_type");
static final FieldName avatarId = FieldName.forField("avatarId", "avatar_id");
}
}
}

View File

@@ -0,0 +1,626 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class ExchangeGachaCeilingScRspOuterClass {
/**
* Protobuf type {@code ExchangeGachaCeilingScRsp}
*/
public static final class ExchangeGachaCeilingScRsp extends ProtoMessage<ExchangeGachaCeilingScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 avatar_id = 5;</code>
*/
private int avatarId;
/**
* <code>optional uint32 retcode = 9;</code>
*/
private int retcode;
/**
* <code>optional uint32 gacha_type = 12;</code>
*/
private int gachaType;
/**
* <code>optional .ItemList transfer_item_list = 2;</code>
*/
private final ItemListOuterClass.ItemList transferItemList = ItemListOuterClass.ItemList.newInstance();
/**
* <code>optional .GachaCeiling gacha_ceiling = 7;</code>
*/
private final GachaCeilingOuterClass.GachaCeiling gachaCeiling = GachaCeilingOuterClass.GachaCeiling.newInstance();
private ExchangeGachaCeilingScRsp() {
}
/**
* @return a new empty instance of {@code ExchangeGachaCeilingScRsp}
*/
public static ExchangeGachaCeilingScRsp newInstance() {
return new ExchangeGachaCeilingScRsp();
}
/**
* <code>optional uint32 avatar_id = 5;</code>
* @return whether the avatarId field is set
*/
public boolean hasAvatarId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 avatar_id = 5;</code>
* @return this
*/
public ExchangeGachaCeilingScRsp clearAvatarId() {
bitField0_ &= ~0x00000001;
avatarId = 0;
return this;
}
/**
* <code>optional uint32 avatar_id = 5;</code>
* @return the avatarId
*/
public int getAvatarId() {
return avatarId;
}
/**
* <code>optional uint32 avatar_id = 5;</code>
* @param value the avatarId to set
* @return this
*/
public ExchangeGachaCeilingScRsp setAvatarId(final int value) {
bitField0_ |= 0x00000001;
avatarId = value;
return this;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @return this
*/
public ExchangeGachaCeilingScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @param value the retcode to set
* @return this
*/
public ExchangeGachaCeilingScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
/**
* <code>optional uint32 gacha_type = 12;</code>
* @return whether the gachaType field is set
*/
public boolean hasGachaType() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 gacha_type = 12;</code>
* @return this
*/
public ExchangeGachaCeilingScRsp clearGachaType() {
bitField0_ &= ~0x00000004;
gachaType = 0;
return this;
}
/**
* <code>optional uint32 gacha_type = 12;</code>
* @return the gachaType
*/
public int getGachaType() {
return gachaType;
}
/**
* <code>optional uint32 gacha_type = 12;</code>
* @param value the gachaType to set
* @return this
*/
public ExchangeGachaCeilingScRsp setGachaType(final int value) {
bitField0_ |= 0x00000004;
gachaType = value;
return this;
}
/**
* <code>optional .ItemList transfer_item_list = 2;</code>
* @return whether the transferItemList field is set
*/
public boolean hasTransferItemList() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>optional .ItemList transfer_item_list = 2;</code>
* @return this
*/
public ExchangeGachaCeilingScRsp clearTransferItemList() {
bitField0_ &= ~0x00000008;
transferItemList.clear();
return this;
}
/**
* <code>optional .ItemList transfer_item_list = 2;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableTransferItemList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public ItemListOuterClass.ItemList getTransferItemList() {
return transferItemList;
}
/**
* <code>optional .ItemList transfer_item_list = 2;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public ItemListOuterClass.ItemList getMutableTransferItemList() {
bitField0_ |= 0x00000008;
return transferItemList;
}
/**
* <code>optional .ItemList transfer_item_list = 2;</code>
* @param value the transferItemList to set
* @return this
*/
public ExchangeGachaCeilingScRsp setTransferItemList(final ItemListOuterClass.ItemList value) {
bitField0_ |= 0x00000008;
transferItemList.copyFrom(value);
return this;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 7;</code>
* @return whether the gachaCeiling field is set
*/
public boolean hasGachaCeiling() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 7;</code>
* @return this
*/
public ExchangeGachaCeilingScRsp clearGachaCeiling() {
bitField0_ &= ~0x00000010;
gachaCeiling.clear();
return this;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 7;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableGachaCeiling()} if you want to modify it.
*
* @return internal storage object for reading
*/
public GachaCeilingOuterClass.GachaCeiling getGachaCeiling() {
return gachaCeiling;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 7;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public GachaCeilingOuterClass.GachaCeiling getMutableGachaCeiling() {
bitField0_ |= 0x00000010;
return gachaCeiling;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 7;</code>
* @param value the gachaCeiling to set
* @return this
*/
public ExchangeGachaCeilingScRsp setGachaCeiling(
final GachaCeilingOuterClass.GachaCeiling value) {
bitField0_ |= 0x00000010;
gachaCeiling.copyFrom(value);
return this;
}
@Override
public ExchangeGachaCeilingScRsp copyFrom(final ExchangeGachaCeilingScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
avatarId = other.avatarId;
retcode = other.retcode;
gachaType = other.gachaType;
transferItemList.copyFrom(other.transferItemList);
gachaCeiling.copyFrom(other.gachaCeiling);
}
return this;
}
@Override
public ExchangeGachaCeilingScRsp mergeFrom(final ExchangeGachaCeilingScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasAvatarId()) {
setAvatarId(other.avatarId);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasGachaType()) {
setGachaType(other.gachaType);
}
if (other.hasTransferItemList()) {
getMutableTransferItemList().mergeFrom(other.transferItemList);
}
if (other.hasGachaCeiling()) {
getMutableGachaCeiling().mergeFrom(other.gachaCeiling);
}
return this;
}
@Override
public ExchangeGachaCeilingScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
avatarId = 0;
retcode = 0;
gachaType = 0;
transferItemList.clear();
gachaCeiling.clear();
return this;
}
@Override
public ExchangeGachaCeilingScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
transferItemList.clearQuick();
gachaCeiling.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof ExchangeGachaCeilingScRsp)) {
return false;
}
ExchangeGachaCeilingScRsp other = (ExchangeGachaCeilingScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasAvatarId() || avatarId == other.avatarId)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasGachaType() || gachaType == other.gachaType)
&& (!hasTransferItemList() || transferItemList.equals(other.transferItemList))
&& (!hasGachaCeiling() || gachaCeiling.equals(other.gachaCeiling));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 40);
output.writeUInt32NoTag(avatarId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 72);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 96);
output.writeUInt32NoTag(gachaType);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 18);
output.writeMessageNoTag(transferItemList);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRawByte((byte) 58);
output.writeMessageNoTag(gachaCeiling);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(avatarId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaType);
}
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(transferItemList);
}
if ((bitField0_ & 0x00000010) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(gachaCeiling);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public ExchangeGachaCeilingScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 40: {
// avatarId
avatarId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 72) {
break;
}
}
case 72: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 96) {
break;
}
}
case 96: {
// gachaType
gachaType = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 18) {
break;
}
}
case 18: {
// transferItemList
input.readMessage(transferItemList);
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 58) {
break;
}
}
case 58: {
// gachaCeiling
input.readMessage(gachaCeiling);
bitField0_ |= 0x00000010;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.avatarId, avatarId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.gachaType, gachaType);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeMessage(FieldNames.transferItemList, transferItemList);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeMessage(FieldNames.gachaCeiling, gachaCeiling);
}
output.endObject();
}
@Override
public ExchangeGachaCeilingScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1787287636:
case -428636735: {
if (input.isAtField(FieldNames.avatarId)) {
if (!input.trySkipNullValue()) {
avatarId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 802848732:
case -871474217: {
if (input.isAtField(FieldNames.gachaType)) {
if (!input.trySkipNullValue()) {
gachaType = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -997597348:
case 263056118: {
if (input.isAtField(FieldNames.transferItemList)) {
if (!input.trySkipNullValue()) {
input.readMessage(transferItemList);
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
case 507275483:
case -1792489728: {
if (input.isAtField(FieldNames.gachaCeiling)) {
if (!input.trySkipNullValue()) {
input.readMessage(gachaCeiling);
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public ExchangeGachaCeilingScRsp clone() {
return new ExchangeGachaCeilingScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static ExchangeGachaCeilingScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new ExchangeGachaCeilingScRsp(), data).checkInitialized();
}
public static ExchangeGachaCeilingScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new ExchangeGachaCeilingScRsp(), input).checkInitialized();
}
public static ExchangeGachaCeilingScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new ExchangeGachaCeilingScRsp(), input).checkInitialized();
}
/**
* @return factory for creating ExchangeGachaCeilingScRsp messages
*/
public static MessageFactory<ExchangeGachaCeilingScRsp> getFactory() {
return ExchangeGachaCeilingScRspFactory.INSTANCE;
}
private enum ExchangeGachaCeilingScRspFactory implements MessageFactory<ExchangeGachaCeilingScRsp> {
INSTANCE;
@Override
public ExchangeGachaCeilingScRsp create() {
return ExchangeGachaCeilingScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName avatarId = FieldName.forField("avatarId", "avatar_id");
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName gachaType = FieldName.forField("gachaType", "gacha_type");
static final FieldName transferItemList = FieldName.forField("transferItemList", "transfer_item_list");
static final FieldName gachaCeiling = FieldName.forField("gachaCeiling", "gacha_ceiling");
}
}
}

View File

@@ -0,0 +1,281 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class FriendRecommendInfoOuterClass {
/**
* Protobuf type {@code FriendRecommendInfo}
*/
public static final class FriendRecommendInfo extends ProtoMessage<FriendRecommendInfo> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional .SimpleInfo simple_info = 11;</code>
*/
private final SimpleInfoOuterClass.SimpleInfo simpleInfo = SimpleInfoOuterClass.SimpleInfo.newInstance();
private FriendRecommendInfo() {
}
/**
* @return a new empty instance of {@code FriendRecommendInfo}
*/
public static FriendRecommendInfo newInstance() {
return new FriendRecommendInfo();
}
/**
* <code>optional .SimpleInfo simple_info = 11;</code>
* @return whether the simpleInfo field is set
*/
public boolean hasSimpleInfo() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional .SimpleInfo simple_info = 11;</code>
* @return this
*/
public FriendRecommendInfo clearSimpleInfo() {
bitField0_ &= ~0x00000001;
simpleInfo.clear();
return this;
}
/**
* <code>optional .SimpleInfo simple_info = 11;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableSimpleInfo()} if you want to modify it.
*
* @return internal storage object for reading
*/
public SimpleInfoOuterClass.SimpleInfo getSimpleInfo() {
return simpleInfo;
}
/**
* <code>optional .SimpleInfo simple_info = 11;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public SimpleInfoOuterClass.SimpleInfo getMutableSimpleInfo() {
bitField0_ |= 0x00000001;
return simpleInfo;
}
/**
* <code>optional .SimpleInfo simple_info = 11;</code>
* @param value the simpleInfo to set
* @return this
*/
public FriendRecommendInfo setSimpleInfo(final SimpleInfoOuterClass.SimpleInfo value) {
bitField0_ |= 0x00000001;
simpleInfo.copyFrom(value);
return this;
}
@Override
public FriendRecommendInfo copyFrom(final FriendRecommendInfo other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
simpleInfo.copyFrom(other.simpleInfo);
}
return this;
}
@Override
public FriendRecommendInfo mergeFrom(final FriendRecommendInfo other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasSimpleInfo()) {
getMutableSimpleInfo().mergeFrom(other.simpleInfo);
}
return this;
}
@Override
public FriendRecommendInfo clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
simpleInfo.clear();
return this;
}
@Override
public FriendRecommendInfo clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
simpleInfo.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof FriendRecommendInfo)) {
return false;
}
FriendRecommendInfo other = (FriendRecommendInfo) o;
return bitField0_ == other.bitField0_
&& (!hasSimpleInfo() || simpleInfo.equals(other.simpleInfo));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 90);
output.writeMessageNoTag(simpleInfo);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(simpleInfo);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public FriendRecommendInfo mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 90: {
// simpleInfo
input.readMessage(simpleInfo);
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeMessage(FieldNames.simpleInfo, simpleInfo);
}
output.endObject();
}
@Override
public FriendRecommendInfo mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -1431903872:
case -1419171045: {
if (input.isAtField(FieldNames.simpleInfo)) {
if (!input.trySkipNullValue()) {
input.readMessage(simpleInfo);
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public FriendRecommendInfo clone() {
return new FriendRecommendInfo().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static FriendRecommendInfo parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new FriendRecommendInfo(), data).checkInitialized();
}
public static FriendRecommendInfo parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new FriendRecommendInfo(), input).checkInitialized();
}
public static FriendRecommendInfo parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new FriendRecommendInfo(), input).checkInitialized();
}
/**
* @return factory for creating FriendRecommendInfo messages
*/
public static MessageFactory<FriendRecommendInfo> getFactory() {
return FriendRecommendInfoFactory.INSTANCE;
}
private enum FriendRecommendInfoFactory implements MessageFactory<FriendRecommendInfo> {
INSTANCE;
@Override
public FriendRecommendInfo create() {
return FriendRecommendInfo.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName simpleInfo = FieldName.forField("simpleInfo", "simple_info");
}
}
}

View File

@@ -19,6 +19,16 @@ public final class GachaCeilingOuterClass {
public static final class GachaCeiling extends ProtoMessage<GachaCeiling> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 ceiling_num = 14;</code>
*/
private int ceilingNum;
/**
* <code>optional bool is_claimed = 9;</code>
*/
private boolean isClaimed;
/**
* <code>repeated .GachaCeilingAvatar avatar_list = 15;</code>
*/
@@ -34,12 +44,86 @@ public final class GachaCeilingOuterClass {
return new GachaCeiling();
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @return whether the ceilingNum field is set
*/
public boolean hasCeilingNum() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @return this
*/
public GachaCeiling clearCeilingNum() {
bitField0_ &= ~0x00000001;
ceilingNum = 0;
return this;
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @return the ceilingNum
*/
public int getCeilingNum() {
return ceilingNum;
}
/**
* <code>optional uint32 ceiling_num = 14;</code>
* @param value the ceilingNum to set
* @return this
*/
public GachaCeiling setCeilingNum(final int value) {
bitField0_ |= 0x00000001;
ceilingNum = value;
return this;
}
/**
* <code>optional bool is_claimed = 9;</code>
* @return whether the isClaimed field is set
*/
public boolean hasIsClaimed() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional bool is_claimed = 9;</code>
* @return this
*/
public GachaCeiling clearIsClaimed() {
bitField0_ &= ~0x00000002;
isClaimed = false;
return this;
}
/**
* <code>optional bool is_claimed = 9;</code>
* @return the isClaimed
*/
public boolean getIsClaimed() {
return isClaimed;
}
/**
* <code>optional bool is_claimed = 9;</code>
* @param value the isClaimed to set
* @return this
*/
public GachaCeiling setIsClaimed(final boolean value) {
bitField0_ |= 0x00000002;
isClaimed = value;
return this;
}
/**
* <code>repeated .GachaCeilingAvatar avatar_list = 15;</code>
* @return whether the avatarList field is set
*/
public boolean hasAvatarList() {
return (bitField0_ & 0x00000001) != 0;
return (bitField0_ & 0x00000004) != 0;
}
/**
@@ -47,7 +131,7 @@ public final class GachaCeilingOuterClass {
* @return this
*/
public GachaCeiling clearAvatarList() {
bitField0_ &= ~0x00000001;
bitField0_ &= ~0x00000004;
avatarList.clear();
return this;
}
@@ -76,7 +160,7 @@ public final class GachaCeilingOuterClass {
* @return internal storage object for modifications
*/
public RepeatedMessage<GachaCeilingAvatarOuterClass.GachaCeilingAvatar> getMutableAvatarList() {
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000004;
return avatarList;
}
@@ -86,7 +170,7 @@ public final class GachaCeilingOuterClass {
* @return this
*/
public GachaCeiling addAvatarList(final GachaCeilingAvatarOuterClass.GachaCeilingAvatar value) {
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000004;
avatarList.add(value);
return this;
}
@@ -98,7 +182,7 @@ public final class GachaCeilingOuterClass {
*/
public GachaCeiling addAllAvatarList(
final GachaCeilingAvatarOuterClass.GachaCeilingAvatar... values) {
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000004;
avatarList.addAll(values);
return this;
}
@@ -108,6 +192,8 @@ public final class GachaCeilingOuterClass {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
ceilingNum = other.ceilingNum;
isClaimed = other.isClaimed;
avatarList.copyFrom(other.avatarList);
}
return this;
@@ -119,6 +205,12 @@ public final class GachaCeilingOuterClass {
return this;
}
cachedSize = -1;
if (other.hasCeilingNum()) {
setCeilingNum(other.ceilingNum);
}
if (other.hasIsClaimed()) {
setIsClaimed(other.isClaimed);
}
if (other.hasAvatarList()) {
getMutableAvatarList().addAll(other.avatarList);
}
@@ -132,6 +224,8 @@ public final class GachaCeilingOuterClass {
}
cachedSize = -1;
bitField0_ = 0;
ceilingNum = 0;
isClaimed = false;
avatarList.clear();
return this;
}
@@ -157,12 +251,22 @@ public final class GachaCeilingOuterClass {
}
GachaCeiling other = (GachaCeiling) o;
return bitField0_ == other.bitField0_
&& (!hasCeilingNum() || ceilingNum == other.ceilingNum)
&& (!hasIsClaimed() || isClaimed == other.isClaimed)
&& (!hasAvatarList() || avatarList.equals(other.avatarList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt32NoTag(ceilingNum);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 72);
output.writeBoolNoTag(isClaimed);
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < avatarList.length(); i++) {
output.writeRawByte((byte) 122);
output.writeMessageNoTag(avatarList.get(i));
@@ -174,6 +278,12 @@ public final class GachaCeilingOuterClass {
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(ceilingNum);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 2;
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * avatarList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(avatarList);
}
return size;
@@ -186,10 +296,28 @@ public final class GachaCeilingOuterClass {
int tag = input.readTag();
while (true) {
switch (tag) {
case 112: {
// ceilingNum
ceilingNum = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 72) {
break;
}
}
case 72: {
// isClaimed
isClaimed = input.readBool();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 122) {
break;
}
}
case 122: {
// avatarList
tag = input.readRepeatedMessage(avatarList, tag);
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000004;
if (tag != 0) {
break;
}
@@ -212,6 +340,12 @@ public final class GachaCeilingOuterClass {
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.ceilingNum, ceilingNum);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeBool(FieldNames.isClaimed, isClaimed);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedMessage(FieldNames.avatarList, avatarList);
}
output.endObject();
@@ -224,12 +358,36 @@ public final class GachaCeilingOuterClass {
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -1655838327:
case 209119492: {
if (input.isAtField(FieldNames.ceilingNum)) {
if (!input.trySkipNullValue()) {
ceilingNum = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 273538385:
case -1941340218: {
if (input.isAtField(FieldNames.isClaimed)) {
if (!input.trySkipNullValue()) {
isClaimed = input.readBool();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -403402345:
case 397055940: {
if (input.isAtField(FieldNames.avatarList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(avatarList);
bitField0_ |= 0x00000001;
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
@@ -288,6 +446,10 @@ public final class GachaCeilingOuterClass {
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName ceilingNum = FieldName.forField("ceilingNum", "ceiling_num");
static final FieldName isClaimed = FieldName.forField("isClaimed", "is_claimed");
static final FieldName avatarList = FieldName.forField("avatarList", "avatar_list");
}
}

View File

@@ -91,7 +91,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -107,6 +107,11 @@ public final class GateserverOuterClass {
*/
private final Utf8String ifixVersion = Utf8String.newEmptyInstance();
/**
* <code>optional string msg = 1550;</code>
*/
private final Utf8String msg = Utf8String.newEmptyInstance();
private Gateserver() {
}
@@ -833,7 +838,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -845,7 +850,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -859,7 +864,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -871,7 +876,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -883,7 +888,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -896,7 +901,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -911,7 +916,7 @@ public final class GateserverOuterClass {
/**
* <pre>
* lua version
* lua versionf
* </pre>
*
* <code>optional string mdk_res_version = 1213;</code>
@@ -1017,6 +1022,71 @@ public final class GateserverOuterClass {
return this;
}
/**
* <code>optional string msg = 1550;</code>
* @return whether the msg field is set
*/
public boolean hasMsg() {
return (bitField0_ & 0x00010000) != 0;
}
/**
* <code>optional string msg = 1550;</code>
* @return this
*/
public Gateserver clearMsg() {
bitField0_ &= ~0x00010000;
msg.clear();
return this;
}
/**
* <code>optional string msg = 1550;</code>
* @return the msg
*/
public String getMsg() {
return msg.getString();
}
/**
* <code>optional string msg = 1550;</code>
* @return internal {@code Utf8String} representation of msg for reading
*/
public Utf8String getMsgBytes() {
return this.msg;
}
/**
* <code>optional string msg = 1550;</code>
* @return internal {@code Utf8String} representation of msg for modifications
*/
public Utf8String getMutableMsgBytes() {
bitField0_ |= 0x00010000;
return this.msg;
}
/**
* <code>optional string msg = 1550;</code>
* @param value the msg to set
* @return this
*/
public Gateserver setMsg(final CharSequence value) {
bitField0_ |= 0x00010000;
msg.copyFrom(value);
return this;
}
/**
* <code>optional string msg = 1550;</code>
* @param value the msg to set
* @return this
*/
public Gateserver setMsg(final Utf8String value) {
bitField0_ |= 0x00010000;
msg.copyFrom(value);
return this;
}
@Override
public Gateserver copyFrom(final Gateserver other) {
cachedSize = other.cachedSize;
@@ -1038,6 +1108,7 @@ public final class GateserverOuterClass {
clientSecretKey.copyFrom(other.clientSecretKey);
mdkResVersion.copyFrom(other.mdkResVersion);
ifixVersion.copyFrom(other.ifixVersion);
msg.copyFrom(other.msg);
}
return this;
}
@@ -1096,6 +1167,9 @@ public final class GateserverOuterClass {
if (other.hasIfixVersion()) {
getMutableIfixVersionBytes().copyFrom(other.ifixVersion);
}
if (other.hasMsg()) {
getMutableMsgBytes().copyFrom(other.msg);
}
return this;
}
@@ -1122,6 +1196,7 @@ public final class GateserverOuterClass {
clientSecretKey.clear();
mdkResVersion.clear();
ifixVersion.clear();
msg.clear();
return this;
}
@@ -1141,6 +1216,7 @@ public final class GateserverOuterClass {
clientSecretKey.clear();
mdkResVersion.clear();
ifixVersion.clear();
msg.clear();
return this;
}
@@ -1169,7 +1245,8 @@ public final class GateserverOuterClass {
&& (!hasIfixUrl() || ifixUrl.equals(other.ifixUrl))
&& (!hasClientSecretKey() || clientSecretKey.equals(other.clientSecretKey))
&& (!hasMdkResVersion() || mdkResVersion.equals(other.mdkResVersion))
&& (!hasIfixVersion() || ifixVersion.equals(other.ifixVersion));
&& (!hasIfixVersion() || ifixVersion.equals(other.ifixVersion))
&& (!hasMsg() || msg.equals(other.msg));
}
@Override
@@ -1238,6 +1315,10 @@ public final class GateserverOuterClass {
output.writeRawLittleEndian16((short) 20386);
output.writeStringNoTag(ifixVersion);
}
if ((bitField0_ & 0x00010000) != 0) {
output.writeRawLittleEndian16((short) 24818);
output.writeStringNoTag(msg);
}
}
@Override
@@ -1291,6 +1372,9 @@ public final class GateserverOuterClass {
if ((bitField0_ & 0x00008000) != 0) {
size += 2 + ProtoSink.computeStringSizeNoTag(ifixVersion);
}
if ((bitField0_ & 0x00010000) != 0) {
size += 2 + ProtoSink.computeStringSizeNoTag(msg);
}
return size;
}
@@ -1441,6 +1525,15 @@ public final class GateserverOuterClass {
input.readString(ifixVersion);
bitField0_ |= 0x00008000;
tag = input.readTag();
if (tag != 12402) {
break;
}
}
case 12402: {
// msg
input.readString(msg);
bitField0_ |= 0x00010000;
tag = input.readTag();
if (tag != 0) {
break;
}
@@ -1510,6 +1603,9 @@ public final class GateserverOuterClass {
if ((bitField0_ & 0x00008000) != 0) {
output.writeString(FieldNames.ifixVersion, ifixVersion);
}
if ((bitField0_ & 0x00010000) != 0) {
output.writeString(FieldNames.msg, msg);
}
output.endObject();
}
@@ -1704,6 +1800,17 @@ public final class GateserverOuterClass {
}
break;
}
case 108417: {
if (input.isAtField(FieldNames.msg)) {
if (!input.trySkipNullValue()) {
input.readString(msg);
bitField0_ |= 0x00010000;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
@@ -1787,6 +1894,8 @@ public final class GateserverOuterClass {
static final FieldName mdkResVersion = FieldName.forField("mdkResVersion", "mdk_res_version");
static final FieldName ifixVersion = FieldName.forField("ifixVersion", "ifix_version");
static final FieldName msg = FieldName.forField("msg");
}
}
}

View File

@@ -0,0 +1,174 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class GetDailyActiveInfoCsReqOuterClass {
/**
* Protobuf type {@code GetDailyActiveInfoCsReq}
*/
public static final class GetDailyActiveInfoCsReq extends ProtoMessage<GetDailyActiveInfoCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
private GetDailyActiveInfoCsReq() {
}
/**
* @return a new empty instance of {@code GetDailyActiveInfoCsReq}
*/
public static GetDailyActiveInfoCsReq newInstance() {
return new GetDailyActiveInfoCsReq();
}
@Override
public GetDailyActiveInfoCsReq copyFrom(final GetDailyActiveInfoCsReq other) {
cachedSize = other.cachedSize;
return this;
}
@Override
public GetDailyActiveInfoCsReq mergeFrom(final GetDailyActiveInfoCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetDailyActiveInfoCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetDailyActiveInfoCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetDailyActiveInfoCsReq)) {
return false;
}
GetDailyActiveInfoCsReq other = (GetDailyActiveInfoCsReq) o;
return true;
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
}
@Override
protected int computeSerializedSize() {
int size = 0;
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetDailyActiveInfoCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
output.endObject();
}
@Override
public GetDailyActiveInfoCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetDailyActiveInfoCsReq clone() {
return new GetDailyActiveInfoCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetDailyActiveInfoCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetDailyActiveInfoCsReq(), data).checkInitialized();
}
public static GetDailyActiveInfoCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetDailyActiveInfoCsReq(), input).checkInitialized();
}
public static GetDailyActiveInfoCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetDailyActiveInfoCsReq(), input).checkInitialized();
}
/**
* @return factory for creating GetDailyActiveInfoCsReq messages
*/
public static MessageFactory<GetDailyActiveInfoCsReq> getFactory() {
return GetDailyActiveInfoCsReqFactory.INSTANCE;
}
private enum GetDailyActiveInfoCsReqFactory implements MessageFactory<GetDailyActiveInfoCsReq> {
INSTANCE;
@Override
public GetDailyActiveInfoCsReq create() {
return GetDailyActiveInfoCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
}
}
}

View File

@@ -0,0 +1,581 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
import us.hebi.quickbuf.RepeatedMessage;
public final class GetDailyActiveInfoScRspOuterClass {
/**
* Protobuf type {@code GetDailyActiveInfoScRsp}
*/
public static final class GetDailyActiveInfoScRsp extends ProtoMessage<GetDailyActiveInfoScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 daily_active_point = 2;</code>
*/
private int dailyActivePoint;
/**
* <code>optional uint32 retcode = 15;</code>
*/
private int retcode;
/**
* <code>repeated uint32 daily_active_quest_id_list = 3;</code>
*/
private final RepeatedInt dailyActiveQuestIdList = RepeatedInt.newEmptyInstance();
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 10;</code>
*/
private final RepeatedMessage<DailyActivityInfoOuterClass.DailyActivityInfo> dailyActiveLevelList = RepeatedMessage.newEmptyInstance(DailyActivityInfoOuterClass.DailyActivityInfo.getFactory());
private GetDailyActiveInfoScRsp() {
}
/**
* @return a new empty instance of {@code GetDailyActiveInfoScRsp}
*/
public static GetDailyActiveInfoScRsp newInstance() {
return new GetDailyActiveInfoScRsp();
}
/**
* <code>optional uint32 daily_active_point = 2;</code>
* @return whether the dailyActivePoint field is set
*/
public boolean hasDailyActivePoint() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 daily_active_point = 2;</code>
* @return this
*/
public GetDailyActiveInfoScRsp clearDailyActivePoint() {
bitField0_ &= ~0x00000001;
dailyActivePoint = 0;
return this;
}
/**
* <code>optional uint32 daily_active_point = 2;</code>
* @return the dailyActivePoint
*/
public int getDailyActivePoint() {
return dailyActivePoint;
}
/**
* <code>optional uint32 daily_active_point = 2;</code>
* @param value the dailyActivePoint to set
* @return this
*/
public GetDailyActiveInfoScRsp setDailyActivePoint(final int value) {
bitField0_ |= 0x00000001;
dailyActivePoint = value;
return this;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return this
*/
public GetDailyActiveInfoScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @param value the retcode to set
* @return this
*/
public GetDailyActiveInfoScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 3;</code>
* @return whether the dailyActiveQuestIdList field is set
*/
public boolean hasDailyActiveQuestIdList() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 3;</code>
* @return this
*/
public GetDailyActiveInfoScRsp clearDailyActiveQuestIdList() {
bitField0_ &= ~0x00000004;
dailyActiveQuestIdList.clear();
return this;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 3;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableDailyActiveQuestIdList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getDailyActiveQuestIdList() {
return dailyActiveQuestIdList;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 3;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableDailyActiveQuestIdList() {
bitField0_ |= 0x00000004;
return dailyActiveQuestIdList;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 3;</code>
* @param value the dailyActiveQuestIdList to add
* @return this
*/
public GetDailyActiveInfoScRsp addDailyActiveQuestIdList(final int value) {
bitField0_ |= 0x00000004;
dailyActiveQuestIdList.add(value);
return this;
}
/**
* <code>repeated uint32 daily_active_quest_id_list = 3;</code>
* @param values the dailyActiveQuestIdList to add
* @return this
*/
public GetDailyActiveInfoScRsp addAllDailyActiveQuestIdList(final int... values) {
bitField0_ |= 0x00000004;
dailyActiveQuestIdList.addAll(values);
return this;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 10;</code>
* @return whether the dailyActiveLevelList field is set
*/
public boolean hasDailyActiveLevelList() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 10;</code>
* @return this
*/
public GetDailyActiveInfoScRsp clearDailyActiveLevelList() {
bitField0_ &= ~0x00000008;
dailyActiveLevelList.clear();
return this;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 10;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableDailyActiveLevelList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<DailyActivityInfoOuterClass.DailyActivityInfo> getDailyActiveLevelList(
) {
return dailyActiveLevelList;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 10;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<DailyActivityInfoOuterClass.DailyActivityInfo> getMutableDailyActiveLevelList(
) {
bitField0_ |= 0x00000008;
return dailyActiveLevelList;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 10;</code>
* @param value the dailyActiveLevelList to add
* @return this
*/
public GetDailyActiveInfoScRsp addDailyActiveLevelList(
final DailyActivityInfoOuterClass.DailyActivityInfo value) {
bitField0_ |= 0x00000008;
dailyActiveLevelList.add(value);
return this;
}
/**
* <code>repeated .DailyActivityInfo daily_active_level_list = 10;</code>
* @param values the dailyActiveLevelList to add
* @return this
*/
public GetDailyActiveInfoScRsp addAllDailyActiveLevelList(
final DailyActivityInfoOuterClass.DailyActivityInfo... values) {
bitField0_ |= 0x00000008;
dailyActiveLevelList.addAll(values);
return this;
}
@Override
public GetDailyActiveInfoScRsp copyFrom(final GetDailyActiveInfoScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
dailyActivePoint = other.dailyActivePoint;
retcode = other.retcode;
dailyActiveQuestIdList.copyFrom(other.dailyActiveQuestIdList);
dailyActiveLevelList.copyFrom(other.dailyActiveLevelList);
}
return this;
}
@Override
public GetDailyActiveInfoScRsp mergeFrom(final GetDailyActiveInfoScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasDailyActivePoint()) {
setDailyActivePoint(other.dailyActivePoint);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasDailyActiveQuestIdList()) {
getMutableDailyActiveQuestIdList().addAll(other.dailyActiveQuestIdList);
}
if (other.hasDailyActiveLevelList()) {
getMutableDailyActiveLevelList().addAll(other.dailyActiveLevelList);
}
return this;
}
@Override
public GetDailyActiveInfoScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
dailyActivePoint = 0;
retcode = 0;
dailyActiveQuestIdList.clear();
dailyActiveLevelList.clear();
return this;
}
@Override
public GetDailyActiveInfoScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
dailyActiveQuestIdList.clear();
dailyActiveLevelList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetDailyActiveInfoScRsp)) {
return false;
}
GetDailyActiveInfoScRsp other = (GetDailyActiveInfoScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasDailyActivePoint() || dailyActivePoint == other.dailyActivePoint)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasDailyActiveQuestIdList() || dailyActiveQuestIdList.equals(other.dailyActiveQuestIdList))
&& (!hasDailyActiveLevelList() || dailyActiveLevelList.equals(other.dailyActiveLevelList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 16);
output.writeUInt32NoTag(dailyActivePoint);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 120);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < dailyActiveQuestIdList.length(); i++) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(dailyActiveQuestIdList.array()[i]);
}
}
if ((bitField0_ & 0x00000008) != 0) {
for (int i = 0; i < dailyActiveLevelList.length(); i++) {
output.writeRawByte((byte) 82);
output.writeMessageNoTag(dailyActiveLevelList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(dailyActivePoint);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * dailyActiveQuestIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(dailyActiveQuestIdList);
}
if ((bitField0_ & 0x00000008) != 0) {
size += (1 * dailyActiveLevelList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(dailyActiveLevelList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetDailyActiveInfoScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 16: {
// dailyActivePoint
dailyActivePoint = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 120) {
break;
}
}
case 120: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 26) {
break;
}
}
case 26: {
// dailyActiveQuestIdList [packed=true]
input.readPackedUInt32(dailyActiveQuestIdList, tag);
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 82) {
break;
}
}
case 82: {
// dailyActiveLevelList
tag = input.readRepeatedMessage(dailyActiveLevelList, tag);
bitField0_ |= 0x00000008;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 24: {
// dailyActiveQuestIdList [packed=false]
tag = input.readRepeatedUInt32(dailyActiveQuestIdList, tag);
bitField0_ |= 0x00000004;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.dailyActivePoint, dailyActivePoint);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedUInt32(FieldNames.dailyActiveQuestIdList, dailyActiveQuestIdList);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRepeatedMessage(FieldNames.dailyActiveLevelList, dailyActiveLevelList);
}
output.endObject();
}
@Override
public GetDailyActiveInfoScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 859671121:
case 1952864125: {
if (input.isAtField(FieldNames.dailyActivePoint)) {
if (!input.trySkipNullValue()) {
dailyActivePoint = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 1903124444:
case -752691246: {
if (input.isAtField(FieldNames.dailyActiveQuestIdList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(dailyActiveQuestIdList);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case 705251971:
case 1821477548: {
if (input.isAtField(FieldNames.dailyActiveLevelList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(dailyActiveLevelList);
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetDailyActiveInfoScRsp clone() {
return new GetDailyActiveInfoScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetDailyActiveInfoScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetDailyActiveInfoScRsp(), data).checkInitialized();
}
public static GetDailyActiveInfoScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetDailyActiveInfoScRsp(), input).checkInitialized();
}
public static GetDailyActiveInfoScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetDailyActiveInfoScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetDailyActiveInfoScRsp messages
*/
public static MessageFactory<GetDailyActiveInfoScRsp> getFactory() {
return GetDailyActiveInfoScRspFactory.INSTANCE;
}
private enum GetDailyActiveInfoScRspFactory implements MessageFactory<GetDailyActiveInfoScRsp> {
INSTANCE;
@Override
public GetDailyActiveInfoScRsp create() {
return GetDailyActiveInfoScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName dailyActivePoint = FieldName.forField("dailyActivePoint", "daily_active_point");
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName dailyActiveQuestIdList = FieldName.forField("dailyActiveQuestIdList", "daily_active_quest_id_list");
static final FieldName dailyActiveLevelList = FieldName.forField("dailyActiveLevelList", "daily_active_level_list");
}
}
}

View File

@@ -0,0 +1,380 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedMessage;
public final class GetFriendRecommendListInfoScRspOuterClass {
/**
* Protobuf type {@code GetFriendRecommendListInfoScRsp}
*/
public static final class GetFriendRecommendListInfoScRsp extends ProtoMessage<GetFriendRecommendListInfoScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 retcode = 12;</code>
*/
private int retcode;
/**
* <code>repeated .FriendRecommendInfo friend_recommend_list = 5;</code>
*/
private final RepeatedMessage<FriendRecommendInfoOuterClass.FriendRecommendInfo> friendRecommendList = RepeatedMessage.newEmptyInstance(FriendRecommendInfoOuterClass.FriendRecommendInfo.getFactory());
private GetFriendRecommendListInfoScRsp() {
}
/**
* @return a new empty instance of {@code GetFriendRecommendListInfoScRsp}
*/
public static GetFriendRecommendListInfoScRsp newInstance() {
return new GetFriendRecommendListInfoScRsp();
}
/**
* <code>optional uint32 retcode = 12;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 retcode = 12;</code>
* @return this
*/
public GetFriendRecommendListInfoScRsp clearRetcode() {
bitField0_ &= ~0x00000001;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 12;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 12;</code>
* @param value the retcode to set
* @return this
*/
public GetFriendRecommendListInfoScRsp setRetcode(final int value) {
bitField0_ |= 0x00000001;
retcode = value;
return this;
}
/**
* <code>repeated .FriendRecommendInfo friend_recommend_list = 5;</code>
* @return whether the friendRecommendList field is set
*/
public boolean hasFriendRecommendList() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>repeated .FriendRecommendInfo friend_recommend_list = 5;</code>
* @return this
*/
public GetFriendRecommendListInfoScRsp clearFriendRecommendList() {
bitField0_ &= ~0x00000002;
friendRecommendList.clear();
return this;
}
/**
* <code>repeated .FriendRecommendInfo friend_recommend_list = 5;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableFriendRecommendList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<FriendRecommendInfoOuterClass.FriendRecommendInfo> getFriendRecommendList(
) {
return friendRecommendList;
}
/**
* <code>repeated .FriendRecommendInfo friend_recommend_list = 5;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<FriendRecommendInfoOuterClass.FriendRecommendInfo> getMutableFriendRecommendList(
) {
bitField0_ |= 0x00000002;
return friendRecommendList;
}
/**
* <code>repeated .FriendRecommendInfo friend_recommend_list = 5;</code>
* @param value the friendRecommendList to add
* @return this
*/
public GetFriendRecommendListInfoScRsp addFriendRecommendList(
final FriendRecommendInfoOuterClass.FriendRecommendInfo value) {
bitField0_ |= 0x00000002;
friendRecommendList.add(value);
return this;
}
/**
* <code>repeated .FriendRecommendInfo friend_recommend_list = 5;</code>
* @param values the friendRecommendList to add
* @return this
*/
public GetFriendRecommendListInfoScRsp addAllFriendRecommendList(
final FriendRecommendInfoOuterClass.FriendRecommendInfo... values) {
bitField0_ |= 0x00000002;
friendRecommendList.addAll(values);
return this;
}
@Override
public GetFriendRecommendListInfoScRsp copyFrom(final GetFriendRecommendListInfoScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
retcode = other.retcode;
friendRecommendList.copyFrom(other.friendRecommendList);
}
return this;
}
@Override
public GetFriendRecommendListInfoScRsp mergeFrom(final GetFriendRecommendListInfoScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasFriendRecommendList()) {
getMutableFriendRecommendList().addAll(other.friendRecommendList);
}
return this;
}
@Override
public GetFriendRecommendListInfoScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
retcode = 0;
friendRecommendList.clear();
return this;
}
@Override
public GetFriendRecommendListInfoScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
friendRecommendList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetFriendRecommendListInfoScRsp)) {
return false;
}
GetFriendRecommendListInfoScRsp other = (GetFriendRecommendListInfoScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasFriendRecommendList() || friendRecommendList.equals(other.friendRecommendList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 96);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
for (int i = 0; i < friendRecommendList.length(); i++) {
output.writeRawByte((byte) 42);
output.writeMessageNoTag(friendRecommendList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
size += (1 * friendRecommendList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(friendRecommendList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetFriendRecommendListInfoScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 96: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 42) {
break;
}
}
case 42: {
// friendRecommendList
tag = input.readRepeatedMessage(friendRecommendList, tag);
bitField0_ |= 0x00000002;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRepeatedMessage(FieldNames.friendRecommendList, friendRecommendList);
}
output.endObject();
}
@Override
public GetFriendRecommendListInfoScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1367821692:
case -194477566: {
if (input.isAtField(FieldNames.friendRecommendList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(friendRecommendList);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetFriendRecommendListInfoScRsp clone() {
return new GetFriendRecommendListInfoScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetFriendRecommendListInfoScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetFriendRecommendListInfoScRsp(), data).checkInitialized();
}
public static GetFriendRecommendListInfoScRsp parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new GetFriendRecommendListInfoScRsp(), input).checkInitialized();
}
public static GetFriendRecommendListInfoScRsp parseFrom(final JsonSource input) throws
IOException {
return ProtoMessage.mergeFrom(new GetFriendRecommendListInfoScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetFriendRecommendListInfoScRsp messages
*/
public static MessageFactory<GetFriendRecommendListInfoScRsp> getFactory() {
return GetFriendRecommendListInfoScRspFactory.INSTANCE;
}
private enum GetFriendRecommendListInfoScRspFactory implements MessageFactory<GetFriendRecommendListInfoScRsp> {
INSTANCE;
@Override
public GetFriendRecommendListInfoScRsp create() {
return GetFriendRecommendListInfoScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName friendRecommendList = FieldName.forField("friendRecommendList", "friend_recommend_list");
}
}
}

View File

@@ -0,0 +1,260 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class GetGachaCeilingCsReqOuterClass {
/**
* Protobuf type {@code GetGachaCeilingCsReq}
*/
public static final class GetGachaCeilingCsReq extends ProtoMessage<GetGachaCeilingCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 gacha_type = 4;</code>
*/
private int gachaType;
private GetGachaCeilingCsReq() {
}
/**
* @return a new empty instance of {@code GetGachaCeilingCsReq}
*/
public static GetGachaCeilingCsReq newInstance() {
return new GetGachaCeilingCsReq();
}
/**
* <code>optional uint32 gacha_type = 4;</code>
* @return whether the gachaType field is set
*/
public boolean hasGachaType() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 gacha_type = 4;</code>
* @return this
*/
public GetGachaCeilingCsReq clearGachaType() {
bitField0_ &= ~0x00000001;
gachaType = 0;
return this;
}
/**
* <code>optional uint32 gacha_type = 4;</code>
* @return the gachaType
*/
public int getGachaType() {
return gachaType;
}
/**
* <code>optional uint32 gacha_type = 4;</code>
* @param value the gachaType to set
* @return this
*/
public GetGachaCeilingCsReq setGachaType(final int value) {
bitField0_ |= 0x00000001;
gachaType = value;
return this;
}
@Override
public GetGachaCeilingCsReq copyFrom(final GetGachaCeilingCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
gachaType = other.gachaType;
}
return this;
}
@Override
public GetGachaCeilingCsReq mergeFrom(final GetGachaCeilingCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasGachaType()) {
setGachaType(other.gachaType);
}
return this;
}
@Override
public GetGachaCeilingCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
gachaType = 0;
return this;
}
@Override
public GetGachaCeilingCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetGachaCeilingCsReq)) {
return false;
}
GetGachaCeilingCsReq other = (GetGachaCeilingCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasGachaType() || gachaType == other.gachaType);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 32);
output.writeUInt32NoTag(gachaType);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaType);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetGachaCeilingCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 32: {
// gachaType
gachaType = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.gachaType, gachaType);
}
output.endObject();
}
@Override
public GetGachaCeilingCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 802848732:
case -871474217: {
if (input.isAtField(FieldNames.gachaType)) {
if (!input.trySkipNullValue()) {
gachaType = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetGachaCeilingCsReq clone() {
return new GetGachaCeilingCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetGachaCeilingCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetGachaCeilingCsReq(), data).checkInitialized();
}
public static GetGachaCeilingCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingCsReq(), input).checkInitialized();
}
public static GetGachaCeilingCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingCsReq(), input).checkInitialized();
}
/**
* @return factory for creating GetGachaCeilingCsReq messages
*/
public static MessageFactory<GetGachaCeilingCsReq> getFactory() {
return GetGachaCeilingCsReqFactory.INSTANCE;
}
private enum GetGachaCeilingCsReqFactory implements MessageFactory<GetGachaCeilingCsReq> {
INSTANCE;
@Override
public GetGachaCeilingCsReq create() {
return GetGachaCeilingCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName gachaType = FieldName.forField("gachaType", "gacha_type");
}
}
}

View File

@@ -0,0 +1,442 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class GetGachaCeilingScRspOuterClass {
/**
* Protobuf type {@code GetGachaCeilingScRsp}
*/
public static final class GetGachaCeilingScRsp extends ProtoMessage<GetGachaCeilingScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 gacha_type = 14;</code>
*/
private int gachaType;
/**
* <code>optional uint32 retcode = 15;</code>
*/
private int retcode;
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
*/
private final GachaCeilingOuterClass.GachaCeiling gachaCeiling = GachaCeilingOuterClass.GachaCeiling.newInstance();
private GetGachaCeilingScRsp() {
}
/**
* @return a new empty instance of {@code GetGachaCeilingScRsp}
*/
public static GetGachaCeilingScRsp newInstance() {
return new GetGachaCeilingScRsp();
}
/**
* <code>optional uint32 gacha_type = 14;</code>
* @return whether the gachaType field is set
*/
public boolean hasGachaType() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 gacha_type = 14;</code>
* @return this
*/
public GetGachaCeilingScRsp clearGachaType() {
bitField0_ &= ~0x00000001;
gachaType = 0;
return this;
}
/**
* <code>optional uint32 gacha_type = 14;</code>
* @return the gachaType
*/
public int getGachaType() {
return gachaType;
}
/**
* <code>optional uint32 gacha_type = 14;</code>
* @param value the gachaType to set
* @return this
*/
public GetGachaCeilingScRsp setGachaType(final int value) {
bitField0_ |= 0x00000001;
gachaType = value;
return this;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return this
*/
public GetGachaCeilingScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 15;</code>
* @param value the retcode to set
* @return this
*/
public GetGachaCeilingScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
* @return whether the gachaCeiling field is set
*/
public boolean hasGachaCeiling() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
* @return this
*/
public GetGachaCeilingScRsp clearGachaCeiling() {
bitField0_ &= ~0x00000004;
gachaCeiling.clear();
return this;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableGachaCeiling()} if you want to modify it.
*
* @return internal storage object for reading
*/
public GachaCeilingOuterClass.GachaCeiling getGachaCeiling() {
return gachaCeiling;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public GachaCeilingOuterClass.GachaCeiling getMutableGachaCeiling() {
bitField0_ |= 0x00000004;
return gachaCeiling;
}
/**
* <code>optional .GachaCeiling gacha_ceiling = 6;</code>
* @param value the gachaCeiling to set
* @return this
*/
public GetGachaCeilingScRsp setGachaCeiling(final GachaCeilingOuterClass.GachaCeiling value) {
bitField0_ |= 0x00000004;
gachaCeiling.copyFrom(value);
return this;
}
@Override
public GetGachaCeilingScRsp copyFrom(final GetGachaCeilingScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
gachaType = other.gachaType;
retcode = other.retcode;
gachaCeiling.copyFrom(other.gachaCeiling);
}
return this;
}
@Override
public GetGachaCeilingScRsp mergeFrom(final GetGachaCeilingScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasGachaType()) {
setGachaType(other.gachaType);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasGachaCeiling()) {
getMutableGachaCeiling().mergeFrom(other.gachaCeiling);
}
return this;
}
@Override
public GetGachaCeilingScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
gachaType = 0;
retcode = 0;
gachaCeiling.clear();
return this;
}
@Override
public GetGachaCeilingScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
gachaCeiling.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetGachaCeilingScRsp)) {
return false;
}
GetGachaCeilingScRsp other = (GetGachaCeilingScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasGachaType() || gachaType == other.gachaType)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasGachaCeiling() || gachaCeiling.equals(other.gachaCeiling));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt32NoTag(gachaType);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 120);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 50);
output.writeMessageNoTag(gachaCeiling);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(gachaType);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(gachaCeiling);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetGachaCeilingScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 112: {
// gachaType
gachaType = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 120) {
break;
}
}
case 120: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 50) {
break;
}
}
case 50: {
// gachaCeiling
input.readMessage(gachaCeiling);
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.gachaType, gachaType);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeMessage(FieldNames.gachaCeiling, gachaCeiling);
}
output.endObject();
}
@Override
public GetGachaCeilingScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 802848732:
case -871474217: {
if (input.isAtField(FieldNames.gachaType)) {
if (!input.trySkipNullValue()) {
gachaType = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 507275483:
case -1792489728: {
if (input.isAtField(FieldNames.gachaCeiling)) {
if (!input.trySkipNullValue()) {
input.readMessage(gachaCeiling);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetGachaCeilingScRsp clone() {
return new GetGachaCeilingScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetGachaCeilingScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetGachaCeilingScRsp(), data).checkInitialized();
}
public static GetGachaCeilingScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingScRsp(), input).checkInitialized();
}
public static GetGachaCeilingScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetGachaCeilingScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetGachaCeilingScRsp messages
*/
public static MessageFactory<GetGachaCeilingScRsp> getFactory() {
return GetGachaCeilingScRspFactory.INSTANCE;
}
private enum GetGachaCeilingScRspFactory implements MessageFactory<GetGachaCeilingScRsp> {
INSTANCE;
@Override
public GetGachaCeilingScRsp create() {
return GetGachaCeilingScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName gachaType = FieldName.forField("gachaType", "gacha_type");
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName gachaCeiling = FieldName.forField("gachaCeiling", "gacha_ceiling");
}
}
}

View File

@@ -0,0 +1,174 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class GetJukeboxDataCsReqOuterClass {
/**
* Protobuf type {@code GetJukeboxDataCsReq}
*/
public static final class GetJukeboxDataCsReq extends ProtoMessage<GetJukeboxDataCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
private GetJukeboxDataCsReq() {
}
/**
* @return a new empty instance of {@code GetJukeboxDataCsReq}
*/
public static GetJukeboxDataCsReq newInstance() {
return new GetJukeboxDataCsReq();
}
@Override
public GetJukeboxDataCsReq copyFrom(final GetJukeboxDataCsReq other) {
cachedSize = other.cachedSize;
return this;
}
@Override
public GetJukeboxDataCsReq mergeFrom(final GetJukeboxDataCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetJukeboxDataCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetJukeboxDataCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetJukeboxDataCsReq)) {
return false;
}
GetJukeboxDataCsReq other = (GetJukeboxDataCsReq) o;
return true;
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
}
@Override
protected int computeSerializedSize() {
int size = 0;
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetJukeboxDataCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
output.endObject();
}
@Override
public GetJukeboxDataCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetJukeboxDataCsReq clone() {
return new GetJukeboxDataCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetJukeboxDataCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetJukeboxDataCsReq(), data).checkInitialized();
}
public static GetJukeboxDataCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetJukeboxDataCsReq(), input).checkInitialized();
}
public static GetJukeboxDataCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetJukeboxDataCsReq(), input).checkInitialized();
}
/**
* @return factory for creating GetJukeboxDataCsReq messages
*/
public static MessageFactory<GetJukeboxDataCsReq> getFactory() {
return GetJukeboxDataCsReqFactory.INSTANCE;
}
private enum GetJukeboxDataCsReqFactory implements MessageFactory<GetJukeboxDataCsReq> {
INSTANCE;
@Override
public GetJukeboxDataCsReq create() {
return GetJukeboxDataCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
}
}
}

View File

@@ -0,0 +1,861 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedMessage;
public final class GetJukeboxDataScRspOuterClass {
/**
* Protobuf type {@code GetJukeboxDataScRsp}
*/
public static final class GetJukeboxDataScRsp extends ProtoMessage<GetJukeboxDataScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 playing_id = 3;</code>
*/
private int playingId;
/**
* <code>optional uint32 retcode = 14;</code>
*/
private int retcode;
/**
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
*/
private final RepeatedMessage<UnlockedMusic> musicList = RepeatedMessage.newEmptyInstance(UnlockedMusic.getFactory());
private GetJukeboxDataScRsp() {
}
/**
* @return a new empty instance of {@code GetJukeboxDataScRsp}
*/
public static GetJukeboxDataScRsp newInstance() {
return new GetJukeboxDataScRsp();
}
/**
* <code>optional uint32 playing_id = 3;</code>
* @return whether the playingId field is set
*/
public boolean hasPlayingId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 playing_id = 3;</code>
* @return this
*/
public GetJukeboxDataScRsp clearPlayingId() {
bitField0_ &= ~0x00000001;
playingId = 0;
return this;
}
/**
* <code>optional uint32 playing_id = 3;</code>
* @return the playingId
*/
public int getPlayingId() {
return playingId;
}
/**
* <code>optional uint32 playing_id = 3;</code>
* @param value the playingId to set
* @return this
*/
public GetJukeboxDataScRsp setPlayingId(final int value) {
bitField0_ |= 0x00000001;
playingId = value;
return this;
}
/**
* <code>optional uint32 retcode = 14;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 14;</code>
* @return this
*/
public GetJukeboxDataScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 14;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 14;</code>
* @param value the retcode to set
* @return this
*/
public GetJukeboxDataScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
/**
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
* @return whether the musicList field is set
*/
public boolean hasMusicList() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
* @return this
*/
public GetJukeboxDataScRsp clearMusicList() {
bitField0_ &= ~0x00000004;
musicList.clear();
return this;
}
/**
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableMusicList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<UnlockedMusic> getMusicList() {
return musicList;
}
/**
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<UnlockedMusic> getMutableMusicList() {
bitField0_ |= 0x00000004;
return musicList;
}
/**
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
* @param value the musicList to add
* @return this
*/
public GetJukeboxDataScRsp addMusicList(final UnlockedMusic value) {
bitField0_ |= 0x00000004;
musicList.add(value);
return this;
}
/**
* <code>repeated .GetJukeboxDataScRsp.UnlockedMusic music_list = 7;</code>
* @param values the musicList to add
* @return this
*/
public GetJukeboxDataScRsp addAllMusicList(final UnlockedMusic... values) {
bitField0_ |= 0x00000004;
musicList.addAll(values);
return this;
}
@Override
public GetJukeboxDataScRsp copyFrom(final GetJukeboxDataScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
playingId = other.playingId;
retcode = other.retcode;
musicList.copyFrom(other.musicList);
}
return this;
}
@Override
public GetJukeboxDataScRsp mergeFrom(final GetJukeboxDataScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasPlayingId()) {
setPlayingId(other.playingId);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasMusicList()) {
getMutableMusicList().addAll(other.musicList);
}
return this;
}
@Override
public GetJukeboxDataScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
playingId = 0;
retcode = 0;
musicList.clear();
return this;
}
@Override
public GetJukeboxDataScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
musicList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetJukeboxDataScRsp)) {
return false;
}
GetJukeboxDataScRsp other = (GetJukeboxDataScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasPlayingId() || playingId == other.playingId)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasMusicList() || musicList.equals(other.musicList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(playingId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 112);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < musicList.length(); i++) {
output.writeRawByte((byte) 58);
output.writeMessageNoTag(musicList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(playingId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * musicList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(musicList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetJukeboxDataScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 24: {
// playingId
playingId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 112) {
break;
}
}
case 112: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 58) {
break;
}
}
case 58: {
// musicList
tag = input.readRepeatedMessage(musicList, tag);
bitField0_ |= 0x00000004;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.playingId, playingId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedMessage(FieldNames.musicList, musicList);
}
output.endObject();
}
@Override
public GetJukeboxDataScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -1868462615:
case -2087744820: {
if (input.isAtField(FieldNames.playingId)) {
if (!input.trySkipNullValue()) {
playingId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 389904483:
case -780236168: {
if (input.isAtField(FieldNames.musicList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(musicList);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetJukeboxDataScRsp clone() {
return new GetJukeboxDataScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetJukeboxDataScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetJukeboxDataScRsp(), data).checkInitialized();
}
public static GetJukeboxDataScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetJukeboxDataScRsp(), input).checkInitialized();
}
public static GetJukeboxDataScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetJukeboxDataScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetJukeboxDataScRsp messages
*/
public static MessageFactory<GetJukeboxDataScRsp> getFactory() {
return GetJukeboxDataScRspFactory.INSTANCE;
}
/**
* Protobuf type {@code UnlockedMusic}
*/
public static final class UnlockedMusic extends ProtoMessage<UnlockedMusic> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 group_id = 1;</code>
*/
private int groupId;
/**
* <code>optional uint32 id = 8;</code>
*/
private int id;
/**
* <code>optional bool unkbool = 7;</code>
*/
private boolean unkbool;
private UnlockedMusic() {
}
/**
* @return a new empty instance of {@code UnlockedMusic}
*/
public static UnlockedMusic newInstance() {
return new UnlockedMusic();
}
/**
* <code>optional uint32 group_id = 1;</code>
* @return whether the groupId field is set
*/
public boolean hasGroupId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 group_id = 1;</code>
* @return this
*/
public UnlockedMusic clearGroupId() {
bitField0_ &= ~0x00000001;
groupId = 0;
return this;
}
/**
* <code>optional uint32 group_id = 1;</code>
* @return the groupId
*/
public int getGroupId() {
return groupId;
}
/**
* <code>optional uint32 group_id = 1;</code>
* @param value the groupId to set
* @return this
*/
public UnlockedMusic setGroupId(final int value) {
bitField0_ |= 0x00000001;
groupId = value;
return this;
}
/**
* <code>optional uint32 id = 8;</code>
* @return whether the id field is set
*/
public boolean hasId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 id = 8;</code>
* @return this
*/
public UnlockedMusic clearId() {
bitField0_ &= ~0x00000002;
id = 0;
return this;
}
/**
* <code>optional uint32 id = 8;</code>
* @return the id
*/
public int getId() {
return id;
}
/**
* <code>optional uint32 id = 8;</code>
* @param value the id to set
* @return this
*/
public UnlockedMusic setId(final int value) {
bitField0_ |= 0x00000002;
id = value;
return this;
}
/**
* <code>optional bool unkbool = 7;</code>
* @return whether the unkbool field is set
*/
public boolean hasUnkbool() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional bool unkbool = 7;</code>
* @return this
*/
public UnlockedMusic clearUnkbool() {
bitField0_ &= ~0x00000004;
unkbool = false;
return this;
}
/**
* <code>optional bool unkbool = 7;</code>
* @return the unkbool
*/
public boolean getUnkbool() {
return unkbool;
}
/**
* <code>optional bool unkbool = 7;</code>
* @param value the unkbool to set
* @return this
*/
public UnlockedMusic setUnkbool(final boolean value) {
bitField0_ |= 0x00000004;
unkbool = value;
return this;
}
@Override
public UnlockedMusic copyFrom(final UnlockedMusic other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
groupId = other.groupId;
id = other.id;
unkbool = other.unkbool;
}
return this;
}
@Override
public UnlockedMusic mergeFrom(final UnlockedMusic other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasGroupId()) {
setGroupId(other.groupId);
}
if (other.hasId()) {
setId(other.id);
}
if (other.hasUnkbool()) {
setUnkbool(other.unkbool);
}
return this;
}
@Override
public UnlockedMusic clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
groupId = 0;
id = 0;
unkbool = false;
return this;
}
@Override
public UnlockedMusic clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof UnlockedMusic)) {
return false;
}
UnlockedMusic other = (UnlockedMusic) o;
return bitField0_ == other.bitField0_
&& (!hasGroupId() || groupId == other.groupId)
&& (!hasId() || id == other.id)
&& (!hasUnkbool() || unkbool == other.unkbool);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(groupId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(id);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 56);
output.writeBoolNoTag(unkbool);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 2;
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public UnlockedMusic mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 8: {
// groupId
groupId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 64) {
break;
}
}
case 64: {
// id
id = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 56) {
break;
}
}
case 56: {
// unkbool
unkbool = input.readBool();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.groupId, groupId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.id, id);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeBool(FieldNames.unkbool, unkbool);
}
output.endObject();
}
@Override
public UnlockedMusic mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 293428218:
case 506361563: {
if (input.isAtField(FieldNames.groupId)) {
if (!input.trySkipNullValue()) {
groupId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 3355: {
if (input.isAtField(FieldNames.id)) {
if (!input.trySkipNullValue()) {
id = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -285198628: {
if (input.isAtField(FieldNames.unkbool)) {
if (!input.trySkipNullValue()) {
unkbool = input.readBool();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public UnlockedMusic clone() {
return new UnlockedMusic().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static UnlockedMusic parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new UnlockedMusic(), data).checkInitialized();
}
public static UnlockedMusic parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
}
public static UnlockedMusic parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
}
/**
* @return factory for creating UnlockedMusic messages
*/
public static MessageFactory<UnlockedMusic> getFactory() {
return UnlockedMusicFactory.INSTANCE;
}
private enum UnlockedMusicFactory implements MessageFactory<UnlockedMusic> {
INSTANCE;
@Override
public UnlockedMusic create() {
return UnlockedMusic.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName groupId = FieldName.forField("groupId", "group_id");
static final FieldName id = FieldName.forField("id");
static final FieldName unkbool = FieldName.forField("unkbool");
}
}
private enum GetJukeboxDataScRspFactory implements MessageFactory<GetJukeboxDataScRsp> {
INSTANCE;
@Override
public GetJukeboxDataScRsp create() {
return GetJukeboxDataScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName playingId = FieldName.forField("playingId", "playing_id");
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName musicList = FieldName.forField("musicList", "music_list");
}
}
}

View File

@@ -0,0 +1,303 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
public final class GetMainMissionCustomValueCsReqOuterClass {
/**
* Protobuf type {@code GetMainMissionCustomValueCsReq}
*/
public static final class GetMainMissionCustomValueCsReq extends ProtoMessage<GetMainMissionCustomValueCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>repeated uint32 main_mission_id_list = 13;</code>
*/
private final RepeatedInt mainMissionIdList = RepeatedInt.newEmptyInstance();
private GetMainMissionCustomValueCsReq() {
}
/**
* @return a new empty instance of {@code GetMainMissionCustomValueCsReq}
*/
public static GetMainMissionCustomValueCsReq newInstance() {
return new GetMainMissionCustomValueCsReq();
}
/**
* <code>repeated uint32 main_mission_id_list = 13;</code>
* @return whether the mainMissionIdList field is set
*/
public boolean hasMainMissionIdList() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>repeated uint32 main_mission_id_list = 13;</code>
* @return this
*/
public GetMainMissionCustomValueCsReq clearMainMissionIdList() {
bitField0_ &= ~0x00000001;
mainMissionIdList.clear();
return this;
}
/**
* <code>repeated uint32 main_mission_id_list = 13;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableMainMissionIdList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getMainMissionIdList() {
return mainMissionIdList;
}
/**
* <code>repeated uint32 main_mission_id_list = 13;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableMainMissionIdList() {
bitField0_ |= 0x00000001;
return mainMissionIdList;
}
/**
* <code>repeated uint32 main_mission_id_list = 13;</code>
* @param value the mainMissionIdList to add
* @return this
*/
public GetMainMissionCustomValueCsReq addMainMissionIdList(final int value) {
bitField0_ |= 0x00000001;
mainMissionIdList.add(value);
return this;
}
/**
* <code>repeated uint32 main_mission_id_list = 13;</code>
* @param values the mainMissionIdList to add
* @return this
*/
public GetMainMissionCustomValueCsReq addAllMainMissionIdList(final int... values) {
bitField0_ |= 0x00000001;
mainMissionIdList.addAll(values);
return this;
}
@Override
public GetMainMissionCustomValueCsReq copyFrom(final GetMainMissionCustomValueCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
mainMissionIdList.copyFrom(other.mainMissionIdList);
}
return this;
}
@Override
public GetMainMissionCustomValueCsReq mergeFrom(final GetMainMissionCustomValueCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasMainMissionIdList()) {
getMutableMainMissionIdList().addAll(other.mainMissionIdList);
}
return this;
}
@Override
public GetMainMissionCustomValueCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
mainMissionIdList.clear();
return this;
}
@Override
public GetMainMissionCustomValueCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
mainMissionIdList.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetMainMissionCustomValueCsReq)) {
return false;
}
GetMainMissionCustomValueCsReq other = (GetMainMissionCustomValueCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasMainMissionIdList() || mainMissionIdList.equals(other.mainMissionIdList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
for (int i = 0; i < mainMissionIdList.length(); i++) {
output.writeRawByte((byte) 104);
output.writeUInt32NoTag(mainMissionIdList.array()[i]);
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += (1 * mainMissionIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(mainMissionIdList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetMainMissionCustomValueCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 106: {
// mainMissionIdList [packed=true]
input.readPackedUInt32(mainMissionIdList, tag);
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 104: {
// mainMissionIdList [packed=false]
tag = input.readRepeatedUInt32(mainMissionIdList, tag);
bitField0_ |= 0x00000001;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeRepeatedUInt32(FieldNames.mainMissionIdList, mainMissionIdList);
}
output.endObject();
}
@Override
public GetMainMissionCustomValueCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1438400460:
case -1382679799: {
if (input.isAtField(FieldNames.mainMissionIdList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(mainMissionIdList);
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetMainMissionCustomValueCsReq clone() {
return new GetMainMissionCustomValueCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetMainMissionCustomValueCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetMainMissionCustomValueCsReq(), data).checkInitialized();
}
public static GetMainMissionCustomValueCsReq parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new GetMainMissionCustomValueCsReq(), input).checkInitialized();
}
public static GetMainMissionCustomValueCsReq parseFrom(final JsonSource input) throws
IOException {
return ProtoMessage.mergeFrom(new GetMainMissionCustomValueCsReq(), input).checkInitialized();
}
/**
* @return factory for creating GetMainMissionCustomValueCsReq messages
*/
public static MessageFactory<GetMainMissionCustomValueCsReq> getFactory() {
return GetMainMissionCustomValueCsReqFactory.INSTANCE;
}
private enum GetMainMissionCustomValueCsReqFactory implements MessageFactory<GetMainMissionCustomValueCsReq> {
INSTANCE;
@Override
public GetMainMissionCustomValueCsReq create() {
return GetMainMissionCustomValueCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName mainMissionIdList = FieldName.forField("mainMissionIdList", "main_mission_id_list");
}
}
}

View File

@@ -0,0 +1,378 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedMessage;
public final class GetMainMissionCustomValueScRspOuterClass {
/**
* Protobuf type {@code GetMainMissionCustomValueScRsp}
*/
public static final class GetMainMissionCustomValueScRsp extends ProtoMessage<GetMainMissionCustomValueScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 retcode = 2;</code>
*/
private int retcode;
/**
* <code>repeated .MainMission main_mission_list = 5;</code>
*/
private final RepeatedMessage<MainMissionOuterClass.MainMission> mainMissionList = RepeatedMessage.newEmptyInstance(MainMissionOuterClass.MainMission.getFactory());
private GetMainMissionCustomValueScRsp() {
}
/**
* @return a new empty instance of {@code GetMainMissionCustomValueScRsp}
*/
public static GetMainMissionCustomValueScRsp newInstance() {
return new GetMainMissionCustomValueScRsp();
}
/**
* <code>optional uint32 retcode = 2;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 retcode = 2;</code>
* @return this
*/
public GetMainMissionCustomValueScRsp clearRetcode() {
bitField0_ &= ~0x00000001;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 2;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 2;</code>
* @param value the retcode to set
* @return this
*/
public GetMainMissionCustomValueScRsp setRetcode(final int value) {
bitField0_ |= 0x00000001;
retcode = value;
return this;
}
/**
* <code>repeated .MainMission main_mission_list = 5;</code>
* @return whether the mainMissionList field is set
*/
public boolean hasMainMissionList() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>repeated .MainMission main_mission_list = 5;</code>
* @return this
*/
public GetMainMissionCustomValueScRsp clearMainMissionList() {
bitField0_ &= ~0x00000002;
mainMissionList.clear();
return this;
}
/**
* <code>repeated .MainMission main_mission_list = 5;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableMainMissionList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<MainMissionOuterClass.MainMission> getMainMissionList() {
return mainMissionList;
}
/**
* <code>repeated .MainMission main_mission_list = 5;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<MainMissionOuterClass.MainMission> getMutableMainMissionList() {
bitField0_ |= 0x00000002;
return mainMissionList;
}
/**
* <code>repeated .MainMission main_mission_list = 5;</code>
* @param value the mainMissionList to add
* @return this
*/
public GetMainMissionCustomValueScRsp addMainMissionList(
final MainMissionOuterClass.MainMission value) {
bitField0_ |= 0x00000002;
mainMissionList.add(value);
return this;
}
/**
* <code>repeated .MainMission main_mission_list = 5;</code>
* @param values the mainMissionList to add
* @return this
*/
public GetMainMissionCustomValueScRsp addAllMainMissionList(
final MainMissionOuterClass.MainMission... values) {
bitField0_ |= 0x00000002;
mainMissionList.addAll(values);
return this;
}
@Override
public GetMainMissionCustomValueScRsp copyFrom(final GetMainMissionCustomValueScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
retcode = other.retcode;
mainMissionList.copyFrom(other.mainMissionList);
}
return this;
}
@Override
public GetMainMissionCustomValueScRsp mergeFrom(final GetMainMissionCustomValueScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasMainMissionList()) {
getMutableMainMissionList().addAll(other.mainMissionList);
}
return this;
}
@Override
public GetMainMissionCustomValueScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
retcode = 0;
mainMissionList.clear();
return this;
}
@Override
public GetMainMissionCustomValueScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
mainMissionList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetMainMissionCustomValueScRsp)) {
return false;
}
GetMainMissionCustomValueScRsp other = (GetMainMissionCustomValueScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasMainMissionList() || mainMissionList.equals(other.mainMissionList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 16);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
for (int i = 0; i < mainMissionList.length(); i++) {
output.writeRawByte((byte) 42);
output.writeMessageNoTag(mainMissionList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
size += (1 * mainMissionList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(mainMissionList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetMainMissionCustomValueScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 16: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 42) {
break;
}
}
case 42: {
// mainMissionList
tag = input.readRepeatedMessage(mainMissionList, tag);
bitField0_ |= 0x00000002;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRepeatedMessage(FieldNames.mainMissionList, mainMissionList);
}
output.endObject();
}
@Override
public GetMainMissionCustomValueScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1352596271:
case 939604023: {
if (input.isAtField(FieldNames.mainMissionList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(mainMissionList);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetMainMissionCustomValueScRsp clone() {
return new GetMainMissionCustomValueScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetMainMissionCustomValueScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetMainMissionCustomValueScRsp(), data).checkInitialized();
}
public static GetMainMissionCustomValueScRsp parseFrom(final ProtoSource input) throws
IOException {
return ProtoMessage.mergeFrom(new GetMainMissionCustomValueScRsp(), input).checkInitialized();
}
public static GetMainMissionCustomValueScRsp parseFrom(final JsonSource input) throws
IOException {
return ProtoMessage.mergeFrom(new GetMainMissionCustomValueScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetMainMissionCustomValueScRsp messages
*/
public static MessageFactory<GetMainMissionCustomValueScRsp> getFactory() {
return GetMainMissionCustomValueScRspFactory.INSTANCE;
}
private enum GetMainMissionCustomValueScRspFactory implements MessageFactory<GetMainMissionCustomValueScRsp> {
INSTANCE;
@Override
public GetMainMissionCustomValueScRsp create() {
return GetMainMissionCustomValueScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName mainMissionList = FieldName.forField("mainMissionList", "main_mission_list");
}
}
}

View File

@@ -0,0 +1,174 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class GetPhoneDataCsReqOuterClass {
/**
* Protobuf type {@code GetPhoneDataCsReq}
*/
public static final class GetPhoneDataCsReq extends ProtoMessage<GetPhoneDataCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
private GetPhoneDataCsReq() {
}
/**
* @return a new empty instance of {@code GetPhoneDataCsReq}
*/
public static GetPhoneDataCsReq newInstance() {
return new GetPhoneDataCsReq();
}
@Override
public GetPhoneDataCsReq copyFrom(final GetPhoneDataCsReq other) {
cachedSize = other.cachedSize;
return this;
}
@Override
public GetPhoneDataCsReq mergeFrom(final GetPhoneDataCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetPhoneDataCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetPhoneDataCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetPhoneDataCsReq)) {
return false;
}
GetPhoneDataCsReq other = (GetPhoneDataCsReq) o;
return true;
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
}
@Override
protected int computeSerializedSize() {
int size = 0;
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetPhoneDataCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
output.endObject();
}
@Override
public GetPhoneDataCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetPhoneDataCsReq clone() {
return new GetPhoneDataCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetPhoneDataCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetPhoneDataCsReq(), data).checkInitialized();
}
public static GetPhoneDataCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetPhoneDataCsReq(), input).checkInitialized();
}
public static GetPhoneDataCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetPhoneDataCsReq(), input).checkInitialized();
}
/**
* @return factory for creating GetPhoneDataCsReq messages
*/
public static MessageFactory<GetPhoneDataCsReq> getFactory() {
return GetPhoneDataCsReqFactory.INSTANCE;
}
private enum GetPhoneDataCsReqFactory implements MessageFactory<GetPhoneDataCsReq> {
INSTANCE;
@Override
public GetPhoneDataCsReq create() {
return GetPhoneDataCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
}
}
}

View File

@@ -0,0 +1,664 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
public final class GetPhoneDataScRspOuterClass {
/**
* Protobuf type {@code GetPhoneDataScRsp}
*/
public static final class GetPhoneDataScRsp extends ProtoMessage<GetPhoneDataScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 cur_chat_bubble = 2;</code>
*/
private int curChatBubble;
/**
* <code>optional uint32 cur_phone_theme = 3;</code>
*/
private int curPhoneTheme;
/**
* <code>optional uint32 retcode = 9;</code>
*/
private int retcode;
/**
* <code>repeated uint32 owned_chat_bubbles = 10;</code>
*/
private final RepeatedInt ownedChatBubbles = RepeatedInt.newEmptyInstance();
/**
* <code>repeated uint32 owned_phone_themes = 13;</code>
*/
private final RepeatedInt ownedPhoneThemes = RepeatedInt.newEmptyInstance();
private GetPhoneDataScRsp() {
}
/**
* @return a new empty instance of {@code GetPhoneDataScRsp}
*/
public static GetPhoneDataScRsp newInstance() {
return new GetPhoneDataScRsp();
}
/**
* <code>optional uint32 cur_chat_bubble = 2;</code>
* @return whether the curChatBubble field is set
*/
public boolean hasCurChatBubble() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 cur_chat_bubble = 2;</code>
* @return this
*/
public GetPhoneDataScRsp clearCurChatBubble() {
bitField0_ &= ~0x00000001;
curChatBubble = 0;
return this;
}
/**
* <code>optional uint32 cur_chat_bubble = 2;</code>
* @return the curChatBubble
*/
public int getCurChatBubble() {
return curChatBubble;
}
/**
* <code>optional uint32 cur_chat_bubble = 2;</code>
* @param value the curChatBubble to set
* @return this
*/
public GetPhoneDataScRsp setCurChatBubble(final int value) {
bitField0_ |= 0x00000001;
curChatBubble = value;
return this;
}
/**
* <code>optional uint32 cur_phone_theme = 3;</code>
* @return whether the curPhoneTheme field is set
*/
public boolean hasCurPhoneTheme() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 cur_phone_theme = 3;</code>
* @return this
*/
public GetPhoneDataScRsp clearCurPhoneTheme() {
bitField0_ &= ~0x00000002;
curPhoneTheme = 0;
return this;
}
/**
* <code>optional uint32 cur_phone_theme = 3;</code>
* @return the curPhoneTheme
*/
public int getCurPhoneTheme() {
return curPhoneTheme;
}
/**
* <code>optional uint32 cur_phone_theme = 3;</code>
* @param value the curPhoneTheme to set
* @return this
*/
public GetPhoneDataScRsp setCurPhoneTheme(final int value) {
bitField0_ |= 0x00000002;
curPhoneTheme = value;
return this;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @return this
*/
public GetPhoneDataScRsp clearRetcode() {
bitField0_ &= ~0x00000004;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 9;</code>
* @param value the retcode to set
* @return this
*/
public GetPhoneDataScRsp setRetcode(final int value) {
bitField0_ |= 0x00000004;
retcode = value;
return this;
}
/**
* <code>repeated uint32 owned_chat_bubbles = 10;</code>
* @return whether the ownedChatBubbles field is set
*/
public boolean hasOwnedChatBubbles() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>repeated uint32 owned_chat_bubbles = 10;</code>
* @return this
*/
public GetPhoneDataScRsp clearOwnedChatBubbles() {
bitField0_ &= ~0x00000008;
ownedChatBubbles.clear();
return this;
}
/**
* <code>repeated uint32 owned_chat_bubbles = 10;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableOwnedChatBubbles()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getOwnedChatBubbles() {
return ownedChatBubbles;
}
/**
* <code>repeated uint32 owned_chat_bubbles = 10;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableOwnedChatBubbles() {
bitField0_ |= 0x00000008;
return ownedChatBubbles;
}
/**
* <code>repeated uint32 owned_chat_bubbles = 10;</code>
* @param value the ownedChatBubbles to add
* @return this
*/
public GetPhoneDataScRsp addOwnedChatBubbles(final int value) {
bitField0_ |= 0x00000008;
ownedChatBubbles.add(value);
return this;
}
/**
* <code>repeated uint32 owned_chat_bubbles = 10;</code>
* @param values the ownedChatBubbles to add
* @return this
*/
public GetPhoneDataScRsp addAllOwnedChatBubbles(final int... values) {
bitField0_ |= 0x00000008;
ownedChatBubbles.addAll(values);
return this;
}
/**
* <code>repeated uint32 owned_phone_themes = 13;</code>
* @return whether the ownedPhoneThemes field is set
*/
public boolean hasOwnedPhoneThemes() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>repeated uint32 owned_phone_themes = 13;</code>
* @return this
*/
public GetPhoneDataScRsp clearOwnedPhoneThemes() {
bitField0_ &= ~0x00000010;
ownedPhoneThemes.clear();
return this;
}
/**
* <code>repeated uint32 owned_phone_themes = 13;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableOwnedPhoneThemes()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getOwnedPhoneThemes() {
return ownedPhoneThemes;
}
/**
* <code>repeated uint32 owned_phone_themes = 13;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableOwnedPhoneThemes() {
bitField0_ |= 0x00000010;
return ownedPhoneThemes;
}
/**
* <code>repeated uint32 owned_phone_themes = 13;</code>
* @param value the ownedPhoneThemes to add
* @return this
*/
public GetPhoneDataScRsp addOwnedPhoneThemes(final int value) {
bitField0_ |= 0x00000010;
ownedPhoneThemes.add(value);
return this;
}
/**
* <code>repeated uint32 owned_phone_themes = 13;</code>
* @param values the ownedPhoneThemes to add
* @return this
*/
public GetPhoneDataScRsp addAllOwnedPhoneThemes(final int... values) {
bitField0_ |= 0x00000010;
ownedPhoneThemes.addAll(values);
return this;
}
@Override
public GetPhoneDataScRsp copyFrom(final GetPhoneDataScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
curChatBubble = other.curChatBubble;
curPhoneTheme = other.curPhoneTheme;
retcode = other.retcode;
ownedChatBubbles.copyFrom(other.ownedChatBubbles);
ownedPhoneThemes.copyFrom(other.ownedPhoneThemes);
}
return this;
}
@Override
public GetPhoneDataScRsp mergeFrom(final GetPhoneDataScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasCurChatBubble()) {
setCurChatBubble(other.curChatBubble);
}
if (other.hasCurPhoneTheme()) {
setCurPhoneTheme(other.curPhoneTheme);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasOwnedChatBubbles()) {
getMutableOwnedChatBubbles().addAll(other.ownedChatBubbles);
}
if (other.hasOwnedPhoneThemes()) {
getMutableOwnedPhoneThemes().addAll(other.ownedPhoneThemes);
}
return this;
}
@Override
public GetPhoneDataScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
curChatBubble = 0;
curPhoneTheme = 0;
retcode = 0;
ownedChatBubbles.clear();
ownedPhoneThemes.clear();
return this;
}
@Override
public GetPhoneDataScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
ownedChatBubbles.clear();
ownedPhoneThemes.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetPhoneDataScRsp)) {
return false;
}
GetPhoneDataScRsp other = (GetPhoneDataScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasCurChatBubble() || curChatBubble == other.curChatBubble)
&& (!hasCurPhoneTheme() || curPhoneTheme == other.curPhoneTheme)
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasOwnedChatBubbles() || ownedChatBubbles.equals(other.ownedChatBubbles))
&& (!hasOwnedPhoneThemes() || ownedPhoneThemes.equals(other.ownedPhoneThemes));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 16);
output.writeUInt32NoTag(curChatBubble);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(curPhoneTheme);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 72);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000008) != 0) {
for (int i = 0; i < ownedChatBubbles.length(); i++) {
output.writeRawByte((byte) 80);
output.writeUInt32NoTag(ownedChatBubbles.array()[i]);
}
}
if ((bitField0_ & 0x00000010) != 0) {
for (int i = 0; i < ownedPhoneThemes.length(); i++) {
output.writeRawByte((byte) 104);
output.writeUInt32NoTag(ownedPhoneThemes.array()[i]);
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(curChatBubble);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(curPhoneTheme);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000008) != 0) {
size += (1 * ownedChatBubbles.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ownedChatBubbles);
}
if ((bitField0_ & 0x00000010) != 0) {
size += (1 * ownedPhoneThemes.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(ownedPhoneThemes);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetPhoneDataScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 16: {
// curChatBubble
curChatBubble = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 24) {
break;
}
}
case 24: {
// curPhoneTheme
curPhoneTheme = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 72) {
break;
}
}
case 72: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 82) {
break;
}
}
case 82: {
// ownedChatBubbles [packed=true]
input.readPackedUInt32(ownedChatBubbles, tag);
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 106) {
break;
}
}
case 106: {
// ownedPhoneThemes [packed=true]
input.readPackedUInt32(ownedPhoneThemes, tag);
bitField0_ |= 0x00000010;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 80: {
// ownedChatBubbles [packed=false]
tag = input.readRepeatedUInt32(ownedChatBubbles, tag);
bitField0_ |= 0x00000008;
break;
}
case 104: {
// ownedPhoneThemes [packed=false]
tag = input.readRepeatedUInt32(ownedPhoneThemes, tag);
bitField0_ |= 0x00000010;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.curChatBubble, curChatBubble);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.curPhoneTheme, curPhoneTheme);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRepeatedUInt32(FieldNames.ownedChatBubbles, ownedChatBubbles);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRepeatedUInt32(FieldNames.ownedPhoneThemes, ownedPhoneThemes);
}
output.endObject();
}
@Override
public GetPhoneDataScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 94167140:
case 1828957140: {
if (input.isAtField(FieldNames.curChatBubble)) {
if (!input.trySkipNullValue()) {
curChatBubble = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 405670747:
case -514634695: {
if (input.isAtField(FieldNames.curPhoneTheme)) {
if (!input.trySkipNullValue()) {
curPhoneTheme = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -1579353334:
case -1491735846: {
if (input.isAtField(FieldNames.ownedChatBubbles)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(ownedChatBubbles);
bitField0_ |= 0x00000008;
}
} else {
input.skipUnknownField();
}
break;
}
case -512676109:
case -1128638699: {
if (input.isAtField(FieldNames.ownedPhoneThemes)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(ownedPhoneThemes);
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetPhoneDataScRsp clone() {
return new GetPhoneDataScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetPhoneDataScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetPhoneDataScRsp(), data).checkInitialized();
}
public static GetPhoneDataScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetPhoneDataScRsp(), input).checkInitialized();
}
public static GetPhoneDataScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetPhoneDataScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetPhoneDataScRsp messages
*/
public static MessageFactory<GetPhoneDataScRsp> getFactory() {
return GetPhoneDataScRspFactory.INSTANCE;
}
private enum GetPhoneDataScRspFactory implements MessageFactory<GetPhoneDataScRsp> {
INSTANCE;
@Override
public GetPhoneDataScRsp create() {
return GetPhoneDataScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName curChatBubble = FieldName.forField("curChatBubble", "cur_chat_bubble");
static final FieldName curPhoneTheme = FieldName.forField("curPhoneTheme", "cur_phone_theme");
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName ownedChatBubbles = FieldName.forField("ownedChatBubbles", "owned_chat_bubbles");
static final FieldName ownedPhoneThemes = FieldName.forField("ownedPhoneThemes", "owned_phone_themes");
}
}
}

View File

@@ -0,0 +1,174 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class GetQuestDataCsReqOuterClass {
/**
* Protobuf type {@code GetQuestDataCsReq}
*/
public static final class GetQuestDataCsReq extends ProtoMessage<GetQuestDataCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
private GetQuestDataCsReq() {
}
/**
* @return a new empty instance of {@code GetQuestDataCsReq}
*/
public static GetQuestDataCsReq newInstance() {
return new GetQuestDataCsReq();
}
@Override
public GetQuestDataCsReq copyFrom(final GetQuestDataCsReq other) {
cachedSize = other.cachedSize;
return this;
}
@Override
public GetQuestDataCsReq mergeFrom(final GetQuestDataCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetQuestDataCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public GetQuestDataCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetQuestDataCsReq)) {
return false;
}
GetQuestDataCsReq other = (GetQuestDataCsReq) o;
return true;
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
}
@Override
protected int computeSerializedSize() {
int size = 0;
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetQuestDataCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
output.endObject();
}
@Override
public GetQuestDataCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetQuestDataCsReq clone() {
return new GetQuestDataCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetQuestDataCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetQuestDataCsReq(), data).checkInitialized();
}
public static GetQuestDataCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetQuestDataCsReq(), input).checkInitialized();
}
public static GetQuestDataCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetQuestDataCsReq(), input).checkInitialized();
}
/**
* @return factory for creating GetQuestDataCsReq messages
*/
public static MessageFactory<GetQuestDataCsReq> getFactory() {
return GetQuestDataCsReqFactory.INSTANCE;
}
private enum GetQuestDataCsReqFactory implements MessageFactory<GetQuestDataCsReq> {
INSTANCE;
@Override
public GetQuestDataCsReq create() {
return GetQuestDataCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
}
}
}

View File

@@ -0,0 +1,455 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedMessage;
public final class GetQuestDataScRspOuterClass {
/**
* Protobuf type {@code GetQuestDataScRsp}
*/
public static final class GetQuestDataScRsp extends ProtoMessage<GetQuestDataScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 retcode = 7;</code>
*/
private int retcode;
/**
* <code>optional uint32 total_achievement_exp = 11;</code>
*/
private int totalAchievementExp;
/**
* <code>repeated .Quest quest_list = 9;</code>
*/
private final RepeatedMessage<QuestOuterClass.Quest> questList = RepeatedMessage.newEmptyInstance(QuestOuterClass.Quest.getFactory());
private GetQuestDataScRsp() {
}
/**
* @return a new empty instance of {@code GetQuestDataScRsp}
*/
public static GetQuestDataScRsp newInstance() {
return new GetQuestDataScRsp();
}
/**
* <code>optional uint32 retcode = 7;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 retcode = 7;</code>
* @return this
*/
public GetQuestDataScRsp clearRetcode() {
bitField0_ &= ~0x00000001;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 7;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 7;</code>
* @param value the retcode to set
* @return this
*/
public GetQuestDataScRsp setRetcode(final int value) {
bitField0_ |= 0x00000001;
retcode = value;
return this;
}
/**
* <code>optional uint32 total_achievement_exp = 11;</code>
* @return whether the totalAchievementExp field is set
*/
public boolean hasTotalAchievementExp() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 total_achievement_exp = 11;</code>
* @return this
*/
public GetQuestDataScRsp clearTotalAchievementExp() {
bitField0_ &= ~0x00000002;
totalAchievementExp = 0;
return this;
}
/**
* <code>optional uint32 total_achievement_exp = 11;</code>
* @return the totalAchievementExp
*/
public int getTotalAchievementExp() {
return totalAchievementExp;
}
/**
* <code>optional uint32 total_achievement_exp = 11;</code>
* @param value the totalAchievementExp to set
* @return this
*/
public GetQuestDataScRsp setTotalAchievementExp(final int value) {
bitField0_ |= 0x00000002;
totalAchievementExp = value;
return this;
}
/**
* <code>repeated .Quest quest_list = 9;</code>
* @return whether the questList field is set
*/
public boolean hasQuestList() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>repeated .Quest quest_list = 9;</code>
* @return this
*/
public GetQuestDataScRsp clearQuestList() {
bitField0_ &= ~0x00000004;
questList.clear();
return this;
}
/**
* <code>repeated .Quest quest_list = 9;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableQuestList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<QuestOuterClass.Quest> getQuestList() {
return questList;
}
/**
* <code>repeated .Quest quest_list = 9;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<QuestOuterClass.Quest> getMutableQuestList() {
bitField0_ |= 0x00000004;
return questList;
}
/**
* <code>repeated .Quest quest_list = 9;</code>
* @param value the questList to add
* @return this
*/
public GetQuestDataScRsp addQuestList(final QuestOuterClass.Quest value) {
bitField0_ |= 0x00000004;
questList.add(value);
return this;
}
/**
* <code>repeated .Quest quest_list = 9;</code>
* @param values the questList to add
* @return this
*/
public GetQuestDataScRsp addAllQuestList(final QuestOuterClass.Quest... values) {
bitField0_ |= 0x00000004;
questList.addAll(values);
return this;
}
@Override
public GetQuestDataScRsp copyFrom(final GetQuestDataScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
retcode = other.retcode;
totalAchievementExp = other.totalAchievementExp;
questList.copyFrom(other.questList);
}
return this;
}
@Override
public GetQuestDataScRsp mergeFrom(final GetQuestDataScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasTotalAchievementExp()) {
setTotalAchievementExp(other.totalAchievementExp);
}
if (other.hasQuestList()) {
getMutableQuestList().addAll(other.questList);
}
return this;
}
@Override
public GetQuestDataScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
retcode = 0;
totalAchievementExp = 0;
questList.clear();
return this;
}
@Override
public GetQuestDataScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
questList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof GetQuestDataScRsp)) {
return false;
}
GetQuestDataScRsp other = (GetQuestDataScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasTotalAchievementExp() || totalAchievementExp == other.totalAchievementExp)
&& (!hasQuestList() || questList.equals(other.questList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 56);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 88);
output.writeUInt32NoTag(totalAchievementExp);
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < questList.length(); i++) {
output.writeRawByte((byte) 74);
output.writeMessageNoTag(questList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(totalAchievementExp);
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * questList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(questList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public GetQuestDataScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 56: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 88) {
break;
}
}
case 88: {
// totalAchievementExp
totalAchievementExp = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 74) {
break;
}
}
case 74: {
// questList
tag = input.readRepeatedMessage(questList, tag);
bitField0_ |= 0x00000004;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.totalAchievementExp, totalAchievementExp);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedMessage(FieldNames.questList, questList);
}
output.endObject();
}
@Override
public GetQuestDataScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 255336658:
case -1295039982: {
if (input.isAtField(FieldNames.totalAchievementExp)) {
if (!input.trySkipNullValue()) {
totalAchievementExp = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -1783104352:
case 575966683: {
if (input.isAtField(FieldNames.questList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(questList);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public GetQuestDataScRsp clone() {
return new GetQuestDataScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static GetQuestDataScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new GetQuestDataScRsp(), data).checkInitialized();
}
public static GetQuestDataScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetQuestDataScRsp(), input).checkInitialized();
}
public static GetQuestDataScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new GetQuestDataScRsp(), input).checkInitialized();
}
/**
* @return factory for creating GetQuestDataScRsp messages
*/
public static MessageFactory<GetQuestDataScRsp> getFactory() {
return GetQuestDataScRspFactory.INSTANCE;
}
private enum GetQuestDataScRspFactory implements MessageFactory<GetQuestDataScRsp> {
INSTANCE;
@Override
public GetQuestDataScRsp create() {
return GetQuestDataScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName totalAchievementExp = FieldName.forField("totalAchievementExp", "total_achievement_exp");
static final FieldName questList = FieldName.forField("questList", "quest_list");
}
}
}

View File

@@ -0,0 +1,391 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class MainMissionOuterClass {
/**
* Protobuf type {@code MainMission}
*/
public static final class MainMission extends ProtoMessage<MainMission> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 id = 4;</code>
*/
private int id;
/**
* <pre>
* repeated AMHBFDNMDLF AKGBLNHFPLG = 14;
* </pre>
*
* <code>optional .MissionStatus status = 9;</code>
*/
private int status;
private MainMission() {
}
/**
* @return a new empty instance of {@code MainMission}
*/
public static MainMission newInstance() {
return new MainMission();
}
/**
* <code>optional uint32 id = 4;</code>
* @return whether the id field is set
*/
public boolean hasId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 id = 4;</code>
* @return this
*/
public MainMission clearId() {
bitField0_ &= ~0x00000001;
id = 0;
return this;
}
/**
* <code>optional uint32 id = 4;</code>
* @return the id
*/
public int getId() {
return id;
}
/**
* <code>optional uint32 id = 4;</code>
* @param value the id to set
* @return this
*/
public MainMission setId(final int value) {
bitField0_ |= 0x00000001;
id = value;
return this;
}
/**
* <pre>
* repeated AMHBFDNMDLF AKGBLNHFPLG = 14;
* </pre>
*
* <code>optional .MissionStatus status = 9;</code>
* @return whether the status field is set
*/
public boolean hasStatus() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <pre>
* repeated AMHBFDNMDLF AKGBLNHFPLG = 14;
* </pre>
*
* <code>optional .MissionStatus status = 9;</code>
* @return this
*/
public MainMission clearStatus() {
bitField0_ &= ~0x00000002;
status = 0;
return this;
}
/**
* <pre>
* repeated AMHBFDNMDLF AKGBLNHFPLG = 14;
* </pre>
*
* <code>optional .MissionStatus status = 9;</code>
* @return the status
*/
public MissionStatusOuterClass.MissionStatus getStatus() {
return MissionStatusOuterClass.MissionStatus.forNumber(status);
}
/**
* Gets the value of the internal enum store. The result is
* equivalent to {@link MainMission#getStatus()}.getNumber().
*
* @return numeric wire representation
*/
public int getStatusValue() {
return status;
}
/**
* Sets the value of the internal enum store. This does not
* do any validity checks, so be sure to use appropriate value
* constants from {@link MissionStatusOuterClass.MissionStatus}. Setting an invalid value
* can cause {@link MainMission#getStatus()} to return null
*
* @param value the numeric wire value to set
* @return this
*/
public MainMission setStatusValue(final int value) {
bitField0_ |= 0x00000002;
status = value;
return this;
}
/**
* <pre>
* repeated AMHBFDNMDLF AKGBLNHFPLG = 14;
* </pre>
*
* <code>optional .MissionStatus status = 9;</code>
* @param value the status to set
* @return this
*/
public MainMission setStatus(final MissionStatusOuterClass.MissionStatus value) {
bitField0_ |= 0x00000002;
status = value.getNumber();
return this;
}
@Override
public MainMission copyFrom(final MainMission other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
id = other.id;
status = other.status;
}
return this;
}
@Override
public MainMission mergeFrom(final MainMission other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasId()) {
setId(other.id);
}
if (other.hasStatus()) {
setStatusValue(other.status);
}
return this;
}
@Override
public MainMission clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
id = 0;
status = 0;
return this;
}
@Override
public MainMission clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof MainMission)) {
return false;
}
MainMission other = (MainMission) o;
return bitField0_ == other.bitField0_
&& (!hasId() || id == other.id)
&& (!hasStatus() || status == other.status);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 32);
output.writeUInt32NoTag(id);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 72);
output.writeEnumNoTag(status);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeEnumSizeNoTag(status);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public MainMission mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 32: {
// id
id = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 72) {
break;
}
}
case 72: {
// status
final int value = input.readInt32();
if (MissionStatusOuterClass.MissionStatus.forNumber(value) != null) {
status = value;
bitField0_ |= 0x00000002;
}
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.id, id);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeEnum(FieldNames.status, status, MissionStatusOuterClass.MissionStatus.converter());
}
output.endObject();
}
@Override
public MainMission mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 3355: {
if (input.isAtField(FieldNames.id)) {
if (!input.trySkipNullValue()) {
id = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -892481550: {
if (input.isAtField(FieldNames.status)) {
if (!input.trySkipNullValue()) {
final MissionStatusOuterClass.MissionStatus value = input.readEnum(MissionStatusOuterClass.MissionStatus.converter());
if (value != null) {
status = value.getNumber();
bitField0_ |= 0x00000002;
} else {
input.skipUnknownEnumValue();
}
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public MainMission clone() {
return new MainMission().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static MainMission parseFrom(final byte[] data) throws InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new MainMission(), data).checkInitialized();
}
public static MainMission parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new MainMission(), input).checkInitialized();
}
public static MainMission parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new MainMission(), input).checkInitialized();
}
/**
* @return factory for creating MainMission messages
*/
public static MessageFactory<MainMission> getFactory() {
return MainMissionFactory.INSTANCE;
}
private enum MainMissionFactory implements MessageFactory<MainMission> {
INSTANCE;
@Override
public MainMission create() {
return MainMission.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName id = FieldName.forField("id");
static final FieldName status = FieldName.forField("status");
}
}
}

View File

@@ -0,0 +1,340 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class MonsterArchiveOuterClass {
/**
* Protobuf type {@code MonsterArchive}
*/
public static final class MonsterArchive extends ProtoMessage<MonsterArchive> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 num = 9;</code>
*/
private int num;
/**
* <code>optional uint32 monster_id = 11;</code>
*/
private int monsterId;
private MonsterArchive() {
}
/**
* @return a new empty instance of {@code MonsterArchive}
*/
public static MonsterArchive newInstance() {
return new MonsterArchive();
}
/**
* <code>optional uint32 num = 9;</code>
* @return whether the num field is set
*/
public boolean hasNum() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 num = 9;</code>
* @return this
*/
public MonsterArchive clearNum() {
bitField0_ &= ~0x00000001;
num = 0;
return this;
}
/**
* <code>optional uint32 num = 9;</code>
* @return the num
*/
public int getNum() {
return num;
}
/**
* <code>optional uint32 num = 9;</code>
* @param value the num to set
* @return this
*/
public MonsterArchive setNum(final int value) {
bitField0_ |= 0x00000001;
num = value;
return this;
}
/**
* <code>optional uint32 monster_id = 11;</code>
* @return whether the monsterId field is set
*/
public boolean hasMonsterId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 monster_id = 11;</code>
* @return this
*/
public MonsterArchive clearMonsterId() {
bitField0_ &= ~0x00000002;
monsterId = 0;
return this;
}
/**
* <code>optional uint32 monster_id = 11;</code>
* @return the monsterId
*/
public int getMonsterId() {
return monsterId;
}
/**
* <code>optional uint32 monster_id = 11;</code>
* @param value the monsterId to set
* @return this
*/
public MonsterArchive setMonsterId(final int value) {
bitField0_ |= 0x00000002;
monsterId = value;
return this;
}
@Override
public MonsterArchive copyFrom(final MonsterArchive other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
num = other.num;
monsterId = other.monsterId;
}
return this;
}
@Override
public MonsterArchive mergeFrom(final MonsterArchive other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasNum()) {
setNum(other.num);
}
if (other.hasMonsterId()) {
setMonsterId(other.monsterId);
}
return this;
}
@Override
public MonsterArchive clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
num = 0;
monsterId = 0;
return this;
}
@Override
public MonsterArchive clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof MonsterArchive)) {
return false;
}
MonsterArchive other = (MonsterArchive) o;
return bitField0_ == other.bitField0_
&& (!hasNum() || num == other.num)
&& (!hasMonsterId() || monsterId == other.monsterId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 72);
output.writeUInt32NoTag(num);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 88);
output.writeUInt32NoTag(monsterId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(num);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(monsterId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public MonsterArchive mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 72: {
// num
num = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 88) {
break;
}
}
case 88: {
// monsterId
monsterId = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.num, num);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.monsterId, monsterId);
}
output.endObject();
}
@Override
public MonsterArchive mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 109446: {
if (input.isAtField(FieldNames.num)) {
if (!input.trySkipNullValue()) {
num = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1316830571:
case 2127946656: {
if (input.isAtField(FieldNames.monsterId)) {
if (!input.trySkipNullValue()) {
monsterId = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public MonsterArchive clone() {
return new MonsterArchive().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static MonsterArchive parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new MonsterArchive(), data).checkInitialized();
}
public static MonsterArchive parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new MonsterArchive(), input).checkInitialized();
}
public static MonsterArchive parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new MonsterArchive(), input).checkInitialized();
}
/**
* @return factory for creating MonsterArchive messages
*/
public static MessageFactory<MonsterArchive> getFactory() {
return MonsterArchiveFactory.INSTANCE;
}
private enum MonsterArchiveFactory implements MessageFactory<MonsterArchive> {
INSTANCE;
@Override
public MonsterArchive create() {
return MonsterArchive.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName num = FieldName.forField("num");
static final FieldName monsterId = FieldName.forField("monsterId", "monster_id");
}
}
}

View File

@@ -0,0 +1,260 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class PlayBackGroundMusicCsReqOuterClass {
/**
* Protobuf type {@code PlayBackGroundMusicCsReq}
*/
public static final class PlayBackGroundMusicCsReq extends ProtoMessage<PlayBackGroundMusicCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 play_music_id = 6;</code>
*/
private int playMusicId;
private PlayBackGroundMusicCsReq() {
}
/**
* @return a new empty instance of {@code PlayBackGroundMusicCsReq}
*/
public static PlayBackGroundMusicCsReq newInstance() {
return new PlayBackGroundMusicCsReq();
}
/**
* <code>optional uint32 play_music_id = 6;</code>
* @return whether the playMusicId field is set
*/
public boolean hasPlayMusicId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 play_music_id = 6;</code>
* @return this
*/
public PlayBackGroundMusicCsReq clearPlayMusicId() {
bitField0_ &= ~0x00000001;
playMusicId = 0;
return this;
}
/**
* <code>optional uint32 play_music_id = 6;</code>
* @return the playMusicId
*/
public int getPlayMusicId() {
return playMusicId;
}
/**
* <code>optional uint32 play_music_id = 6;</code>
* @param value the playMusicId to set
* @return this
*/
public PlayBackGroundMusicCsReq setPlayMusicId(final int value) {
bitField0_ |= 0x00000001;
playMusicId = value;
return this;
}
@Override
public PlayBackGroundMusicCsReq copyFrom(final PlayBackGroundMusicCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
playMusicId = other.playMusicId;
}
return this;
}
@Override
public PlayBackGroundMusicCsReq mergeFrom(final PlayBackGroundMusicCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasPlayMusicId()) {
setPlayMusicId(other.playMusicId);
}
return this;
}
@Override
public PlayBackGroundMusicCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
playMusicId = 0;
return this;
}
@Override
public PlayBackGroundMusicCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof PlayBackGroundMusicCsReq)) {
return false;
}
PlayBackGroundMusicCsReq other = (PlayBackGroundMusicCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasPlayMusicId() || playMusicId == other.playMusicId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 48);
output.writeUInt32NoTag(playMusicId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(playMusicId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public PlayBackGroundMusicCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 48: {
// playMusicId
playMusicId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.playMusicId, playMusicId);
}
output.endObject();
}
@Override
public PlayBackGroundMusicCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 835898444:
case -1319856608: {
if (input.isAtField(FieldNames.playMusicId)) {
if (!input.trySkipNullValue()) {
playMusicId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public PlayBackGroundMusicCsReq clone() {
return new PlayBackGroundMusicCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static PlayBackGroundMusicCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new PlayBackGroundMusicCsReq(), data).checkInitialized();
}
public static PlayBackGroundMusicCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new PlayBackGroundMusicCsReq(), input).checkInitialized();
}
public static PlayBackGroundMusicCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new PlayBackGroundMusicCsReq(), input).checkInitialized();
}
/**
* @return factory for creating PlayBackGroundMusicCsReq messages
*/
public static MessageFactory<PlayBackGroundMusicCsReq> getFactory() {
return PlayBackGroundMusicCsReqFactory.INSTANCE;
}
private enum PlayBackGroundMusicCsReqFactory implements MessageFactory<PlayBackGroundMusicCsReq> {
INSTANCE;
@Override
public PlayBackGroundMusicCsReq create() {
return PlayBackGroundMusicCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName playMusicId = FieldName.forField("playMusicId", "play_music_id");
}
}
}

View File

@@ -0,0 +1,421 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class PlayBackGroundMusicScRspOuterClass {
/**
* Protobuf type {@code PlayBackGroundMusicScRsp}
*/
public static final class PlayBackGroundMusicScRsp extends ProtoMessage<PlayBackGroundMusicScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 retcode = 6;</code>
*/
private int retcode;
/**
* <code>optional uint32 playing_id = 7;</code>
*/
private int playingId;
/**
* <code>optional uint32 play_music_id = 8;</code>
*/
private int playMusicId;
private PlayBackGroundMusicScRsp() {
}
/**
* @return a new empty instance of {@code PlayBackGroundMusicScRsp}
*/
public static PlayBackGroundMusicScRsp newInstance() {
return new PlayBackGroundMusicScRsp();
}
/**
* <code>optional uint32 retcode = 6;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 retcode = 6;</code>
* @return this
*/
public PlayBackGroundMusicScRsp clearRetcode() {
bitField0_ &= ~0x00000001;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 6;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 6;</code>
* @param value the retcode to set
* @return this
*/
public PlayBackGroundMusicScRsp setRetcode(final int value) {
bitField0_ |= 0x00000001;
retcode = value;
return this;
}
/**
* <code>optional uint32 playing_id = 7;</code>
* @return whether the playingId field is set
*/
public boolean hasPlayingId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 playing_id = 7;</code>
* @return this
*/
public PlayBackGroundMusicScRsp clearPlayingId() {
bitField0_ &= ~0x00000002;
playingId = 0;
return this;
}
/**
* <code>optional uint32 playing_id = 7;</code>
* @return the playingId
*/
public int getPlayingId() {
return playingId;
}
/**
* <code>optional uint32 playing_id = 7;</code>
* @param value the playingId to set
* @return this
*/
public PlayBackGroundMusicScRsp setPlayingId(final int value) {
bitField0_ |= 0x00000002;
playingId = value;
return this;
}
/**
* <code>optional uint32 play_music_id = 8;</code>
* @return whether the playMusicId field is set
*/
public boolean hasPlayMusicId() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 play_music_id = 8;</code>
* @return this
*/
public PlayBackGroundMusicScRsp clearPlayMusicId() {
bitField0_ &= ~0x00000004;
playMusicId = 0;
return this;
}
/**
* <code>optional uint32 play_music_id = 8;</code>
* @return the playMusicId
*/
public int getPlayMusicId() {
return playMusicId;
}
/**
* <code>optional uint32 play_music_id = 8;</code>
* @param value the playMusicId to set
* @return this
*/
public PlayBackGroundMusicScRsp setPlayMusicId(final int value) {
bitField0_ |= 0x00000004;
playMusicId = value;
return this;
}
@Override
public PlayBackGroundMusicScRsp copyFrom(final PlayBackGroundMusicScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
retcode = other.retcode;
playingId = other.playingId;
playMusicId = other.playMusicId;
}
return this;
}
@Override
public PlayBackGroundMusicScRsp mergeFrom(final PlayBackGroundMusicScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasPlayingId()) {
setPlayingId(other.playingId);
}
if (other.hasPlayMusicId()) {
setPlayMusicId(other.playMusicId);
}
return this;
}
@Override
public PlayBackGroundMusicScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
retcode = 0;
playingId = 0;
playMusicId = 0;
return this;
}
@Override
public PlayBackGroundMusicScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof PlayBackGroundMusicScRsp)) {
return false;
}
PlayBackGroundMusicScRsp other = (PlayBackGroundMusicScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasPlayingId() || playingId == other.playingId)
&& (!hasPlayMusicId() || playMusicId == other.playMusicId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 48);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 56);
output.writeUInt32NoTag(playingId);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(playMusicId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(playingId);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(playMusicId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public PlayBackGroundMusicScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 48: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 56) {
break;
}
}
case 56: {
// playingId
playingId = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 64) {
break;
}
}
case 64: {
// playMusicId
playMusicId = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.playingId, playingId);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.playMusicId, playMusicId);
}
output.endObject();
}
@Override
public PlayBackGroundMusicScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1868462615:
case -2087744820: {
if (input.isAtField(FieldNames.playingId)) {
if (!input.trySkipNullValue()) {
playingId = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 835898444:
case -1319856608: {
if (input.isAtField(FieldNames.playMusicId)) {
if (!input.trySkipNullValue()) {
playMusicId = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public PlayBackGroundMusicScRsp clone() {
return new PlayBackGroundMusicScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static PlayBackGroundMusicScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new PlayBackGroundMusicScRsp(), data).checkInitialized();
}
public static PlayBackGroundMusicScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new PlayBackGroundMusicScRsp(), input).checkInitialized();
}
public static PlayBackGroundMusicScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new PlayBackGroundMusicScRsp(), input).checkInitialized();
}
/**
* @return factory for creating PlayBackGroundMusicScRsp messages
*/
public static MessageFactory<PlayBackGroundMusicScRsp> getFactory() {
return PlayBackGroundMusicScRspFactory.INSTANCE;
}
private enum PlayBackGroundMusicScRspFactory implements MessageFactory<PlayBackGroundMusicScRsp> {
INSTANCE;
@Override
public PlayBackGroundMusicScRsp create() {
return PlayBackGroundMusicScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName playingId = FieldName.forField("playingId", "playing_id");
static final FieldName playMusicId = FieldName.forField("playMusicId", "play_music_id");
}
}
}

View File

@@ -0,0 +1,809 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoEnum;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.ProtoUtil;
import us.hebi.quickbuf.RepeatedInt;
public final class QuestOuterClass {
/**
* Protobuf type {@code Quest}
*/
public static final class Quest extends ProtoMessage<Quest> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional int64 finish_time = 13;</code>
*/
private long finishTime;
/**
* <code>optional uint32 id = 3;</code>
*/
private int id;
/**
* <code>optional uint32 progress = 9;</code>
*/
private int progress;
/**
* <code>optional .Quest.QuestStatus status = 5;</code>
*/
private int status;
/**
* <code>repeated uint32 taken_achievement_level_list = 7;</code>
*/
private final RepeatedInt takenAchievementLevelList = RepeatedInt.newEmptyInstance();
private Quest() {
}
/**
* @return a new empty instance of {@code Quest}
*/
public static Quest newInstance() {
return new Quest();
}
/**
* <code>optional int64 finish_time = 13;</code>
* @return whether the finishTime field is set
*/
public boolean hasFinishTime() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional int64 finish_time = 13;</code>
* @return this
*/
public Quest clearFinishTime() {
bitField0_ &= ~0x00000001;
finishTime = 0L;
return this;
}
/**
* <code>optional int64 finish_time = 13;</code>
* @return the finishTime
*/
public long getFinishTime() {
return finishTime;
}
/**
* <code>optional int64 finish_time = 13;</code>
* @param value the finishTime to set
* @return this
*/
public Quest setFinishTime(final long value) {
bitField0_ |= 0x00000001;
finishTime = value;
return this;
}
/**
* <code>optional uint32 id = 3;</code>
* @return whether the id field is set
*/
public boolean hasId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 id = 3;</code>
* @return this
*/
public Quest clearId() {
bitField0_ &= ~0x00000002;
id = 0;
return this;
}
/**
* <code>optional uint32 id = 3;</code>
* @return the id
*/
public int getId() {
return id;
}
/**
* <code>optional uint32 id = 3;</code>
* @param value the id to set
* @return this
*/
public Quest setId(final int value) {
bitField0_ |= 0x00000002;
id = value;
return this;
}
/**
* <code>optional uint32 progress = 9;</code>
* @return whether the progress field is set
*/
public boolean hasProgress() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional uint32 progress = 9;</code>
* @return this
*/
public Quest clearProgress() {
bitField0_ &= ~0x00000004;
progress = 0;
return this;
}
/**
* <code>optional uint32 progress = 9;</code>
* @return the progress
*/
public int getProgress() {
return progress;
}
/**
* <code>optional uint32 progress = 9;</code>
* @param value the progress to set
* @return this
*/
public Quest setProgress(final int value) {
bitField0_ |= 0x00000004;
progress = value;
return this;
}
/**
* <code>optional .Quest.QuestStatus status = 5;</code>
* @return whether the status field is set
*/
public boolean hasStatus() {
return (bitField0_ & 0x00000008) != 0;
}
/**
* <code>optional .Quest.QuestStatus status = 5;</code>
* @return this
*/
public Quest clearStatus() {
bitField0_ &= ~0x00000008;
status = 0;
return this;
}
/**
* <code>optional .Quest.QuestStatus status = 5;</code>
* @return the status
*/
public QuestStatus getStatus() {
return QuestStatus.forNumber(status);
}
/**
* Gets the value of the internal enum store. The result is
* equivalent to {@link Quest#getStatus()}.getNumber().
*
* @return numeric wire representation
*/
public int getStatusValue() {
return status;
}
/**
* Sets the value of the internal enum store. This does not
* do any validity checks, so be sure to use appropriate value
* constants from {@link QuestStatus}. Setting an invalid value
* can cause {@link Quest#getStatus()} to return null
*
* @param value the numeric wire value to set
* @return this
*/
public Quest setStatusValue(final int value) {
bitField0_ |= 0x00000008;
status = value;
return this;
}
/**
* <code>optional .Quest.QuestStatus status = 5;</code>
* @param value the status to set
* @return this
*/
public Quest setStatus(final QuestStatus value) {
bitField0_ |= 0x00000008;
status = value.getNumber();
return this;
}
/**
* <code>repeated uint32 taken_achievement_level_list = 7;</code>
* @return whether the takenAchievementLevelList field is set
*/
public boolean hasTakenAchievementLevelList() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>repeated uint32 taken_achievement_level_list = 7;</code>
* @return this
*/
public Quest clearTakenAchievementLevelList() {
bitField0_ &= ~0x00000010;
takenAchievementLevelList.clear();
return this;
}
/**
* <code>repeated uint32 taken_achievement_level_list = 7;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableTakenAchievementLevelList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getTakenAchievementLevelList() {
return takenAchievementLevelList;
}
/**
* <code>repeated uint32 taken_achievement_level_list = 7;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableTakenAchievementLevelList() {
bitField0_ |= 0x00000010;
return takenAchievementLevelList;
}
/**
* <code>repeated uint32 taken_achievement_level_list = 7;</code>
* @param value the takenAchievementLevelList to add
* @return this
*/
public Quest addTakenAchievementLevelList(final int value) {
bitField0_ |= 0x00000010;
takenAchievementLevelList.add(value);
return this;
}
/**
* <code>repeated uint32 taken_achievement_level_list = 7;</code>
* @param values the takenAchievementLevelList to add
* @return this
*/
public Quest addAllTakenAchievementLevelList(final int... values) {
bitField0_ |= 0x00000010;
takenAchievementLevelList.addAll(values);
return this;
}
@Override
public Quest copyFrom(final Quest other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
finishTime = other.finishTime;
id = other.id;
progress = other.progress;
status = other.status;
takenAchievementLevelList.copyFrom(other.takenAchievementLevelList);
}
return this;
}
@Override
public Quest mergeFrom(final Quest other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasFinishTime()) {
setFinishTime(other.finishTime);
}
if (other.hasId()) {
setId(other.id);
}
if (other.hasProgress()) {
setProgress(other.progress);
}
if (other.hasStatus()) {
setStatusValue(other.status);
}
if (other.hasTakenAchievementLevelList()) {
getMutableTakenAchievementLevelList().addAll(other.takenAchievementLevelList);
}
return this;
}
@Override
public Quest clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
finishTime = 0L;
id = 0;
progress = 0;
status = 0;
takenAchievementLevelList.clear();
return this;
}
@Override
public Quest clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
takenAchievementLevelList.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof Quest)) {
return false;
}
Quest other = (Quest) o;
return bitField0_ == other.bitField0_
&& (!hasFinishTime() || finishTime == other.finishTime)
&& (!hasId() || id == other.id)
&& (!hasProgress() || progress == other.progress)
&& (!hasStatus() || status == other.status)
&& (!hasTakenAchievementLevelList() || takenAchievementLevelList.equals(other.takenAchievementLevelList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 104);
output.writeInt64NoTag(finishTime);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(id);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 72);
output.writeUInt32NoTag(progress);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeRawByte((byte) 40);
output.writeEnumNoTag(status);
}
if ((bitField0_ & 0x00000010) != 0) {
for (int i = 0; i < takenAchievementLevelList.length(); i++) {
output.writeRawByte((byte) 56);
output.writeUInt32NoTag(takenAchievementLevelList.array()[i]);
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeInt64SizeNoTag(finishTime);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(progress);
}
if ((bitField0_ & 0x00000008) != 0) {
size += 1 + ProtoSink.computeEnumSizeNoTag(status);
}
if ((bitField0_ & 0x00000010) != 0) {
size += (1 * takenAchievementLevelList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(takenAchievementLevelList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public Quest mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 104: {
// finishTime
finishTime = input.readInt64();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 24) {
break;
}
}
case 24: {
// id
id = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 72) {
break;
}
}
case 72: {
// progress
progress = input.readUInt32();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 40) {
break;
}
}
case 40: {
// status
final int value = input.readInt32();
if (QuestStatus.forNumber(value) != null) {
status = value;
bitField0_ |= 0x00000008;
}
tag = input.readTag();
if (tag != 58) {
break;
}
}
case 58: {
// takenAchievementLevelList [packed=true]
input.readPackedUInt32(takenAchievementLevelList, tag);
bitField0_ |= 0x00000010;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 56: {
// takenAchievementLevelList [packed=false]
tag = input.readRepeatedUInt32(takenAchievementLevelList, tag);
bitField0_ |= 0x00000010;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeInt64(FieldNames.finishTime, finishTime);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.id, id);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeUInt32(FieldNames.progress, progress);
}
if ((bitField0_ & 0x00000008) != 0) {
output.writeEnum(FieldNames.status, status, QuestStatus.converter());
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRepeatedUInt32(FieldNames.takenAchievementLevelList, takenAchievementLevelList);
}
output.endObject();
}
@Override
public Quest mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1151521280:
case 1347904249: {
if (input.isAtField(FieldNames.finishTime)) {
if (!input.trySkipNullValue()) {
finishTime = input.readInt64();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 3355: {
if (input.isAtField(FieldNames.id)) {
if (!input.trySkipNullValue()) {
id = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -1001078227: {
if (input.isAtField(FieldNames.progress)) {
if (!input.trySkipNullValue()) {
progress = input.readUInt32();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
case -892481550: {
if (input.isAtField(FieldNames.status)) {
if (!input.trySkipNullValue()) {
final QuestStatus value = input.readEnum(QuestStatus.converter());
if (value != null) {
status = value.getNumber();
bitField0_ |= 0x00000008;
} else {
input.skipUnknownEnumValue();
}
}
} else {
input.skipUnknownField();
}
break;
}
case 149879610:
case 1076639233: {
if (input.isAtField(FieldNames.takenAchievementLevelList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(takenAchievementLevelList);
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public Quest clone() {
return new Quest().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static Quest parseFrom(final byte[] data) throws InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new Quest(), data).checkInitialized();
}
public static Quest parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new Quest(), input).checkInitialized();
}
public static Quest parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new Quest(), input).checkInitialized();
}
/**
* @return factory for creating Quest messages
*/
public static MessageFactory<Quest> getFactory() {
return QuestFactory.INSTANCE;
}
/**
* Protobuf enum {@code QuestStatus}
*/
public enum QuestStatus implements ProtoEnum<QuestStatus> {
/**
* <code>QUEST_NONE = 0;</code>
*/
QUEST_NONE("QUEST_NONE", 0),
/**
* <code>QUEST_DOING = 1;</code>
*/
QUEST_DOING("QUEST_DOING", 1),
/**
* <code>QUEST_FINISH = 2;</code>
*/
QUEST_FINISH("QUEST_FINISH", 2),
/**
* <code>QUEST_CLOSE = 3;</code>
*/
QUEST_CLOSE("QUEST_CLOSE", 3),
/**
* <code>QUEST_DELETE = 4;</code>
*/
QUEST_DELETE("QUEST_DELETE", 4);
/**
* <code>QUEST_NONE = 0;</code>
*/
public static final int QUEST_NONE_VALUE = 0;
/**
* <code>QUEST_DOING = 1;</code>
*/
public static final int QUEST_DOING_VALUE = 1;
/**
* <code>QUEST_FINISH = 2;</code>
*/
public static final int QUEST_FINISH_VALUE = 2;
/**
* <code>QUEST_CLOSE = 3;</code>
*/
public static final int QUEST_CLOSE_VALUE = 3;
/**
* <code>QUEST_DELETE = 4;</code>
*/
public static final int QUEST_DELETE_VALUE = 4;
private final String name;
private final int number;
private QuestStatus(String name, int number) {
this.name = name;
this.number = number;
}
/**
* @return the string representation of enum entry
*/
@Override
public String getName() {
return name;
}
/**
* @return the numeric wire value of this enum entry
*/
@Override
public int getNumber() {
return number;
}
/**
* @return a converter that maps between this enum's numeric and text representations
*/
public static ProtoEnum.EnumConverter<QuestStatus> converter() {
return QuestStatusConverter.INSTANCE;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value, or null if unknown.
*/
public static QuestStatus forNumber(int value) {
return QuestStatusConverter.INSTANCE.forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @param other Fallback value in case the value is not known.
* @return The enum associated with the given numeric wire value, or the fallback value if unknown.
*/
public static QuestStatus forNumberOr(int number, QuestStatus other) {
QuestStatus value = forNumber(number);
return value == null ? other : value;
}
enum QuestStatusConverter implements ProtoEnum.EnumConverter<QuestStatus> {
INSTANCE;
private static final QuestStatus[] lookup = new QuestStatus[5];
static {
lookup[0] = QUEST_NONE;
lookup[1] = QUEST_DOING;
lookup[2] = QUEST_FINISH;
lookup[3] = QUEST_CLOSE;
lookup[4] = QUEST_DELETE;
}
@Override
public final QuestStatus forNumber(final int value) {
if (value >= 0 && value < lookup.length) {
return lookup[value];
}
return null;
}
@Override
public final QuestStatus forName(final CharSequence value) {
if (value.length() == 10) {
if (ProtoUtil.isEqual("QUEST_NONE", value)) {
return QUEST_NONE;
}
}
if (value.length() == 11) {
if (ProtoUtil.isEqual("QUEST_DOING", value)) {
return QUEST_DOING;
}
if (ProtoUtil.isEqual("QUEST_CLOSE", value)) {
return QUEST_CLOSE;
}
}
if (value.length() == 12) {
if (ProtoUtil.isEqual("QUEST_FINISH", value)) {
return QUEST_FINISH;
}
if (ProtoUtil.isEqual("QUEST_DELETE", value)) {
return QUEST_DELETE;
}
}
return null;
}
}
}
private enum QuestFactory implements MessageFactory<Quest> {
INSTANCE;
@Override
public Quest create() {
return Quest.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName finishTime = FieldName.forField("finishTime", "finish_time");
static final FieldName id = FieldName.forField("id");
static final FieldName progress = FieldName.forField("progress");
static final FieldName status = FieldName.forField("status");
static final FieldName takenAchievementLevelList = FieldName.forField("takenAchievementLevelList", "taken_achievement_level_list");
}
}
}

View File

@@ -0,0 +1,339 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class RelicArchiveOuterClass {
/**
* Protobuf type {@code RelicArchive}
*/
public static final class RelicArchive extends ProtoMessage<RelicArchive> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 type = 6;</code>
*/
private int type;
/**
* <code>optional uint32 relic_id = 8;</code>
*/
private int relicId;
private RelicArchive() {
}
/**
* @return a new empty instance of {@code RelicArchive}
*/
public static RelicArchive newInstance() {
return new RelicArchive();
}
/**
* <code>optional uint32 type = 6;</code>
* @return whether the type field is set
*/
public boolean hasType() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 type = 6;</code>
* @return this
*/
public RelicArchive clearType() {
bitField0_ &= ~0x00000001;
type = 0;
return this;
}
/**
* <code>optional uint32 type = 6;</code>
* @return the type
*/
public int getType() {
return type;
}
/**
* <code>optional uint32 type = 6;</code>
* @param value the type to set
* @return this
*/
public RelicArchive setType(final int value) {
bitField0_ |= 0x00000001;
type = value;
return this;
}
/**
* <code>optional uint32 relic_id = 8;</code>
* @return whether the relicId field is set
*/
public boolean hasRelicId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 relic_id = 8;</code>
* @return this
*/
public RelicArchive clearRelicId() {
bitField0_ &= ~0x00000002;
relicId = 0;
return this;
}
/**
* <code>optional uint32 relic_id = 8;</code>
* @return the relicId
*/
public int getRelicId() {
return relicId;
}
/**
* <code>optional uint32 relic_id = 8;</code>
* @param value the relicId to set
* @return this
*/
public RelicArchive setRelicId(final int value) {
bitField0_ |= 0x00000002;
relicId = value;
return this;
}
@Override
public RelicArchive copyFrom(final RelicArchive other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
type = other.type;
relicId = other.relicId;
}
return this;
}
@Override
public RelicArchive mergeFrom(final RelicArchive other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasType()) {
setType(other.type);
}
if (other.hasRelicId()) {
setRelicId(other.relicId);
}
return this;
}
@Override
public RelicArchive clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
type = 0;
relicId = 0;
return this;
}
@Override
public RelicArchive clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof RelicArchive)) {
return false;
}
RelicArchive other = (RelicArchive) o;
return bitField0_ == other.bitField0_
&& (!hasType() || type == other.type)
&& (!hasRelicId() || relicId == other.relicId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 48);
output.writeUInt32NoTag(type);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(relicId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(type);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(relicId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public RelicArchive mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 48: {
// type
type = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 64) {
break;
}
}
case 64: {
// relicId
relicId = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.type, type);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.relicId, relicId);
}
output.endObject();
}
@Override
public RelicArchive mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 3575610: {
if (input.isAtField(FieldNames.type)) {
if (!input.trySkipNullValue()) {
type = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1090714606:
case -547564185: {
if (input.isAtField(FieldNames.relicId)) {
if (!input.trySkipNullValue()) {
relicId = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public RelicArchive clone() {
return new RelicArchive().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static RelicArchive parseFrom(final byte[] data) throws InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new RelicArchive(), data).checkInitialized();
}
public static RelicArchive parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new RelicArchive(), input).checkInitialized();
}
public static RelicArchive parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new RelicArchive(), input).checkInitialized();
}
/**
* @return factory for creating RelicArchive messages
*/
public static MessageFactory<RelicArchive> getFactory() {
return RelicArchiveFactory.INSTANCE;
}
private enum RelicArchiveFactory implements MessageFactory<RelicArchive> {
INSTANCE;
@Override
public RelicArchive create() {
return RelicArchive.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName type = FieldName.forField("type");
static final FieldName relicId = FieldName.forField("relicId", "relic_id");
}
}
}

View File

@@ -59,6 +59,11 @@ public final class SceneBattleInfoOuterClass {
*/
private final RepeatedMessage<BattleBuffOuterClass.BattleBuff> buffList = RepeatedMessage.newEmptyInstance(BattleBuffOuterClass.BattleBuff.getFactory());
/**
* <code>repeated .ClientTurnSnapshot turn_snapshot_list = 219;</code>
*/
private final RepeatedMessage<ClientTurnSnapshotOuterClass.ClientTurnSnapshot> turnSnapshotList = RepeatedMessage.newEmptyInstance(ClientTurnSnapshotOuterClass.ClientTurnSnapshot.getFactory());
private SceneBattleInfo() {
}
@@ -462,6 +467,77 @@ public final class SceneBattleInfoOuterClass {
return this;
}
/**
* <code>repeated .ClientTurnSnapshot turn_snapshot_list = 219;</code>
* @return whether the turnSnapshotList field is set
*/
public boolean hasTurnSnapshotList() {
return (bitField0_ & 0x00000100) != 0;
}
/**
* <code>repeated .ClientTurnSnapshot turn_snapshot_list = 219;</code>
* @return this
*/
public SceneBattleInfo clearTurnSnapshotList() {
bitField0_ &= ~0x00000100;
turnSnapshotList.clear();
return this;
}
/**
* <code>repeated .ClientTurnSnapshot turn_snapshot_list = 219;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableTurnSnapshotList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<ClientTurnSnapshotOuterClass.ClientTurnSnapshot> getTurnSnapshotList() {
return turnSnapshotList;
}
/**
* <code>repeated .ClientTurnSnapshot turn_snapshot_list = 219;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<ClientTurnSnapshotOuterClass.ClientTurnSnapshot> getMutableTurnSnapshotList(
) {
bitField0_ |= 0x00000100;
return turnSnapshotList;
}
/**
* <code>repeated .ClientTurnSnapshot turn_snapshot_list = 219;</code>
* @param value the turnSnapshotList to add
* @return this
*/
public SceneBattleInfo addTurnSnapshotList(
final ClientTurnSnapshotOuterClass.ClientTurnSnapshot value) {
bitField0_ |= 0x00000100;
turnSnapshotList.add(value);
return this;
}
/**
* <code>repeated .ClientTurnSnapshot turn_snapshot_list = 219;</code>
* @param values the turnSnapshotList to add
* @return this
*/
public SceneBattleInfo addAllTurnSnapshotList(
final ClientTurnSnapshotOuterClass.ClientTurnSnapshot... values) {
bitField0_ |= 0x00000100;
turnSnapshotList.addAll(values);
return this;
}
@Override
public SceneBattleInfo copyFrom(final SceneBattleInfo other) {
cachedSize = other.cachedSize;
@@ -475,6 +551,7 @@ public final class SceneBattleInfoOuterClass {
battleAvatarList.copyFrom(other.battleAvatarList);
monsterWaveList.copyFrom(other.monsterWaveList);
buffList.copyFrom(other.buffList);
turnSnapshotList.copyFrom(other.turnSnapshotList);
}
return this;
}
@@ -509,6 +586,9 @@ public final class SceneBattleInfoOuterClass {
if (other.hasBuffList()) {
getMutableBuffList().addAll(other.buffList);
}
if (other.hasTurnSnapshotList()) {
getMutableTurnSnapshotList().addAll(other.turnSnapshotList);
}
return this;
}
@@ -527,6 +607,7 @@ public final class SceneBattleInfoOuterClass {
battleAvatarList.clear();
monsterWaveList.clear();
buffList.clear();
turnSnapshotList.clear();
return this;
}
@@ -540,6 +621,7 @@ public final class SceneBattleInfoOuterClass {
battleAvatarList.clearQuick();
monsterWaveList.clearQuick();
buffList.clearQuick();
turnSnapshotList.clearQuick();
return this;
}
@@ -560,7 +642,8 @@ public final class SceneBattleInfoOuterClass {
&& (!hasBattleId() || battleId == other.battleId)
&& (!hasBattleAvatarList() || battleAvatarList.equals(other.battleAvatarList))
&& (!hasMonsterWaveList() || monsterWaveList.equals(other.monsterWaveList))
&& (!hasBuffList() || buffList.equals(other.buffList));
&& (!hasBuffList() || buffList.equals(other.buffList))
&& (!hasTurnSnapshotList() || turnSnapshotList.equals(other.turnSnapshotList));
}
@Override
@@ -603,6 +686,12 @@ public final class SceneBattleInfoOuterClass {
output.writeMessageNoTag(buffList.get(i));
}
}
if ((bitField0_ & 0x00000100) != 0) {
for (int i = 0; i < turnSnapshotList.length(); i++) {
output.writeRawLittleEndian16((short) 3546);
output.writeMessageNoTag(turnSnapshotList.get(i));
}
}
}
@Override
@@ -632,6 +721,9 @@ public final class SceneBattleInfoOuterClass {
if ((bitField0_ & 0x00000080) != 0) {
size += (1 * buffList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(buffList);
}
if ((bitField0_ & 0x00000100) != 0) {
size += (2 * turnSnapshotList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(turnSnapshotList);
}
return size;
}
@@ -707,6 +799,14 @@ public final class SceneBattleInfoOuterClass {
// buffList
tag = input.readRepeatedMessage(buffList, tag);
bitField0_ |= 0x00000080;
if (tag != 1754) {
break;
}
}
case 1754: {
// turnSnapshotList
tag = input.readRepeatedMessage(turnSnapshotList, tag);
bitField0_ |= 0x00000100;
if (tag != 0) {
break;
}
@@ -752,6 +852,9 @@ public final class SceneBattleInfoOuterClass {
if ((bitField0_ & 0x00000080) != 0) {
output.writeRepeatedMessage(FieldNames.buffList, buffList);
}
if ((bitField0_ & 0x00000100) != 0) {
output.writeRepeatedMessage(FieldNames.turnSnapshotList, turnSnapshotList);
}
output.endObject();
}
@@ -858,6 +961,18 @@ public final class SceneBattleInfoOuterClass {
}
break;
}
case 716339615:
case 397197815: {
if (input.isAtField(FieldNames.turnSnapshotList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(turnSnapshotList);
bitField0_ |= 0x00000100;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
@@ -926,6 +1041,8 @@ public final class SceneBattleInfoOuterClass {
static final FieldName monsterWaveList = FieldName.forField("monsterWaveList", "monster_wave_list");
static final FieldName buffList = FieldName.forField("buffList", "buff_list");
static final FieldName turnSnapshotList = FieldName.forField("turnSnapshotList", "turn_snapshot_list");
}
}
}

View File

@@ -0,0 +1,260 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class SelectChatBubbleCsReqOuterClass {
/**
* Protobuf type {@code SelectChatBubbleCsReq}
*/
public static final class SelectChatBubbleCsReq extends ProtoMessage<SelectChatBubbleCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 bubble_id = 7;</code>
*/
private int bubbleId;
private SelectChatBubbleCsReq() {
}
/**
* @return a new empty instance of {@code SelectChatBubbleCsReq}
*/
public static SelectChatBubbleCsReq newInstance() {
return new SelectChatBubbleCsReq();
}
/**
* <code>optional uint32 bubble_id = 7;</code>
* @return whether the bubbleId field is set
*/
public boolean hasBubbleId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 bubble_id = 7;</code>
* @return this
*/
public SelectChatBubbleCsReq clearBubbleId() {
bitField0_ &= ~0x00000001;
bubbleId = 0;
return this;
}
/**
* <code>optional uint32 bubble_id = 7;</code>
* @return the bubbleId
*/
public int getBubbleId() {
return bubbleId;
}
/**
* <code>optional uint32 bubble_id = 7;</code>
* @param value the bubbleId to set
* @return this
*/
public SelectChatBubbleCsReq setBubbleId(final int value) {
bitField0_ |= 0x00000001;
bubbleId = value;
return this;
}
@Override
public SelectChatBubbleCsReq copyFrom(final SelectChatBubbleCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
bubbleId = other.bubbleId;
}
return this;
}
@Override
public SelectChatBubbleCsReq mergeFrom(final SelectChatBubbleCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasBubbleId()) {
setBubbleId(other.bubbleId);
}
return this;
}
@Override
public SelectChatBubbleCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
bubbleId = 0;
return this;
}
@Override
public SelectChatBubbleCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SelectChatBubbleCsReq)) {
return false;
}
SelectChatBubbleCsReq other = (SelectChatBubbleCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasBubbleId() || bubbleId == other.bubbleId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 56);
output.writeUInt32NoTag(bubbleId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(bubbleId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SelectChatBubbleCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 56: {
// bubbleId
bubbleId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.bubbleId, bubbleId);
}
output.endObject();
}
@Override
public SelectChatBubbleCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -1640052025:
case 698016174: {
if (input.isAtField(FieldNames.bubbleId)) {
if (!input.trySkipNullValue()) {
bubbleId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SelectChatBubbleCsReq clone() {
return new SelectChatBubbleCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SelectChatBubbleCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SelectChatBubbleCsReq(), data).checkInitialized();
}
public static SelectChatBubbleCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectChatBubbleCsReq(), input).checkInitialized();
}
public static SelectChatBubbleCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectChatBubbleCsReq(), input).checkInitialized();
}
/**
* @return factory for creating SelectChatBubbleCsReq messages
*/
public static MessageFactory<SelectChatBubbleCsReq> getFactory() {
return SelectChatBubbleCsReqFactory.INSTANCE;
}
private enum SelectChatBubbleCsReqFactory implements MessageFactory<SelectChatBubbleCsReq> {
INSTANCE;
@Override
public SelectChatBubbleCsReq create() {
return SelectChatBubbleCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName bubbleId = FieldName.forField("bubbleId", "bubble_id");
}
}
}

View File

@@ -0,0 +1,340 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class SelectChatBubbleScRspOuterClass {
/**
* Protobuf type {@code SelectChatBubbleScRsp}
*/
public static final class SelectChatBubbleScRsp extends ProtoMessage<SelectChatBubbleScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 cur_chat_bubble = 1;</code>
*/
private int curChatBubble;
/**
* <code>optional uint32 retcode = 10;</code>
*/
private int retcode;
private SelectChatBubbleScRsp() {
}
/**
* @return a new empty instance of {@code SelectChatBubbleScRsp}
*/
public static SelectChatBubbleScRsp newInstance() {
return new SelectChatBubbleScRsp();
}
/**
* <code>optional uint32 cur_chat_bubble = 1;</code>
* @return whether the curChatBubble field is set
*/
public boolean hasCurChatBubble() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 cur_chat_bubble = 1;</code>
* @return this
*/
public SelectChatBubbleScRsp clearCurChatBubble() {
bitField0_ &= ~0x00000001;
curChatBubble = 0;
return this;
}
/**
* <code>optional uint32 cur_chat_bubble = 1;</code>
* @return the curChatBubble
*/
public int getCurChatBubble() {
return curChatBubble;
}
/**
* <code>optional uint32 cur_chat_bubble = 1;</code>
* @param value the curChatBubble to set
* @return this
*/
public SelectChatBubbleScRsp setCurChatBubble(final int value) {
bitField0_ |= 0x00000001;
curChatBubble = value;
return this;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @return this
*/
public SelectChatBubbleScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 10;</code>
* @param value the retcode to set
* @return this
*/
public SelectChatBubbleScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
@Override
public SelectChatBubbleScRsp copyFrom(final SelectChatBubbleScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
curChatBubble = other.curChatBubble;
retcode = other.retcode;
}
return this;
}
@Override
public SelectChatBubbleScRsp mergeFrom(final SelectChatBubbleScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasCurChatBubble()) {
setCurChatBubble(other.curChatBubble);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
return this;
}
@Override
public SelectChatBubbleScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
curChatBubble = 0;
retcode = 0;
return this;
}
@Override
public SelectChatBubbleScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SelectChatBubbleScRsp)) {
return false;
}
SelectChatBubbleScRsp other = (SelectChatBubbleScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasCurChatBubble() || curChatBubble == other.curChatBubble)
&& (!hasRetcode() || retcode == other.retcode);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(curChatBubble);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 80);
output.writeUInt32NoTag(retcode);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(curChatBubble);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SelectChatBubbleScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 8: {
// curChatBubble
curChatBubble = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 80) {
break;
}
}
case 80: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.curChatBubble, curChatBubble);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
output.endObject();
}
@Override
public SelectChatBubbleScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 94167140:
case 1828957140: {
if (input.isAtField(FieldNames.curChatBubble)) {
if (!input.trySkipNullValue()) {
curChatBubble = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SelectChatBubbleScRsp clone() {
return new SelectChatBubbleScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SelectChatBubbleScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SelectChatBubbleScRsp(), data).checkInitialized();
}
public static SelectChatBubbleScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectChatBubbleScRsp(), input).checkInitialized();
}
public static SelectChatBubbleScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectChatBubbleScRsp(), input).checkInitialized();
}
/**
* @return factory for creating SelectChatBubbleScRsp messages
*/
public static MessageFactory<SelectChatBubbleScRsp> getFactory() {
return SelectChatBubbleScRspFactory.INSTANCE;
}
private enum SelectChatBubbleScRspFactory implements MessageFactory<SelectChatBubbleScRsp> {
INSTANCE;
@Override
public SelectChatBubbleScRsp create() {
return SelectChatBubbleScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName curChatBubble = FieldName.forField("curChatBubble", "cur_chat_bubble");
static final FieldName retcode = FieldName.forField("retcode");
}
}
}

View File

@@ -0,0 +1,260 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class SelectPhoneThemeCsReqOuterClass {
/**
* Protobuf type {@code SelectPhoneThemeCsReq}
*/
public static final class SelectPhoneThemeCsReq extends ProtoMessage<SelectPhoneThemeCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 theme_id = 2;</code>
*/
private int themeId;
private SelectPhoneThemeCsReq() {
}
/**
* @return a new empty instance of {@code SelectPhoneThemeCsReq}
*/
public static SelectPhoneThemeCsReq newInstance() {
return new SelectPhoneThemeCsReq();
}
/**
* <code>optional uint32 theme_id = 2;</code>
* @return whether the themeId field is set
*/
public boolean hasThemeId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 theme_id = 2;</code>
* @return this
*/
public SelectPhoneThemeCsReq clearThemeId() {
bitField0_ &= ~0x00000001;
themeId = 0;
return this;
}
/**
* <code>optional uint32 theme_id = 2;</code>
* @return the themeId
*/
public int getThemeId() {
return themeId;
}
/**
* <code>optional uint32 theme_id = 2;</code>
* @param value the themeId to set
* @return this
*/
public SelectPhoneThemeCsReq setThemeId(final int value) {
bitField0_ |= 0x00000001;
themeId = value;
return this;
}
@Override
public SelectPhoneThemeCsReq copyFrom(final SelectPhoneThemeCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
themeId = other.themeId;
}
return this;
}
@Override
public SelectPhoneThemeCsReq mergeFrom(final SelectPhoneThemeCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasThemeId()) {
setThemeId(other.themeId);
}
return this;
}
@Override
public SelectPhoneThemeCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
themeId = 0;
return this;
}
@Override
public SelectPhoneThemeCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SelectPhoneThemeCsReq)) {
return false;
}
SelectPhoneThemeCsReq other = (SelectPhoneThemeCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasThemeId() || themeId == other.themeId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 16);
output.writeUInt32NoTag(themeId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(themeId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SelectPhoneThemeCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 16: {
// themeId
themeId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.themeId, themeId);
}
output.endObject();
}
@Override
public SelectPhoneThemeCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case -1349701436:
case 1108949841: {
if (input.isAtField(FieldNames.themeId)) {
if (!input.trySkipNullValue()) {
themeId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SelectPhoneThemeCsReq clone() {
return new SelectPhoneThemeCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SelectPhoneThemeCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SelectPhoneThemeCsReq(), data).checkInitialized();
}
public static SelectPhoneThemeCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectPhoneThemeCsReq(), input).checkInitialized();
}
public static SelectPhoneThemeCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectPhoneThemeCsReq(), input).checkInitialized();
}
/**
* @return factory for creating SelectPhoneThemeCsReq messages
*/
public static MessageFactory<SelectPhoneThemeCsReq> getFactory() {
return SelectPhoneThemeCsReqFactory.INSTANCE;
}
private enum SelectPhoneThemeCsReqFactory implements MessageFactory<SelectPhoneThemeCsReq> {
INSTANCE;
@Override
public SelectPhoneThemeCsReq create() {
return SelectPhoneThemeCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName themeId = FieldName.forField("themeId", "theme_id");
}
}
}

View File

@@ -0,0 +1,340 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
public final class SelectPhoneThemeScRspOuterClass {
/**
* Protobuf type {@code SelectPhoneThemeScRsp}
*/
public static final class SelectPhoneThemeScRsp extends ProtoMessage<SelectPhoneThemeScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 cur_phone_theme = 6;</code>
*/
private int curPhoneTheme;
/**
* <code>optional uint32 retcode = 8;</code>
*/
private int retcode;
private SelectPhoneThemeScRsp() {
}
/**
* @return a new empty instance of {@code SelectPhoneThemeScRsp}
*/
public static SelectPhoneThemeScRsp newInstance() {
return new SelectPhoneThemeScRsp();
}
/**
* <code>optional uint32 cur_phone_theme = 6;</code>
* @return whether the curPhoneTheme field is set
*/
public boolean hasCurPhoneTheme() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 cur_phone_theme = 6;</code>
* @return this
*/
public SelectPhoneThemeScRsp clearCurPhoneTheme() {
bitField0_ &= ~0x00000001;
curPhoneTheme = 0;
return this;
}
/**
* <code>optional uint32 cur_phone_theme = 6;</code>
* @return the curPhoneTheme
*/
public int getCurPhoneTheme() {
return curPhoneTheme;
}
/**
* <code>optional uint32 cur_phone_theme = 6;</code>
* @param value the curPhoneTheme to set
* @return this
*/
public SelectPhoneThemeScRsp setCurPhoneTheme(final int value) {
bitField0_ |= 0x00000001;
curPhoneTheme = value;
return this;
}
/**
* <code>optional uint32 retcode = 8;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 retcode = 8;</code>
* @return this
*/
public SelectPhoneThemeScRsp clearRetcode() {
bitField0_ &= ~0x00000002;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 8;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 8;</code>
* @param value the retcode to set
* @return this
*/
public SelectPhoneThemeScRsp setRetcode(final int value) {
bitField0_ |= 0x00000002;
retcode = value;
return this;
}
@Override
public SelectPhoneThemeScRsp copyFrom(final SelectPhoneThemeScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
curPhoneTheme = other.curPhoneTheme;
retcode = other.retcode;
}
return this;
}
@Override
public SelectPhoneThemeScRsp mergeFrom(final SelectPhoneThemeScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasCurPhoneTheme()) {
setCurPhoneTheme(other.curPhoneTheme);
}
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
return this;
}
@Override
public SelectPhoneThemeScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
curPhoneTheme = 0;
retcode = 0;
return this;
}
@Override
public SelectPhoneThemeScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof SelectPhoneThemeScRsp)) {
return false;
}
SelectPhoneThemeScRsp other = (SelectPhoneThemeScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasCurPhoneTheme() || curPhoneTheme == other.curPhoneTheme)
&& (!hasRetcode() || retcode == other.retcode);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 48);
output.writeUInt32NoTag(curPhoneTheme);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(retcode);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(curPhoneTheme);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public SelectPhoneThemeScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 48: {
// curPhoneTheme
curPhoneTheme = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 64) {
break;
}
}
case 64: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.curPhoneTheme, curPhoneTheme);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
output.endObject();
}
@Override
public SelectPhoneThemeScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 405670747:
case -514634695: {
if (input.isAtField(FieldNames.curPhoneTheme)) {
if (!input.trySkipNullValue()) {
curPhoneTheme = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public SelectPhoneThemeScRsp clone() {
return new SelectPhoneThemeScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static SelectPhoneThemeScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new SelectPhoneThemeScRsp(), data).checkInitialized();
}
public static SelectPhoneThemeScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectPhoneThemeScRsp(), input).checkInitialized();
}
public static SelectPhoneThemeScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new SelectPhoneThemeScRsp(), input).checkInitialized();
}
/**
* @return factory for creating SelectPhoneThemeScRsp messages
*/
public static MessageFactory<SelectPhoneThemeScRsp> getFactory() {
return SelectPhoneThemeScRspFactory.INSTANCE;
}
private enum SelectPhoneThemeScRspFactory implements MessageFactory<SelectPhoneThemeScRsp> {
INSTANCE;
@Override
public SelectPhoneThemeScRsp create() {
return SelectPhoneThemeScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName curPhoneTheme = FieldName.forField("curPhoneTheme", "cur_phone_theme");
static final FieldName retcode = FieldName.forField("retcode");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -39,6 +39,11 @@ public final class SimpleInfoOuterClass {
*/
private int uid;
/**
* <code>optional uint32 chat_bubble_id = 13;</code>
*/
private int chatBubbleId;
/**
* <code>optional .PlatformType platform_type = 7;</code>
*/
@@ -222,12 +227,49 @@ public final class SimpleInfoOuterClass {
return this;
}
/**
* <code>optional uint32 chat_bubble_id = 13;</code>
* @return whether the chatBubbleId field is set
*/
public boolean hasChatBubbleId() {
return (bitField0_ & 0x00000010) != 0;
}
/**
* <code>optional uint32 chat_bubble_id = 13;</code>
* @return this
*/
public SimpleInfo clearChatBubbleId() {
bitField0_ &= ~0x00000010;
chatBubbleId = 0;
return this;
}
/**
* <code>optional uint32 chat_bubble_id = 13;</code>
* @return the chatBubbleId
*/
public int getChatBubbleId() {
return chatBubbleId;
}
/**
* <code>optional uint32 chat_bubble_id = 13;</code>
* @param value the chatBubbleId to set
* @return this
*/
public SimpleInfo setChatBubbleId(final int value) {
bitField0_ |= 0x00000010;
chatBubbleId = value;
return this;
}
/**
* <code>optional .PlatformType platform_type = 7;</code>
* @return whether the platformType field is set
*/
public boolean hasPlatformType() {
return (bitField0_ & 0x00000010) != 0;
return (bitField0_ & 0x00000020) != 0;
}
/**
@@ -235,7 +277,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo clearPlatformType() {
bitField0_ &= ~0x00000010;
bitField0_ &= ~0x00000020;
platformType = 0;
return this;
}
@@ -268,7 +310,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setPlatformTypeValue(final int value) {
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000020;
platformType = value;
return this;
}
@@ -279,7 +321,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setPlatformType(final PlatformTypeOuterClass.PlatformType value) {
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000020;
platformType = value.getNumber();
return this;
}
@@ -289,7 +331,7 @@ public final class SimpleInfoOuterClass {
* @return whether the onlineStatus field is set
*/
public boolean hasOnlineStatus() {
return (bitField0_ & 0x00000020) != 0;
return (bitField0_ & 0x00000040) != 0;
}
/**
@@ -297,7 +339,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo clearOnlineStatus() {
bitField0_ &= ~0x00000020;
bitField0_ &= ~0x00000040;
onlineStatus = 0;
return this;
}
@@ -330,7 +372,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setOnlineStatusValue(final int value) {
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000040;
onlineStatus = value;
return this;
}
@@ -341,7 +383,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setOnlineStatus(final FriendOnlineStatusOuterClass.FriendOnlineStatus value) {
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000040;
onlineStatus = value.getNumber();
return this;
}
@@ -351,7 +393,7 @@ public final class SimpleInfoOuterClass {
* @return whether the simpleAvatarInfo field is set
*/
public boolean hasSimpleAvatarInfo() {
return (bitField0_ & 0x00000040) != 0;
return (bitField0_ & 0x00000080) != 0;
}
/**
@@ -359,7 +401,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo clearSimpleAvatarInfo() {
bitField0_ &= ~0x00000040;
bitField0_ &= ~0x00000080;
simpleAvatarInfo.clear();
return this;
}
@@ -388,7 +430,7 @@ public final class SimpleInfoOuterClass {
* @return internal storage object for modifications
*/
public SimpleAvatarInfoOuterClass.SimpleAvatarInfo getMutableSimpleAvatarInfo() {
bitField0_ |= 0x00000040;
bitField0_ |= 0x00000080;
return simpleAvatarInfo;
}
@@ -398,7 +440,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setSimpleAvatarInfo(final SimpleAvatarInfoOuterClass.SimpleAvatarInfo value) {
bitField0_ |= 0x00000040;
bitField0_ |= 0x00000080;
simpleAvatarInfo.copyFrom(value);
return this;
}
@@ -408,7 +450,7 @@ public final class SimpleInfoOuterClass {
* @return whether the nickname field is set
*/
public boolean hasNickname() {
return (bitField0_ & 0x00000080) != 0;
return (bitField0_ & 0x00000100) != 0;
}
/**
@@ -416,7 +458,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo clearNickname() {
bitField0_ &= ~0x00000080;
bitField0_ &= ~0x00000100;
nickname.clear();
return this;
}
@@ -442,7 +484,7 @@ public final class SimpleInfoOuterClass {
* @return internal {@code Utf8String} representation of nickname for modifications
*/
public Utf8String getMutableNicknameBytes() {
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
return this.nickname;
}
@@ -452,7 +494,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setNickname(final CharSequence value) {
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
nickname.copyFrom(value);
return this;
}
@@ -463,7 +505,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setNickname(final Utf8String value) {
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
nickname.copyFrom(value);
return this;
}
@@ -473,7 +515,7 @@ public final class SimpleInfoOuterClass {
* @return whether the signature field is set
*/
public boolean hasSignature() {
return (bitField0_ & 0x00000100) != 0;
return (bitField0_ & 0x00000200) != 0;
}
/**
@@ -481,7 +523,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo clearSignature() {
bitField0_ &= ~0x00000100;
bitField0_ &= ~0x00000200;
signature.clear();
return this;
}
@@ -507,7 +549,7 @@ public final class SimpleInfoOuterClass {
* @return internal {@code Utf8String} representation of signature for modifications
*/
public Utf8String getMutableSignatureBytes() {
bitField0_ |= 0x00000100;
bitField0_ |= 0x00000200;
return this.signature;
}
@@ -517,7 +559,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setSignature(final CharSequence value) {
bitField0_ |= 0x00000100;
bitField0_ |= 0x00000200;
signature.copyFrom(value);
return this;
}
@@ -528,7 +570,7 @@ public final class SimpleInfoOuterClass {
* @return this
*/
public SimpleInfo setSignature(final Utf8String value) {
bitField0_ |= 0x00000100;
bitField0_ |= 0x00000200;
signature.copyFrom(value);
return this;
}
@@ -542,6 +584,7 @@ public final class SimpleInfoOuterClass {
level = other.level;
headIcon = other.headIcon;
uid = other.uid;
chatBubbleId = other.chatBubbleId;
platformType = other.platformType;
onlineStatus = other.onlineStatus;
simpleAvatarInfo.copyFrom(other.simpleAvatarInfo);
@@ -569,6 +612,9 @@ public final class SimpleInfoOuterClass {
if (other.hasUid()) {
setUid(other.uid);
}
if (other.hasChatBubbleId()) {
setChatBubbleId(other.chatBubbleId);
}
if (other.hasPlatformType()) {
setPlatformTypeValue(other.platformType);
}
@@ -598,6 +644,7 @@ public final class SimpleInfoOuterClass {
level = 0;
headIcon = 0;
uid = 0;
chatBubbleId = 0;
platformType = 0;
onlineStatus = 0;
simpleAvatarInfo.clear();
@@ -633,6 +680,7 @@ public final class SimpleInfoOuterClass {
&& (!hasLevel() || level == other.level)
&& (!hasHeadIcon() || headIcon == other.headIcon)
&& (!hasUid() || uid == other.uid)
&& (!hasChatBubbleId() || chatBubbleId == other.chatBubbleId)
&& (!hasPlatformType() || platformType == other.platformType)
&& (!hasOnlineStatus() || onlineStatus == other.onlineStatus)
&& (!hasSimpleAvatarInfo() || simpleAvatarInfo.equals(other.simpleAvatarInfo))
@@ -659,22 +707,26 @@ public final class SimpleInfoOuterClass {
output.writeUInt32NoTag(uid);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeRawByte((byte) 104);
output.writeUInt32NoTag(chatBubbleId);
}
if ((bitField0_ & 0x00000020) != 0) {
output.writeRawByte((byte) 56);
output.writeEnumNoTag(platformType);
}
if ((bitField0_ & 0x00000020) != 0) {
if ((bitField0_ & 0x00000040) != 0) {
output.writeRawByte((byte) 120);
output.writeEnumNoTag(onlineStatus);
}
if ((bitField0_ & 0x00000040) != 0) {
if ((bitField0_ & 0x00000080) != 0) {
output.writeRawByte((byte) 26);
output.writeMessageNoTag(simpleAvatarInfo);
}
if ((bitField0_ & 0x00000080) != 0) {
if ((bitField0_ & 0x00000100) != 0) {
output.writeRawByte((byte) 34);
output.writeStringNoTag(nickname);
}
if ((bitField0_ & 0x00000100) != 0) {
if ((bitField0_ & 0x00000200) != 0) {
output.writeRawByte((byte) 74);
output.writeStringNoTag(signature);
}
@@ -696,18 +748,21 @@ public final class SimpleInfoOuterClass {
size += 1 + ProtoSink.computeUInt32SizeNoTag(uid);
}
if ((bitField0_ & 0x00000010) != 0) {
size += 1 + ProtoSink.computeEnumSizeNoTag(platformType);
size += 1 + ProtoSink.computeUInt32SizeNoTag(chatBubbleId);
}
if ((bitField0_ & 0x00000020) != 0) {
size += 1 + ProtoSink.computeEnumSizeNoTag(onlineStatus);
size += 1 + ProtoSink.computeEnumSizeNoTag(platformType);
}
if ((bitField0_ & 0x00000040) != 0) {
size += 1 + ProtoSink.computeMessageSizeNoTag(simpleAvatarInfo);
size += 1 + ProtoSink.computeEnumSizeNoTag(onlineStatus);
}
if ((bitField0_ & 0x00000080) != 0) {
size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
size += 1 + ProtoSink.computeMessageSizeNoTag(simpleAvatarInfo);
}
if ((bitField0_ & 0x00000100) != 0) {
size += 1 + ProtoSink.computeStringSizeNoTag(nickname);
}
if ((bitField0_ & 0x00000200) != 0) {
size += 1 + ProtoSink.computeStringSizeNoTag(signature);
}
return size;
@@ -752,6 +807,15 @@ public final class SimpleInfoOuterClass {
uid = input.readUInt32();
bitField0_ |= 0x00000008;
tag = input.readTag();
if (tag != 104) {
break;
}
}
case 104: {
// chatBubbleId
chatBubbleId = input.readUInt32();
bitField0_ |= 0x00000010;
tag = input.readTag();
if (tag != 56) {
break;
}
@@ -761,7 +825,7 @@ public final class SimpleInfoOuterClass {
final int value = input.readInt32();
if (PlatformTypeOuterClass.PlatformType.forNumber(value) != null) {
platformType = value;
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000020;
}
tag = input.readTag();
if (tag != 120) {
@@ -773,7 +837,7 @@ public final class SimpleInfoOuterClass {
final int value = input.readInt32();
if (FriendOnlineStatusOuterClass.FriendOnlineStatus.forNumber(value) != null) {
onlineStatus = value;
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000040;
}
tag = input.readTag();
if (tag != 26) {
@@ -783,7 +847,7 @@ public final class SimpleInfoOuterClass {
case 26: {
// simpleAvatarInfo
input.readMessage(simpleAvatarInfo);
bitField0_ |= 0x00000040;
bitField0_ |= 0x00000080;
tag = input.readTag();
if (tag != 34) {
break;
@@ -792,7 +856,7 @@ public final class SimpleInfoOuterClass {
case 34: {
// nickname
input.readString(nickname);
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
tag = input.readTag();
if (tag != 74) {
break;
@@ -801,7 +865,7 @@ public final class SimpleInfoOuterClass {
case 74: {
// signature
input.readString(signature);
bitField0_ |= 0x00000100;
bitField0_ |= 0x00000200;
tag = input.readTag();
if (tag != 0) {
break;
@@ -837,18 +901,21 @@ public final class SimpleInfoOuterClass {
output.writeUInt32(FieldNames.uid, uid);
}
if ((bitField0_ & 0x00000010) != 0) {
output.writeEnum(FieldNames.platformType, platformType, PlatformTypeOuterClass.PlatformType.converter());
output.writeUInt32(FieldNames.chatBubbleId, chatBubbleId);
}
if ((bitField0_ & 0x00000020) != 0) {
output.writeEnum(FieldNames.onlineStatus, onlineStatus, FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
output.writeEnum(FieldNames.platformType, platformType, PlatformTypeOuterClass.PlatformType.converter());
}
if ((bitField0_ & 0x00000040) != 0) {
output.writeMessage(FieldNames.simpleAvatarInfo, simpleAvatarInfo);
output.writeEnum(FieldNames.onlineStatus, onlineStatus, FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
}
if ((bitField0_ & 0x00000080) != 0) {
output.writeString(FieldNames.nickname, nickname);
output.writeMessage(FieldNames.simpleAvatarInfo, simpleAvatarInfo);
}
if ((bitField0_ & 0x00000100) != 0) {
output.writeString(FieldNames.nickname, nickname);
}
if ((bitField0_ & 0x00000200) != 0) {
output.writeString(FieldNames.signature, signature);
}
output.endObject();
@@ -907,6 +974,18 @@ public final class SimpleInfoOuterClass {
}
break;
}
case -678761921:
case 1892426119: {
if (input.isAtField(FieldNames.chatBubbleId)) {
if (!input.trySkipNullValue()) {
chatBubbleId = input.readUInt32();
bitField0_ |= 0x00000010;
}
} else {
input.skipUnknownField();
}
break;
}
case 155581005:
case 538062726: {
if (input.isAtField(FieldNames.platformType)) {
@@ -914,7 +993,7 @@ public final class SimpleInfoOuterClass {
final PlatformTypeOuterClass.PlatformType value = input.readEnum(PlatformTypeOuterClass.PlatformType.converter());
if (value != null) {
platformType = value.getNumber();
bitField0_ |= 0x00000010;
bitField0_ |= 0x00000020;
} else {
input.skipUnknownEnumValue();
}
@@ -931,7 +1010,7 @@ public final class SimpleInfoOuterClass {
final FriendOnlineStatusOuterClass.FriendOnlineStatus value = input.readEnum(FriendOnlineStatusOuterClass.FriendOnlineStatus.converter());
if (value != null) {
onlineStatus = value.getNumber();
bitField0_ |= 0x00000020;
bitField0_ |= 0x00000040;
} else {
input.skipUnknownEnumValue();
}
@@ -946,7 +1025,7 @@ public final class SimpleInfoOuterClass {
if (input.isAtField(FieldNames.simpleAvatarInfo)) {
if (!input.trySkipNullValue()) {
input.readMessage(simpleAvatarInfo);
bitField0_ |= 0x00000040;
bitField0_ |= 0x00000080;
}
} else {
input.skipUnknownField();
@@ -957,7 +1036,7 @@ public final class SimpleInfoOuterClass {
if (input.isAtField(FieldNames.nickname)) {
if (!input.trySkipNullValue()) {
input.readString(nickname);
bitField0_ |= 0x00000080;
bitField0_ |= 0x00000100;
}
} else {
input.skipUnknownField();
@@ -968,7 +1047,7 @@ public final class SimpleInfoOuterClass {
if (input.isAtField(FieldNames.signature)) {
if (!input.trySkipNullValue()) {
input.readString(signature);
bitField0_ |= 0x00000100;
bitField0_ |= 0x00000200;
}
} else {
input.skipUnknownField();
@@ -1035,6 +1114,8 @@ public final class SimpleInfoOuterClass {
static final FieldName uid = FieldName.forField("uid");
static final FieldName chatBubbleId = FieldName.forField("chatBubbleId", "chat_bubble_id");
static final FieldName platformType = FieldName.forField("platformType", "platform_type");
static final FieldName onlineStatus = FieldName.forField("onlineStatus", "online_status");

View File

@@ -0,0 +1,301 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
public final class TextJoinQueryCsReqOuterClass {
/**
* Protobuf type {@code TextJoinQueryCsReq}
*/
public static final class TextJoinQueryCsReq extends ProtoMessage<TextJoinQueryCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>repeated uint32 text_join_id_list = 7;</code>
*/
private final RepeatedInt textJoinIdList = RepeatedInt.newEmptyInstance();
private TextJoinQueryCsReq() {
}
/**
* @return a new empty instance of {@code TextJoinQueryCsReq}
*/
public static TextJoinQueryCsReq newInstance() {
return new TextJoinQueryCsReq();
}
/**
* <code>repeated uint32 text_join_id_list = 7;</code>
* @return whether the textJoinIdList field is set
*/
public boolean hasTextJoinIdList() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>repeated uint32 text_join_id_list = 7;</code>
* @return this
*/
public TextJoinQueryCsReq clearTextJoinIdList() {
bitField0_ &= ~0x00000001;
textJoinIdList.clear();
return this;
}
/**
* <code>repeated uint32 text_join_id_list = 7;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableTextJoinIdList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getTextJoinIdList() {
return textJoinIdList;
}
/**
* <code>repeated uint32 text_join_id_list = 7;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableTextJoinIdList() {
bitField0_ |= 0x00000001;
return textJoinIdList;
}
/**
* <code>repeated uint32 text_join_id_list = 7;</code>
* @param value the textJoinIdList to add
* @return this
*/
public TextJoinQueryCsReq addTextJoinIdList(final int value) {
bitField0_ |= 0x00000001;
textJoinIdList.add(value);
return this;
}
/**
* <code>repeated uint32 text_join_id_list = 7;</code>
* @param values the textJoinIdList to add
* @return this
*/
public TextJoinQueryCsReq addAllTextJoinIdList(final int... values) {
bitField0_ |= 0x00000001;
textJoinIdList.addAll(values);
return this;
}
@Override
public TextJoinQueryCsReq copyFrom(final TextJoinQueryCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
textJoinIdList.copyFrom(other.textJoinIdList);
}
return this;
}
@Override
public TextJoinQueryCsReq mergeFrom(final TextJoinQueryCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasTextJoinIdList()) {
getMutableTextJoinIdList().addAll(other.textJoinIdList);
}
return this;
}
@Override
public TextJoinQueryCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
textJoinIdList.clear();
return this;
}
@Override
public TextJoinQueryCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
textJoinIdList.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TextJoinQueryCsReq)) {
return false;
}
TextJoinQueryCsReq other = (TextJoinQueryCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasTextJoinIdList() || textJoinIdList.equals(other.textJoinIdList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
for (int i = 0; i < textJoinIdList.length(); i++) {
output.writeRawByte((byte) 56);
output.writeUInt32NoTag(textJoinIdList.array()[i]);
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += (1 * textJoinIdList.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(textJoinIdList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public TextJoinQueryCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 58: {
// textJoinIdList [packed=true]
input.readPackedUInt32(textJoinIdList, tag);
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 56: {
// textJoinIdList [packed=false]
tag = input.readRepeatedUInt32(textJoinIdList, tag);
bitField0_ |= 0x00000001;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeRepeatedUInt32(FieldNames.textJoinIdList, textJoinIdList);
}
output.endObject();
}
@Override
public TextJoinQueryCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1149123376:
case 449627391: {
if (input.isAtField(FieldNames.textJoinIdList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(textJoinIdList);
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public TextJoinQueryCsReq clone() {
return new TextJoinQueryCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static TextJoinQueryCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new TextJoinQueryCsReq(), data).checkInitialized();
}
public static TextJoinQueryCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new TextJoinQueryCsReq(), input).checkInitialized();
}
public static TextJoinQueryCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new TextJoinQueryCsReq(), input).checkInitialized();
}
/**
* @return factory for creating TextJoinQueryCsReq messages
*/
public static MessageFactory<TextJoinQueryCsReq> getFactory() {
return TextJoinQueryCsReqFactory.INSTANCE;
}
private enum TextJoinQueryCsReqFactory implements MessageFactory<TextJoinQueryCsReq> {
INSTANCE;
@Override
public TextJoinQueryCsReq create() {
return TextJoinQueryCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName textJoinIdList = FieldName.forField("textJoinIdList", "text_join_id_list");
}
}
}

View File

@@ -0,0 +1,701 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedMessage;
public final class TextJoinQueryScRspOuterClass {
/**
* Protobuf type {@code TextJoinQueryScRsp}
*/
public static final class TextJoinQueryScRsp extends ProtoMessage<TextJoinQueryScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 retcode = 13;</code>
*/
private int retcode;
/**
* <code>repeated .TextJoinQueryScRsp.TextJoinInfo text_join_list = 4;</code>
*/
private final RepeatedMessage<TextJoinInfo> textJoinList = RepeatedMessage.newEmptyInstance(TextJoinInfo.getFactory());
private TextJoinQueryScRsp() {
}
/**
* @return a new empty instance of {@code TextJoinQueryScRsp}
*/
public static TextJoinQueryScRsp newInstance() {
return new TextJoinQueryScRsp();
}
/**
* <code>optional uint32 retcode = 13;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 retcode = 13;</code>
* @return this
*/
public TextJoinQueryScRsp clearRetcode() {
bitField0_ &= ~0x00000001;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 13;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 13;</code>
* @param value the retcode to set
* @return this
*/
public TextJoinQueryScRsp setRetcode(final int value) {
bitField0_ |= 0x00000001;
retcode = value;
return this;
}
/**
* <code>repeated .TextJoinQueryScRsp.TextJoinInfo text_join_list = 4;</code>
* @return whether the textJoinList field is set
*/
public boolean hasTextJoinList() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>repeated .TextJoinQueryScRsp.TextJoinInfo text_join_list = 4;</code>
* @return this
*/
public TextJoinQueryScRsp clearTextJoinList() {
bitField0_ &= ~0x00000002;
textJoinList.clear();
return this;
}
/**
* <code>repeated .TextJoinQueryScRsp.TextJoinInfo text_join_list = 4;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableTextJoinList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<TextJoinInfo> getTextJoinList() {
return textJoinList;
}
/**
* <code>repeated .TextJoinQueryScRsp.TextJoinInfo text_join_list = 4;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<TextJoinInfo> getMutableTextJoinList() {
bitField0_ |= 0x00000002;
return textJoinList;
}
/**
* <code>repeated .TextJoinQueryScRsp.TextJoinInfo text_join_list = 4;</code>
* @param value the textJoinList to add
* @return this
*/
public TextJoinQueryScRsp addTextJoinList(final TextJoinInfo value) {
bitField0_ |= 0x00000002;
textJoinList.add(value);
return this;
}
/**
* <code>repeated .TextJoinQueryScRsp.TextJoinInfo text_join_list = 4;</code>
* @param values the textJoinList to add
* @return this
*/
public TextJoinQueryScRsp addAllTextJoinList(final TextJoinInfo... values) {
bitField0_ |= 0x00000002;
textJoinList.addAll(values);
return this;
}
@Override
public TextJoinQueryScRsp copyFrom(final TextJoinQueryScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
retcode = other.retcode;
textJoinList.copyFrom(other.textJoinList);
}
return this;
}
@Override
public TextJoinQueryScRsp mergeFrom(final TextJoinQueryScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasTextJoinList()) {
getMutableTextJoinList().addAll(other.textJoinList);
}
return this;
}
@Override
public TextJoinQueryScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
retcode = 0;
textJoinList.clear();
return this;
}
@Override
public TextJoinQueryScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
textJoinList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TextJoinQueryScRsp)) {
return false;
}
TextJoinQueryScRsp other = (TextJoinQueryScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasTextJoinList() || textJoinList.equals(other.textJoinList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 104);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
for (int i = 0; i < textJoinList.length(); i++) {
output.writeRawByte((byte) 34);
output.writeMessageNoTag(textJoinList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
size += (1 * textJoinList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(textJoinList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public TextJoinQueryScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 104: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 34) {
break;
}
}
case 34: {
// textJoinList
tag = input.readRepeatedMessage(textJoinList, tag);
bitField0_ |= 0x00000002;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRepeatedMessage(FieldNames.textJoinList, textJoinList);
}
output.endObject();
}
@Override
public TextJoinQueryScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1670215371:
case 249668097: {
if (input.isAtField(FieldNames.textJoinList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(textJoinList);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public TextJoinQueryScRsp clone() {
return new TextJoinQueryScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static TextJoinQueryScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new TextJoinQueryScRsp(), data).checkInitialized();
}
public static TextJoinQueryScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new TextJoinQueryScRsp(), input).checkInitialized();
}
public static TextJoinQueryScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new TextJoinQueryScRsp(), input).checkInitialized();
}
/**
* @return factory for creating TextJoinQueryScRsp messages
*/
public static MessageFactory<TextJoinQueryScRsp> getFactory() {
return TextJoinQueryScRspFactory.INSTANCE;
}
/**
* Protobuf type {@code TextJoinInfo}
*/
public static final class TextJoinInfo extends ProtoMessage<TextJoinInfo> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 text_item_id = 2;</code>
*/
private int textItemId;
/**
* <code>optional uint32 text_item_config_id = 3;</code>
*/
private int textItemConfigId;
private TextJoinInfo() {
}
/**
* @return a new empty instance of {@code TextJoinInfo}
*/
public static TextJoinInfo newInstance() {
return new TextJoinInfo();
}
/**
* <code>optional uint32 text_item_id = 2;</code>
* @return whether the textItemId field is set
*/
public boolean hasTextItemId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 text_item_id = 2;</code>
* @return this
*/
public TextJoinInfo clearTextItemId() {
bitField0_ &= ~0x00000001;
textItemId = 0;
return this;
}
/**
* <code>optional uint32 text_item_id = 2;</code>
* @return the textItemId
*/
public int getTextItemId() {
return textItemId;
}
/**
* <code>optional uint32 text_item_id = 2;</code>
* @param value the textItemId to set
* @return this
*/
public TextJoinInfo setTextItemId(final int value) {
bitField0_ |= 0x00000001;
textItemId = value;
return this;
}
/**
* <code>optional uint32 text_item_config_id = 3;</code>
* @return whether the textItemConfigId field is set
*/
public boolean hasTextItemConfigId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 text_item_config_id = 3;</code>
* @return this
*/
public TextJoinInfo clearTextItemConfigId() {
bitField0_ &= ~0x00000002;
textItemConfigId = 0;
return this;
}
/**
* <code>optional uint32 text_item_config_id = 3;</code>
* @return the textItemConfigId
*/
public int getTextItemConfigId() {
return textItemConfigId;
}
/**
* <code>optional uint32 text_item_config_id = 3;</code>
* @param value the textItemConfigId to set
* @return this
*/
public TextJoinInfo setTextItemConfigId(final int value) {
bitField0_ |= 0x00000002;
textItemConfigId = value;
return this;
}
@Override
public TextJoinInfo copyFrom(final TextJoinInfo other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
textItemId = other.textItemId;
textItemConfigId = other.textItemConfigId;
}
return this;
}
@Override
public TextJoinInfo mergeFrom(final TextJoinInfo other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasTextItemId()) {
setTextItemId(other.textItemId);
}
if (other.hasTextItemConfigId()) {
setTextItemConfigId(other.textItemConfigId);
}
return this;
}
@Override
public TextJoinInfo clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
textItemId = 0;
textItemConfigId = 0;
return this;
}
@Override
public TextJoinInfo clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof TextJoinInfo)) {
return false;
}
TextJoinInfo other = (TextJoinInfo) o;
return bitField0_ == other.bitField0_
&& (!hasTextItemId() || textItemId == other.textItemId)
&& (!hasTextItemConfigId() || textItemConfigId == other.textItemConfigId);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 16);
output.writeUInt32NoTag(textItemId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(textItemConfigId);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(textItemId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(textItemConfigId);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public TextJoinInfo mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 16: {
// textItemId
textItemId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 24) {
break;
}
}
case 24: {
// textItemConfigId
textItemConfigId = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.textItemId, textItemId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.textItemConfigId, textItemConfigId);
}
output.endObject();
}
@Override
public TextJoinInfo mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1565189915:
case -153409355: {
if (input.isAtField(FieldNames.textItemId)) {
if (!input.trySkipNullValue()) {
textItemId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -1448403459:
case -1174236578: {
if (input.isAtField(FieldNames.textItemConfigId)) {
if (!input.trySkipNullValue()) {
textItemConfigId = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public TextJoinInfo clone() {
return new TextJoinInfo().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static TextJoinInfo parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new TextJoinInfo(), data).checkInitialized();
}
public static TextJoinInfo parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new TextJoinInfo(), input).checkInitialized();
}
public static TextJoinInfo parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new TextJoinInfo(), input).checkInitialized();
}
/**
* @return factory for creating TextJoinInfo messages
*/
public static MessageFactory<TextJoinInfo> getFactory() {
return TextJoinInfoFactory.INSTANCE;
}
private enum TextJoinInfoFactory implements MessageFactory<TextJoinInfo> {
INSTANCE;
@Override
public TextJoinInfo create() {
return TextJoinInfo.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName textItemId = FieldName.forField("textItemId", "text_item_id");
static final FieldName textItemConfigId = FieldName.forField("textItemConfigId", "text_item_config_id");
}
}
private enum TextJoinQueryScRspFactory implements MessageFactory<TextJoinQueryScRsp> {
INSTANCE;
@Override
public TextJoinQueryScRsp create() {
return TextJoinQueryScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName textJoinList = FieldName.forField("textJoinList", "text_join_list");
}
}
}

View File

@@ -0,0 +1,301 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
public final class UnlockBackGroundMusicCsReqOuterClass {
/**
* Protobuf type {@code UnlockBackGroundMusicCsReq}
*/
public static final class UnlockBackGroundMusicCsReq extends ProtoMessage<UnlockBackGroundMusicCsReq> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>repeated uint32 unlock_ids = 11;</code>
*/
private final RepeatedInt unlockIds = RepeatedInt.newEmptyInstance();
private UnlockBackGroundMusicCsReq() {
}
/**
* @return a new empty instance of {@code UnlockBackGroundMusicCsReq}
*/
public static UnlockBackGroundMusicCsReq newInstance() {
return new UnlockBackGroundMusicCsReq();
}
/**
* <code>repeated uint32 unlock_ids = 11;</code>
* @return whether the unlockIds field is set
*/
public boolean hasUnlockIds() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>repeated uint32 unlock_ids = 11;</code>
* @return this
*/
public UnlockBackGroundMusicCsReq clearUnlockIds() {
bitField0_ &= ~0x00000001;
unlockIds.clear();
return this;
}
/**
* <code>repeated uint32 unlock_ids = 11;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableUnlockIds()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getUnlockIds() {
return unlockIds;
}
/**
* <code>repeated uint32 unlock_ids = 11;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableUnlockIds() {
bitField0_ |= 0x00000001;
return unlockIds;
}
/**
* <code>repeated uint32 unlock_ids = 11;</code>
* @param value the unlockIds to add
* @return this
*/
public UnlockBackGroundMusicCsReq addUnlockIds(final int value) {
bitField0_ |= 0x00000001;
unlockIds.add(value);
return this;
}
/**
* <code>repeated uint32 unlock_ids = 11;</code>
* @param values the unlockIds to add
* @return this
*/
public UnlockBackGroundMusicCsReq addAllUnlockIds(final int... values) {
bitField0_ |= 0x00000001;
unlockIds.addAll(values);
return this;
}
@Override
public UnlockBackGroundMusicCsReq copyFrom(final UnlockBackGroundMusicCsReq other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
unlockIds.copyFrom(other.unlockIds);
}
return this;
}
@Override
public UnlockBackGroundMusicCsReq mergeFrom(final UnlockBackGroundMusicCsReq other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasUnlockIds()) {
getMutableUnlockIds().addAll(other.unlockIds);
}
return this;
}
@Override
public UnlockBackGroundMusicCsReq clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
unlockIds.clear();
return this;
}
@Override
public UnlockBackGroundMusicCsReq clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
unlockIds.clear();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof UnlockBackGroundMusicCsReq)) {
return false;
}
UnlockBackGroundMusicCsReq other = (UnlockBackGroundMusicCsReq) o;
return bitField0_ == other.bitField0_
&& (!hasUnlockIds() || unlockIds.equals(other.unlockIds));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
for (int i = 0; i < unlockIds.length(); i++) {
output.writeRawByte((byte) 88);
output.writeUInt32NoTag(unlockIds.array()[i]);
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += (1 * unlockIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(unlockIds);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public UnlockBackGroundMusicCsReq mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 90: {
// unlockIds [packed=true]
input.readPackedUInt32(unlockIds, tag);
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 88: {
// unlockIds [packed=false]
tag = input.readRepeatedUInt32(unlockIds, tag);
bitField0_ |= 0x00000001;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeRepeatedUInt32(FieldNames.unlockIds, unlockIds);
}
output.endObject();
}
@Override
public UnlockBackGroundMusicCsReq mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 2050476244:
case -859086019: {
if (input.isAtField(FieldNames.unlockIds)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(unlockIds);
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public UnlockBackGroundMusicCsReq clone() {
return new UnlockBackGroundMusicCsReq().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static UnlockBackGroundMusicCsReq parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicCsReq(), data).checkInitialized();
}
public static UnlockBackGroundMusicCsReq parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicCsReq(), input).checkInitialized();
}
public static UnlockBackGroundMusicCsReq parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicCsReq(), input).checkInitialized();
}
/**
* @return factory for creating UnlockBackGroundMusicCsReq messages
*/
public static MessageFactory<UnlockBackGroundMusicCsReq> getFactory() {
return UnlockBackGroundMusicCsReqFactory.INSTANCE;
}
private enum UnlockBackGroundMusicCsReqFactory implements MessageFactory<UnlockBackGroundMusicCsReq> {
INSTANCE;
@Override
public UnlockBackGroundMusicCsReq create() {
return UnlockBackGroundMusicCsReq.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName unlockIds = FieldName.forField("unlockIds", "unlock_ids");
}
}
}

View File

@@ -0,0 +1,902 @@
// Code generated by protocol buffer compiler. Do not edit!
package emu.lunarcore.proto;
import java.io.IOException;
import us.hebi.quickbuf.FieldName;
import us.hebi.quickbuf.InvalidProtocolBufferException;
import us.hebi.quickbuf.JsonSink;
import us.hebi.quickbuf.JsonSource;
import us.hebi.quickbuf.MessageFactory;
import us.hebi.quickbuf.ProtoMessage;
import us.hebi.quickbuf.ProtoSink;
import us.hebi.quickbuf.ProtoSource;
import us.hebi.quickbuf.RepeatedInt;
import us.hebi.quickbuf.RepeatedMessage;
public final class UnlockBackGroundMusicScRspOuterClass {
/**
* Protobuf type {@code UnlockBackGroundMusicScRsp}
*/
public static final class UnlockBackGroundMusicScRsp extends ProtoMessage<UnlockBackGroundMusicScRsp> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 retcode = 12;</code>
*/
private int retcode;
/**
* <code>repeated uint32 unlocked_ids = 3;</code>
*/
private final RepeatedInt unlockedIds = RepeatedInt.newEmptyInstance();
/**
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
*/
private final RepeatedMessage<UnlockedMusic> musicList = RepeatedMessage.newEmptyInstance(UnlockedMusic.getFactory());
private UnlockBackGroundMusicScRsp() {
}
/**
* @return a new empty instance of {@code UnlockBackGroundMusicScRsp}
*/
public static UnlockBackGroundMusicScRsp newInstance() {
return new UnlockBackGroundMusicScRsp();
}
/**
* <code>optional uint32 retcode = 12;</code>
* @return whether the retcode field is set
*/
public boolean hasRetcode() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 retcode = 12;</code>
* @return this
*/
public UnlockBackGroundMusicScRsp clearRetcode() {
bitField0_ &= ~0x00000001;
retcode = 0;
return this;
}
/**
* <code>optional uint32 retcode = 12;</code>
* @return the retcode
*/
public int getRetcode() {
return retcode;
}
/**
* <code>optional uint32 retcode = 12;</code>
* @param value the retcode to set
* @return this
*/
public UnlockBackGroundMusicScRsp setRetcode(final int value) {
bitField0_ |= 0x00000001;
retcode = value;
return this;
}
/**
* <code>repeated uint32 unlocked_ids = 3;</code>
* @return whether the unlockedIds field is set
*/
public boolean hasUnlockedIds() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>repeated uint32 unlocked_ids = 3;</code>
* @return this
*/
public UnlockBackGroundMusicScRsp clearUnlockedIds() {
bitField0_ &= ~0x00000002;
unlockedIds.clear();
return this;
}
/**
* <code>repeated uint32 unlocked_ids = 3;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableUnlockedIds()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedInt getUnlockedIds() {
return unlockedIds;
}
/**
* <code>repeated uint32 unlocked_ids = 3;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedInt getMutableUnlockedIds() {
bitField0_ |= 0x00000002;
return unlockedIds;
}
/**
* <code>repeated uint32 unlocked_ids = 3;</code>
* @param value the unlockedIds to add
* @return this
*/
public UnlockBackGroundMusicScRsp addUnlockedIds(final int value) {
bitField0_ |= 0x00000002;
unlockedIds.add(value);
return this;
}
/**
* <code>repeated uint32 unlocked_ids = 3;</code>
* @param values the unlockedIds to add
* @return this
*/
public UnlockBackGroundMusicScRsp addAllUnlockedIds(final int... values) {
bitField0_ |= 0x00000002;
unlockedIds.addAll(values);
return this;
}
/**
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
* @return whether the musicList field is set
*/
public boolean hasMusicList() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
* @return this
*/
public UnlockBackGroundMusicScRsp clearMusicList() {
bitField0_ &= ~0x00000004;
musicList.clear();
return this;
}
/**
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
*
* This method returns the internal storage object without modifying any has state.
* The returned object should not be modified and be treated as read-only.
*
* Use {@link #getMutableMusicList()} if you want to modify it.
*
* @return internal storage object for reading
*/
public RepeatedMessage<UnlockedMusic> getMusicList() {
return musicList;
}
/**
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
*
* This method returns the internal storage object and sets the corresponding
* has state. The returned object will become part of this message and its
* contents may be modified as long as the has state is not cleared.
*
* @return internal storage object for modifications
*/
public RepeatedMessage<UnlockedMusic> getMutableMusicList() {
bitField0_ |= 0x00000004;
return musicList;
}
/**
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
* @param value the musicList to add
* @return this
*/
public UnlockBackGroundMusicScRsp addMusicList(final UnlockedMusic value) {
bitField0_ |= 0x00000004;
musicList.add(value);
return this;
}
/**
* <code>repeated .UnlockBackGroundMusicScRsp.UnlockedMusic music_list = 6;</code>
* @param values the musicList to add
* @return this
*/
public UnlockBackGroundMusicScRsp addAllMusicList(final UnlockedMusic... values) {
bitField0_ |= 0x00000004;
musicList.addAll(values);
return this;
}
@Override
public UnlockBackGroundMusicScRsp copyFrom(final UnlockBackGroundMusicScRsp other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
retcode = other.retcode;
unlockedIds.copyFrom(other.unlockedIds);
musicList.copyFrom(other.musicList);
}
return this;
}
@Override
public UnlockBackGroundMusicScRsp mergeFrom(final UnlockBackGroundMusicScRsp other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasRetcode()) {
setRetcode(other.retcode);
}
if (other.hasUnlockedIds()) {
getMutableUnlockedIds().addAll(other.unlockedIds);
}
if (other.hasMusicList()) {
getMutableMusicList().addAll(other.musicList);
}
return this;
}
@Override
public UnlockBackGroundMusicScRsp clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
retcode = 0;
unlockedIds.clear();
musicList.clear();
return this;
}
@Override
public UnlockBackGroundMusicScRsp clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
unlockedIds.clear();
musicList.clearQuick();
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof UnlockBackGroundMusicScRsp)) {
return false;
}
UnlockBackGroundMusicScRsp other = (UnlockBackGroundMusicScRsp) o;
return bitField0_ == other.bitField0_
&& (!hasRetcode() || retcode == other.retcode)
&& (!hasUnlockedIds() || unlockedIds.equals(other.unlockedIds))
&& (!hasMusicList() || musicList.equals(other.musicList));
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 96);
output.writeUInt32NoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
for (int i = 0; i < unlockedIds.length(); i++) {
output.writeRawByte((byte) 24);
output.writeUInt32NoTag(unlockedIds.array()[i]);
}
}
if ((bitField0_ & 0x00000004) != 0) {
for (int i = 0; i < musicList.length(); i++) {
output.writeRawByte((byte) 50);
output.writeMessageNoTag(musicList.get(i));
}
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
size += (1 * unlockedIds.length()) + ProtoSink.computeRepeatedUInt32SizeNoTag(unlockedIds);
}
if ((bitField0_ & 0x00000004) != 0) {
size += (1 * musicList.length()) + ProtoSink.computeRepeatedMessageSizeNoTag(musicList);
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public UnlockBackGroundMusicScRsp mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 96: {
// retcode
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 26) {
break;
}
}
case 26: {
// unlockedIds [packed=true]
input.readPackedUInt32(unlockedIds, tag);
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 50) {
break;
}
}
case 50: {
// musicList
tag = input.readRepeatedMessage(musicList, tag);
bitField0_ |= 0x00000004;
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
case 24: {
// unlockedIds [packed=false]
tag = input.readRepeatedUInt32(unlockedIds, tag);
bitField0_ |= 0x00000002;
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.retcode, retcode);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRepeatedUInt32(FieldNames.unlockedIds, unlockedIds);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRepeatedMessage(FieldNames.musicList, musicList);
}
output.endObject();
}
@Override
public UnlockBackGroundMusicScRsp mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 1097936398: {
if (input.isAtField(FieldNames.retcode)) {
if (!input.trySkipNullValue()) {
retcode = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case -856496939:
case -780941476: {
if (input.isAtField(FieldNames.unlockedIds)) {
if (!input.trySkipNullValue()) {
input.readRepeatedUInt32(unlockedIds);
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case 389904483:
case -780236168: {
if (input.isAtField(FieldNames.musicList)) {
if (!input.trySkipNullValue()) {
input.readRepeatedMessage(musicList);
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public UnlockBackGroundMusicScRsp clone() {
return new UnlockBackGroundMusicScRsp().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static UnlockBackGroundMusicScRsp parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicScRsp(), data).checkInitialized();
}
public static UnlockBackGroundMusicScRsp parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicScRsp(), input).checkInitialized();
}
public static UnlockBackGroundMusicScRsp parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockBackGroundMusicScRsp(), input).checkInitialized();
}
/**
* @return factory for creating UnlockBackGroundMusicScRsp messages
*/
public static MessageFactory<UnlockBackGroundMusicScRsp> getFactory() {
return UnlockBackGroundMusicScRspFactory.INSTANCE;
}
/**
* Protobuf type {@code UnlockedMusic}
*/
public static final class UnlockedMusic extends ProtoMessage<UnlockedMusic> implements Cloneable {
private static final long serialVersionUID = 0L;
/**
* <code>optional uint32 group_id = 1;</code>
*/
private int groupId;
/**
* <code>optional uint32 id = 8;</code>
*/
private int id;
/**
* <code>optional bool unkbool = 7;</code>
*/
private boolean unkbool;
private UnlockedMusic() {
}
/**
* @return a new empty instance of {@code UnlockedMusic}
*/
public static UnlockedMusic newInstance() {
return new UnlockedMusic();
}
/**
* <code>optional uint32 group_id = 1;</code>
* @return whether the groupId field is set
*/
public boolean hasGroupId() {
return (bitField0_ & 0x00000001) != 0;
}
/**
* <code>optional uint32 group_id = 1;</code>
* @return this
*/
public UnlockedMusic clearGroupId() {
bitField0_ &= ~0x00000001;
groupId = 0;
return this;
}
/**
* <code>optional uint32 group_id = 1;</code>
* @return the groupId
*/
public int getGroupId() {
return groupId;
}
/**
* <code>optional uint32 group_id = 1;</code>
* @param value the groupId to set
* @return this
*/
public UnlockedMusic setGroupId(final int value) {
bitField0_ |= 0x00000001;
groupId = value;
return this;
}
/**
* <code>optional uint32 id = 8;</code>
* @return whether the id field is set
*/
public boolean hasId() {
return (bitField0_ & 0x00000002) != 0;
}
/**
* <code>optional uint32 id = 8;</code>
* @return this
*/
public UnlockedMusic clearId() {
bitField0_ &= ~0x00000002;
id = 0;
return this;
}
/**
* <code>optional uint32 id = 8;</code>
* @return the id
*/
public int getId() {
return id;
}
/**
* <code>optional uint32 id = 8;</code>
* @param value the id to set
* @return this
*/
public UnlockedMusic setId(final int value) {
bitField0_ |= 0x00000002;
id = value;
return this;
}
/**
* <code>optional bool unkbool = 7;</code>
* @return whether the unkbool field is set
*/
public boolean hasUnkbool() {
return (bitField0_ & 0x00000004) != 0;
}
/**
* <code>optional bool unkbool = 7;</code>
* @return this
*/
public UnlockedMusic clearUnkbool() {
bitField0_ &= ~0x00000004;
unkbool = false;
return this;
}
/**
* <code>optional bool unkbool = 7;</code>
* @return the unkbool
*/
public boolean getUnkbool() {
return unkbool;
}
/**
* <code>optional bool unkbool = 7;</code>
* @param value the unkbool to set
* @return this
*/
public UnlockedMusic setUnkbool(final boolean value) {
bitField0_ |= 0x00000004;
unkbool = value;
return this;
}
@Override
public UnlockedMusic copyFrom(final UnlockedMusic other) {
cachedSize = other.cachedSize;
if ((bitField0_ | other.bitField0_) != 0) {
bitField0_ = other.bitField0_;
groupId = other.groupId;
id = other.id;
unkbool = other.unkbool;
}
return this;
}
@Override
public UnlockedMusic mergeFrom(final UnlockedMusic other) {
if (other.isEmpty()) {
return this;
}
cachedSize = -1;
if (other.hasGroupId()) {
setGroupId(other.groupId);
}
if (other.hasId()) {
setId(other.id);
}
if (other.hasUnkbool()) {
setUnkbool(other.unkbool);
}
return this;
}
@Override
public UnlockedMusic clear() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
groupId = 0;
id = 0;
unkbool = false;
return this;
}
@Override
public UnlockedMusic clearQuick() {
if (isEmpty()) {
return this;
}
cachedSize = -1;
bitField0_ = 0;
return this;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (!(o instanceof UnlockedMusic)) {
return false;
}
UnlockedMusic other = (UnlockedMusic) o;
return bitField0_ == other.bitField0_
&& (!hasGroupId() || groupId == other.groupId)
&& (!hasId() || id == other.id)
&& (!hasUnkbool() || unkbool == other.unkbool);
}
@Override
public void writeTo(final ProtoSink output) throws IOException {
if ((bitField0_ & 0x00000001) != 0) {
output.writeRawByte((byte) 8);
output.writeUInt32NoTag(groupId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeRawByte((byte) 64);
output.writeUInt32NoTag(id);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeRawByte((byte) 56);
output.writeBoolNoTag(unkbool);
}
}
@Override
protected int computeSerializedSize() {
int size = 0;
if ((bitField0_ & 0x00000001) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(groupId);
}
if ((bitField0_ & 0x00000002) != 0) {
size += 1 + ProtoSink.computeUInt32SizeNoTag(id);
}
if ((bitField0_ & 0x00000004) != 0) {
size += 2;
}
return size;
}
@Override
@SuppressWarnings("fallthrough")
public UnlockedMusic mergeFrom(final ProtoSource input) throws IOException {
// Enabled Fall-Through Optimization (QuickBuffers)
int tag = input.readTag();
while (true) {
switch (tag) {
case 8: {
// groupId
groupId = input.readUInt32();
bitField0_ |= 0x00000001;
tag = input.readTag();
if (tag != 64) {
break;
}
}
case 64: {
// id
id = input.readUInt32();
bitField0_ |= 0x00000002;
tag = input.readTag();
if (tag != 56) {
break;
}
}
case 56: {
// unkbool
unkbool = input.readBool();
bitField0_ |= 0x00000004;
tag = input.readTag();
if (tag != 0) {
break;
}
}
case 0: {
return this;
}
default: {
if (!input.skipField(tag)) {
return this;
}
tag = input.readTag();
break;
}
}
}
}
@Override
public void writeTo(final JsonSink output) throws IOException {
output.beginObject();
if ((bitField0_ & 0x00000001) != 0) {
output.writeUInt32(FieldNames.groupId, groupId);
}
if ((bitField0_ & 0x00000002) != 0) {
output.writeUInt32(FieldNames.id, id);
}
if ((bitField0_ & 0x00000004) != 0) {
output.writeBool(FieldNames.unkbool, unkbool);
}
output.endObject();
}
@Override
public UnlockedMusic mergeFrom(final JsonSource input) throws IOException {
if (!input.beginObject()) {
return this;
}
while (!input.isAtEnd()) {
switch (input.readFieldHash()) {
case 293428218:
case 506361563: {
if (input.isAtField(FieldNames.groupId)) {
if (!input.trySkipNullValue()) {
groupId = input.readUInt32();
bitField0_ |= 0x00000001;
}
} else {
input.skipUnknownField();
}
break;
}
case 3355: {
if (input.isAtField(FieldNames.id)) {
if (!input.trySkipNullValue()) {
id = input.readUInt32();
bitField0_ |= 0x00000002;
}
} else {
input.skipUnknownField();
}
break;
}
case -285198628: {
if (input.isAtField(FieldNames.unkbool)) {
if (!input.trySkipNullValue()) {
unkbool = input.readBool();
bitField0_ |= 0x00000004;
}
} else {
input.skipUnknownField();
}
break;
}
default: {
input.skipUnknownField();
break;
}
}
}
input.endObject();
return this;
}
@Override
public UnlockedMusic clone() {
return new UnlockedMusic().copyFrom(this);
}
@Override
public boolean isEmpty() {
return ((bitField0_) == 0);
}
public static UnlockedMusic parseFrom(final byte[] data) throws
InvalidProtocolBufferException {
return ProtoMessage.mergeFrom(new UnlockedMusic(), data).checkInitialized();
}
public static UnlockedMusic parseFrom(final ProtoSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
}
public static UnlockedMusic parseFrom(final JsonSource input) throws IOException {
return ProtoMessage.mergeFrom(new UnlockedMusic(), input).checkInitialized();
}
/**
* @return factory for creating UnlockedMusic messages
*/
public static MessageFactory<UnlockedMusic> getFactory() {
return UnlockedMusicFactory.INSTANCE;
}
private enum UnlockedMusicFactory implements MessageFactory<UnlockedMusic> {
INSTANCE;
@Override
public UnlockedMusic create() {
return UnlockedMusic.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName groupId = FieldName.forField("groupId", "group_id");
static final FieldName id = FieldName.forField("id");
static final FieldName unkbool = FieldName.forField("unkbool");
}
}
private enum UnlockBackGroundMusicScRspFactory implements MessageFactory<UnlockBackGroundMusicScRsp> {
INSTANCE;
@Override
public UnlockBackGroundMusicScRsp create() {
return UnlockBackGroundMusicScRsp.newInstance();
}
}
/**
* Contains name constants used for serializing JSON
*/
static class FieldNames {
static final FieldName retcode = FieldName.forField("retcode");
static final FieldName unlockedIds = FieldName.forField("unlockedIds", "unlocked_ids");
static final FieldName musicList = FieldName.forField("musicList", "music_list");
}
}
}

View File

@@ -86,13 +86,15 @@ public class Config {
@Getter
public static class ServerOptions {
public boolean autoCreateAccount = true;
public int entitySceneLimit = 2000;
public int sceneMaxEntites = 500;
public boolean spendStamina = true;
public boolean unlockAllChallenges = true;
public int staminaRecoveryRate = 5 * 60;
public int staminaReserveRecoveryRate = 18 * 60;
public String language = "EN";
public Set<String> defaultPermissions = Set.of("*");
public ServerProfile serverFriendInfo = new ServerProfile();
public WelcomeMail welcomeMail = new WelcomeMail();
public int getStaminaRecoveryRate() {
@@ -104,6 +106,17 @@ public class Config {
}
}
@Getter
public static class ServerProfile {
public String name = "Server";
public String signature = "Type /help for a list of commands";
public int level = 1;
public int headIcon = 201001;
public int chatBubbleId = 0;
public int displayAvatarId = 1001;
public int displayAvatarLevel = 1;
}
@Getter
public static class WelcomeMail {
public String title;
@@ -130,6 +143,7 @@ public class Config {
public boolean commands = true;
public boolean connections = true;
public boolean packets = false;
public boolean filterLoopingPackets = false;
}
@Getter

View File

@@ -18,20 +18,33 @@ public class GameConstants {
public static final int MAX_STAMINA = 240;
public static final int MAX_STAMINA_RESERVE = 2400;
public static final int MAX_AVATARS_IN_TEAM = 4;
public static final int MAX_FRIENDSHIPS = 100;
public static final int DEFAULT_TEAMS = 6;
public static final int MAX_MP = 5; // Client doesnt like more than 5
// Chat/Social
public static final int MAX_FRIENDSHIPS = 100;
public static final int MAX_CHAT_HISTORY = 100; // Max chat messages per conversation
// Inventory
public static final int MATERIAL_HCOIN_ID = 1; // Material id for jades. DO NOT CHANGE
public static final int MATERIAL_COIN_ID = 2; // Material id for credits. DO NOT CHANGE
public static final int TRAILBLAZER_EXP_ID = 22;
public static final int INVENTORY_MAX_EQUIPMENT = 1500;
public static final int INVENTORY_MAX_RELIC = 1500;
public static final int INVENTORY_MAX_MATERIAL = 2000;
// Start position
public static final int START_PLANE_ID = 20001;
public static final int START_FLOOR_ID = 20001001;
public static final int START_ENTRY_ID = 2000101;
public static final Position START_POS = new Position(99, 62, -4800);
public static final int MATERIAL_HCOIN_ID = 1; // Material id for jades. DO NOT CHANGE
public static final int MATERIAL_COIN_ID = 2; // Material id for credits. DO NOT CHANGE
public static final int TRAILBLAZER_EXP_ID = 22;
// Battle
public static final int BATTLE_AMBUSH_BUFF_ID = 1000102;
// Gacha
public static final int GACHA_CEILING_MAX = 300; // Yes, I know this is in an excel
// Challenge
public static final int CHALLENGE_ENTRANCE = 100000103;

View File

@@ -255,4 +255,6 @@ public class LunarCore {
return (this.flags & 0x2) == 0x2;
}
}
// Hiro was here
}

View File

@@ -12,4 +12,6 @@ public @interface Command {
public String desc() default "";
public String permission() default "";
public boolean requireTarget() default false;
}

View File

@@ -6,13 +6,17 @@ import emu.lunarcore.LunarCore;
import emu.lunarcore.data.GameData;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.inventory.GameItem;
import emu.lunarcore.game.inventory.GameItemSubAffix;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.util.Utils;
import it.unimi.dsi.fastutil.ints.Int2IntMap;
import it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap;
import lombok.Getter;
@Getter
public class CommandArgs {
private List<String> list;
private Player sender;
private Player target;
private int targetUid;
@@ -21,10 +25,12 @@ public class CommandArgs {
private int rank = -1;
private int promotion = -1;
private int stage = -1;
private Int2IntMap map;
private static String EMPTY_STRING = "";
public CommandArgs(Player sender, List<String> args) {
this.sender = sender;
this.list = args;
// Parse args. Maybe regex is better.
@@ -35,23 +41,37 @@ public class CommandArgs {
try {
if (arg.length() >= 2 && !Character.isDigit(arg.charAt(0)) && Character.isDigit(arg.charAt(arg.length() - 1))) {
if (arg.startsWith("@")) {
if (arg.startsWith("@")) { // Target UID
this.targetUid = Utils.parseSafeInt(arg.substring(1));
it.remove();
} else if (arg.startsWith("x")) {
} else if (arg.startsWith("x")) { // Amount
this.amount = Utils.parseSafeInt(arg.substring(1));
it.remove();
} else if (arg.startsWith("lv")) {
} else if (arg.startsWith("lv")) { // Level
this.level = Utils.parseSafeInt(arg.substring(2));
it.remove();
} else if (arg.startsWith("r")) {
} else if (arg.startsWith("r")) { // Rank
this.rank = Utils.parseSafeInt(arg.substring(1));
it.remove();
} else if (arg.startsWith("p")) {
} else if (arg.startsWith("e")) { // Eidolons
this.rank = Utils.parseSafeInt(arg.substring(1));
it.remove();
} else if (arg.startsWith("p")) { // Promotion
this.promotion = Utils.parseSafeInt(arg.substring(1));
it.remove();
} else if (arg.startsWith("s")) {
} else if (arg.startsWith("s")) { // Stage or Superimposition
this.stage = Utils.parseSafeInt(arg.substring(1));
it.remove();
}
} else if (arg.contains(":")) {
String[] split = arg.split(":");
if (split.length >= 2) {
int key = Integer.parseInt(split[0]);
int value = Integer.parseInt(split[1]);
if (this.map == null) this.map = new Int2IntOpenHashMap();
this.map.put(key, value);
it.remove();
}
}
@@ -85,6 +105,18 @@ public class CommandArgs {
return this.list.get(index);
}
/**
* Sends a message to the command sender
* @param message
*/
public void sendMessage(String message) {
if (sender != null) {
sender.sendMessage(message);
} else {
LunarCore.getLogger().info(message);
}
}
// Utility commands
/**
@@ -144,22 +176,60 @@ public class CommandArgs {
if (this.getLevel() > 0) {
item.setLevel(Math.min(this.getLevel(), 80));
item.setPromotion(Utils.getMinPromotionForLevel(item.getLevel()));
hasChanged = true;
}
// Try to set promotion
if (this.getPromotion() >= 0) {
item.setPromotion(Math.min(this.getPromotion(), item.getExcel().getEquipmentExcel().getMaxPromotion()));
hasChanged = true;
}
// Try to set rank (superimposition)
if (this.getRank() >= 0) {
item.setRank(Math.min(this.getRank(), item.getExcel().getEquipmentExcel().getMaxRank()));
hasChanged = true;
} else if (this.getStage() >= 0) {
item.setRank(Math.min(this.getStage(), item.getExcel().getEquipmentExcel().getMaxRank()));
hasChanged = true;
}
} else if (item.getExcel().isRelic()) {
// Sub stats
if (this.getMap() != null) {
item.resetSubAffixes();
hasChanged = true;
for (var entry : this.getMap().int2IntEntrySet()) {
if (entry.getIntValue() <= 0) continue;
var subAffix = GameData.getRelicSubAffixExcel(item.getExcel().getRelicExcel().getSubAffixGroup(), entry.getIntKey());
if (subAffix == null) continue;
item.getSubAffixes().add(new GameItemSubAffix(subAffix, entry.getIntValue()));
}
}
// Main stat
if (this.getStage() > 0) {
var mainAffix = GameData.getRelicMainAffixExcel(item.getExcel().getRelicExcel().getMainAffixGroup(), this.getStage());
if (mainAffix != null) {
item.setMainAffix(mainAffix.getAffixID());
hasChanged = true;
}
}
// Try to set level
if (this.getLevel() > 0) {
item.setLevel(Math.min(this.getLevel(), 15));
// TODO add substats
// Set relic level
item.setLevel(Math.min(this.getLevel(), 999));
// Apply sub stat upgrades to the relic
int upgrades = item.getMaxNormalSubAffixCount() - item.getCurrentSubAffixCount();
if (upgrades > 0) {
item.addSubAffixes(upgrades);
}
hasChanged = true;
}
}

View File

@@ -1,22 +1,15 @@
package emu.lunarcore.command;
import emu.lunarcore.LunarCore;
import emu.lunarcore.game.player.Player;
public interface CommandHandler {
public default Command getData() {
return this.getClass().getAnnotation(Command.class);
}
public default String getLabel() {
return this.getClass().getAnnotation(Command.class).label();
return getData().label();
}
public default void sendMessage(Player player, String message) {
if (player != null) {
player.sendMessage(message);
} else {
LunarCore.getLogger().info(message);
}
}
public void execute(Player sender, CommandArgs args);
public void execute(CommandArgs args);
}

View File

@@ -39,11 +39,12 @@ public class CommandManager {
}
}
/**
* Adds a command that players and server console users can use. Command handlers must have the proper command annotation attached to them.
*/
public CommandManager registerCommand(CommandHandler handler) {
Command command = handler.getClass().getAnnotation(Command.class);
if (command == null) {
return this;
}
if (command == null) return this;
this.getLabels().put(command.label(), handler);
this.getCommands().put(command.label(), handler);
@@ -55,11 +56,14 @@ public class CommandManager {
return this;
}
/**
* Removes a command from use.
* @param label The command name
* @return
*/
public CommandManager unregisterCommand(String label) {
CommandHandler handler = this.getLabels().get(label);
if (handler == null) {
return this;
}
if (handler == null) return this;
Command command = handler.getClass().getAnnotation(Command.class);
if (command == null) {
@@ -76,6 +80,12 @@ public class CommandManager {
return this;
}
/**
* Checks if the sender has permission to use this command. Will always return true if the sender is the server console.
* @param sender The sender of the command.
* @param command
* @return true if the sender has permission to use this command
*/
private boolean checkPermission(Player sender, Command command) {
if (sender == null || command.permission().isEmpty()) {
return true;
@@ -84,6 +94,12 @@ public class CommandManager {
return sender.getAccount().hasPermission(command.permission());
}
/**
* Checks if the sender has permission to use this command on other players. Will always return true if the sender is the server console.
* @param sender The sender of the command.
* @param command
* @return true if the sender has permission to use this command
*/
private boolean checkTargetPermission(Player sender, Command command) {
if (sender == null || command.permission().isEmpty()) {
return true;
@@ -93,44 +109,59 @@ public class CommandManager {
}
public void invoke(Player sender, String message) {
// Parse message into arguments
List<String> args = Arrays.stream(message.split(" ")).collect(Collectors.toCollection(ArrayList::new));
// Get command label
String label = args.remove(0).toLowerCase();
// Filter out command prefixes
if (label.startsWith("/") || label.startsWith("!")) {
label = label.substring(1);
}
// Get handler
// Get command handler
CommandHandler handler = this.commands.get(label);
// Execute
// Execute command
if (handler != null) {
// Command annotation data
Command command = handler.getClass().getAnnotation(Command.class);
// Check permission
if (this.checkPermission(sender, command)) {
// Check targeted permission
CommandArgs cmdArgs = new CommandArgs(sender, args);
if (sender != cmdArgs.getTarget() && !this.checkTargetPermission(sender, command)) {
handler.sendMessage(sender, "You do not have permission to use this command on another player.");
return;
}
// Log
if (sender != null && LunarCore.getConfig().getLogOptions().commands) {
LunarCore.getLogger().info("[UID: " + sender.getUid() + "] " + sender.getName() + " used command: " + message);
}
// Run command
handler.execute(sender, cmdArgs);
} else {
handler.sendMessage(sender, "You do not have permission to use this command.");
// Get command annotation data
Command command = handler.getData();
// Check if sender has permission to run the command.
if (sender != null && !this.checkPermission(sender, command)) {
// We have a double null check here just in case
sender.sendMessage("You do not have permission to use this command.");
return;
}
// Build command arguments
CommandArgs cmdArgs = new CommandArgs(sender, args);
// Check targeted permission
if (sender != cmdArgs.getTarget() && !this.checkTargetPermission(sender, command)) {
cmdArgs.sendMessage("You do not have permission to use this command on another player.");
return;
}
// Make sure our command has a target
if (command.requireTarget() && cmdArgs.getTarget() == null) {
cmdArgs.sendMessage("Error: Targeted player not found or offline");
return;
}
// Log
if (sender != null && LunarCore.getConfig().getLogOptions().commands) {
LunarCore.getLogger().info("[UID: " + sender.getUid() + "] " + sender.getName() + " used command: " + message);
}
// Run command
handler.execute(cmdArgs);
} else {
if (sender != null) {
sender.sendMessage("Inavlid Command!");
sender.sendMessage("Invalid Command!");
} else {
LunarCore.getLogger().info("Inavlid Command!");
LunarCore.getLogger().info("Invalid Command!");
}
}
}

View File

@@ -4,16 +4,15 @@ import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.account.AccountHelper;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.util.Utils;
@Command(label = "account", permission = "admin.account", desc = "/account {create | delete} [username] (reserved player uid). Creates or deletes an account.")
public class AccountCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
public void execute(CommandArgs args) {
if (args.size() < 2) {
this.sendMessage(sender, "Invalid amount of args");
args.sendMessage("Invalid amount of args");
return;
}
@@ -30,16 +29,16 @@ public class AccountCommand implements CommandHandler {
}
if (AccountHelper.createAccount(username, null, reservedUid) != null) {
this.sendMessage(sender, "Account created");
args.sendMessage("Account created");
} else {
this.sendMessage(sender, "Account already exists");
args.sendMessage("Account already exists");
}
}
case "delete" -> {
if (AccountHelper.deleteAccount(username)) {
this.sendMessage(sender, "Account deleted");
args.sendMessage("Account deleted");
} else {
this.sendMessage(sender, "Account doesnt exist");
args.sendMessage("Account doesnt exist");
}
}
}

View File

@@ -1,42 +1,59 @@
package emu.lunarcore.command.commands;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.server.packet.send.PacketPlayerSyncScNotify;
@Command(label = "avatar", aliases = {"a"}, permission = "player.avatar", desc = "/avatar lv(level) p(ascension) r(eidolon) s(skill levels). Sets the current avatar's properties")
@Command(label = "avatar", aliases = {"a"}, requireTarget = true, permission = "player.avatar", desc = "/avatar {cur | all | lineup} lv(level) p(ascension) r(eidolon) s(skill levels). Sets the current avatar's properties")
public class AvatarCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
public void execute(CommandArgs args) {
// Temp avatar list
List<GameAvatar> changeList = new ArrayList<>();
// Handle optional arguments
switch (args.get(0).toLowerCase()) {
case "all":
args.getTarget().getAvatars().forEach(changeList::add);
break;
case "lineup":
args.getTarget().getCurrentLineup().forEachAvatar(changeList::add);
break;
case "cur":
default:
changeList.add(args.getTarget().getCurrentLeaderAvatar());
break;
}
// Get current leader avatar
GameAvatar avatar = args.getTarget().getCurrentLeaderAvatar();
if (avatar == null) {
// No leader!
return;
}
// Change properties
if (args.setProperties(avatar)) {
// Save avatar
avatar.save();
// Try to set properties of avatars
Iterator<GameAvatar> it = changeList.iterator();
while (it.hasNext()) {
GameAvatar avatar = it.next();
if (args.setProperties(avatar)) {
// Save avatar
avatar.save();
} else {
// Remove from list if nothing was changed
it.remove();
}
}
if (changeList.size() > 0) {
// Send packet
args.getTarget().sendPacket(new PacketPlayerSyncScNotify(avatar));
args.getTarget().sendPacket(new PacketPlayerSyncScNotify(changeList.toArray(GameAvatar[]::new)));
// Send message
sender.sendMessage("Set avatar properties successfully");
args.sendMessage("Set avatar(s) properties successfully");
} else {
sender.sendMessage("No avatar properties to change");
args.sendMessage("No avatar properties to change");
}
}

View File

@@ -8,33 +8,28 @@ import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.enums.ItemMainType;
import emu.lunarcore.game.inventory.GameItem;
import emu.lunarcore.game.player.Player;
@Command(label = "clear", permission = "player.clear", desc = "/clear {relics | lightcones | materials | items}. Removes filtered items from the player inventory.")
@Command(label = "clear", permission = "player.clear", requireTarget = true, desc = "/clear {relics | lightcones | materials | items} lv(filter level). Removes filter items from the targeted player's inventory.")
public class ClearCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
List<GameItem> toRemove = new LinkedList<>();
String type = args.get(0).toLowerCase();
int filterLevel = Math.max(args.getLevel(), 1);
switch (type) {
case "relics", "r" -> {
for (GameItem item : args.getTarget().getInventory().getItems().values()) {
if (item.getItemMainType() == ItemMainType.Relic && item.getLevel() <= 1 && item.getExp() == 0 && !item.isLocked() && !item.isEquipped()) {
if (item.getItemMainType() == ItemMainType.Relic && item.getLevel() <= filterLevel && !item.isLocked() && !item.isEquipped()) {
toRemove.add(item);
}
}
}
case "equipment", "lightcones", "lc" -> {
for (GameItem item : args.getTarget().getInventory().getItems().values()) {
if (item.getItemMainType() == ItemMainType.Equipment && item.getLevel() <= 1 && item.getExp() == 0 && !item.isLocked() && !item.isEquipped()) {
if (item.getItemMainType() == ItemMainType.Equipment && item.getLevel() <= filterLevel && !item.isLocked() && !item.isEquipped()) {
toRemove.add(item);
}
}
@@ -56,7 +51,7 @@ public class ClearCommand implements CommandHandler {
}
args.getTarget().getInventory().removeItems(toRemove);
this.sendMessage(sender, "Removed " + toRemove.size() + " items");
args.sendMessage("Removed " + toRemove.size() + " items");
}
}

View File

@@ -8,17 +8,11 @@ import emu.lunarcore.game.player.Player;
import emu.lunarcore.game.player.PlayerGender;
import emu.lunarcore.server.packet.send.PacketGetHeroBasicTypeInfoScRsp;
@Command(label = "gender", permission = "player.gender", desc = "/gender {male | female}. Sets the player gender.")
@Command(label = "gender", permission = "player.gender", requireTarget = true, desc = "/gender {male | female}. Sets the player gender.")
public class GenderCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
// Set world level
Player target = args.getTarget();
PlayerGender playerGender = null;
@@ -48,9 +42,9 @@ public class GenderCommand implements CommandHandler {
// Send packet and response message
target.sendPacket(new PacketGetHeroBasicTypeInfoScRsp(target));
this.sendMessage(sender, "Gender for " + target.getName() + " set successfully");
args.sendMessage("Gender for " + target.getName() + " set successfully");
} else {
this.sendMessage(sender, "Error: Invalid input");
args.sendMessage("Error: Invalid input");
}
}

View File

@@ -15,22 +15,22 @@ import emu.lunarcore.game.enums.ItemSubType;
import emu.lunarcore.game.inventory.GameItem;
import emu.lunarcore.game.player.Player;
@Command(label = "giveall", aliases = {"ga"}, permission = "player.give", desc = "/giveall {materials | avatars | lightcones | relics}. Gives the targeted player items.")
@Command(
label = "giveall",
aliases = {"ga"},
permission = "player.give",
requireTarget = true,
desc = "/giveall {materials | avatars | lightcones | relics} lv(level). Gives the targeted player items."
)
public class GiveAllCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
Player target = args.getTarget();
String type = args.get(0).toLowerCase();
switch (type) {
default -> this.sendMessage(sender, "Error: Invalid type");
default -> args.sendMessage("Error: Invalid type");
case "m", "materials", "mats" -> {
List<GameItem> items = new ArrayList<>();
@@ -49,9 +49,16 @@ public class GiveAllCommand implements CommandHandler {
target.getInventory().addItems(items, true);
// Send message
this.sendMessage(sender, "Giving " + target.getName() + " " + items.size() + " items");
args.sendMessage("Giving " + target.getName() + " " + items.size() + " items");
}
case "lc", "lightcones" -> {
// Make sure we dont go over the inventory limit
var tab = args.getTarget().getInventory().getTabByItemType(ItemMainType.Equipment);
if (tab.getSize() >= tab.getMaxCapacity()) {
args.sendMessage(target.getName() + " has too many of this item type");
return;
}
// Get lightcones
List<GameItem> items = GameData.getItemExcelMap().values()
.stream()
@@ -67,9 +74,16 @@ public class GiveAllCommand implements CommandHandler {
target.getInventory().addItems(items, true);
// Send message
this.sendMessage(sender, "Giving " + target.getName() + " " + items.size() + " light cones");
args.sendMessage("Giving " + target.getName() + " " + items.size() + " light cones");
}
case "r", "relics" -> {
// Make sure we dont go over the inventory limit
var tab = args.getTarget().getInventory().getTabByItemType(ItemMainType.Relic);
if (tab.getSize() >= tab.getMaxCapacity()) {
args.sendMessage(target.getName() + " has too many of this item type");
return;
}
// Get relics
List<GameItem> items = GameData.getItemExcelMap().values()
.stream()
@@ -80,12 +94,12 @@ public class GiveAllCommand implements CommandHandler {
return item;
})
.toList();
// Add to target's inventory
target.getInventory().addItems(items, true);
// Send message
this.sendMessage(sender, "Giving " + target.getName() + " " + items.size() + " relics");
args.sendMessage("Giving " + target.getName() + " " + items.size() + " relics");
}
case "a", "characters", "avatars" -> {
// All avatars and their eidolons
@@ -111,7 +125,31 @@ public class GiveAllCommand implements CommandHandler {
}
// Send message
this.sendMessage(sender, "Giving " + target.getName() + " all avatars");
args.sendMessage("Giving " + target.getName() + " all avatars");
}
case "ic", "icons" -> {
// Get UnlockedHeads
for (var iconhead : GameData.getPlayerIconExcelMap().values()) {
// This function will handle any duplicate head icons
target.addHeadIcon(iconhead.getId());
}
// Send message
args.sendMessage("Added all icons to " + target.getName());
}
case "consumables", "food" -> {
// Get consumables
List<GameItem> items = GameData.getItemExcelMap().values()
.stream()
.filter(excel -> excel.getItemSubType() == ItemSubType.Food)
.map(excel -> new GameItem(excel, 1000))
.toList();
// Add to target's inventory
target.getInventory().addItems(items, true);
// Send message
args.sendMessage("Added all consumables to " + target.getName());
}
}
}

View File

@@ -11,72 +11,63 @@ import emu.lunarcore.data.excel.ItemExcel;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.enums.ItemMainType;
import emu.lunarcore.game.inventory.GameItem;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.util.Utils;
@Command(label = "give", aliases = {"g"}, permission = "player.give", desc = "/give [item id] x[amount]. Gives the targetted player an item.")
@Command(
label = "give",
aliases = {"g", "item"},
permission = "player.give",
requireTarget = true,
desc = "/give [item id] x(amount) lv(level) r(rank) p(promotion). Gives the targeted player an item."
)
public class GiveCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
int itemId = Utils.parseSafeInt(args.get(0));
int amount = Math.max(args.getAmount(), 1);
ItemExcel itemData = GameData.getItemExcelMap().get(itemId);
if (itemData == null) {
this.sendMessage(sender, "Error: Item data not found");
return;
}
public void execute(CommandArgs args) {
// Setup items
List<GameItem> items = new LinkedList<>();
if (itemData.getItemMainType() == ItemMainType.AvatarCard) {
// Add avatar
GameAvatar avatar = new GameAvatar(itemData.getId());
// Get amount to give
int amount = Math.max(args.getAmount(), 1);
// Parse items
for (String arg : args.getList()) {
// Parse item id
int itemId = Utils.parseSafeInt(arg);
if (args.getTarget().addAvatar(avatar)) {
// Change avatar properties
ItemExcel itemData = GameData.getItemExcelMap().get(itemId);
if (itemData == null) {
args.sendMessage("Item \"" + arg + "\" does not exist!");
continue;
}
// Add item
if (itemData.getItemMainType() == ItemMainType.AvatarCard) {
// Add avatar to target
GameAvatar avatar = new GameAvatar(itemData.getId());
args.setProperties(avatar);
}
} else if (itemData.isEquippable()) {
for (int i = 0; i < amount; i++) {
GameItem item = new GameItem(itemData);
args.getTarget().addAvatar(avatar);
} else if (itemData.isEquippable()) {
// Make sure we dont go over the inventory limit
var tab = args.getTarget().getInventory().getTabByItemType(itemData.getItemMainType());
amount = Math.min(amount, tab.getAvailableCapacity());
if (item.getExcel().isEquipment()) {
// Try to set level
if (args.getLevel() > 0) {
item.setLevel(Math.min(args.getLevel(), 80));
item.setPromotion(Utils.getMinPromotionForLevel(item.getLevel()));
}
// Add items
for (int i = 0; i < amount; i++) {
GameItem item = new GameItem(itemData);
args.setProperties(item);
// Try to set promotion
if (args.getPromotion() >= 0) {
item.setPromotion(Math.min(args.getPromotion(), item.getExcel().getEquipmentExcel().getMaxPromotion()));
}
// Try to set rank (superimposition)
if (args.getRank() >= 0) {
item.setRank(Math.min(args.getRank(), item.getExcel().getEquipmentExcel().getMaxRank()));
}
items.add(item);
}
items.add(item);
} else {
items.add(new GameItem(itemData, amount));
}
} else {
items.add(new GameItem(itemData, amount));
// Send message
args.sendMessage("Giving " + args.getTarget().getName() + " " + amount + " of " + itemId);
}
// Add and send message to player
// Add to player inventory
args.getTarget().getInventory().addItems(items, true);
args.getTarget().sendMessage("Giving " + args.getTarget().getName() + " " + amount + " of " + itemId);
}
}

View File

@@ -0,0 +1,23 @@
package emu.lunarcore.command.commands;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.player.lineup.PlayerLineup;
@Command(label = "heal", permission = "player.heal", requireTarget = true, desc = "/heal. Heals your avatars.")
public class HealCommand implements CommandHandler {
@Override
public void execute(CommandArgs args) {
PlayerLineup lineup = args.getTarget().getCurrentLineup();
lineup.forEachAvatar(avatar -> {
avatar.setCurrentHp(lineup, 10000);
avatar.save();
});
lineup.refreshLineup();
args.sendMessage("Healed all avatars for " + args.getTarget().getName());
}
}

View File

@@ -4,21 +4,20 @@ import emu.lunarcore.LunarCore;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.player.Player;
@Command(label = "help", permission = "player.help", desc = "/help. Displays a list of available commands.")
public class HelpCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
this.sendMessage(sender, "Displaying list of commands:");
public void execute(CommandArgs args) {
args.sendMessage("Displaying list of commands:");
var labels = LunarCore.getCommandManager().getLabels().keySet().stream().sorted().toList();
for (var label : labels) {
Command command = LunarCore.getCommandManager().getLabels().get(label).getClass().getAnnotation(Command.class);
if (command == null) continue;
this.sendMessage(sender, command.desc());
args.sendMessage(command.desc());
}
}

View File

@@ -3,27 +3,21 @@ package emu.lunarcore.command.commands;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.player.Player;
@Command(
label = "kick",
desc = "/kick @[player id]. Kicks a player from the server.",
requireTarget = true,
permission = "player.kick"
)
public final class KickCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
// Kick player
args.getTarget().getSession().close();
// Send message
this.sendMessage(sender, "Player kicked successfully");
args.sendMessage("Player kicked successfully");
}
}

View File

@@ -0,0 +1,65 @@
package emu.lunarcore.command.commands;
import java.util.ArrayList;
import java.util.List;
import emu.lunarcore.GameConstants;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.avatar.GameAvatar;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.game.player.lineup.PlayerLineup;
import emu.lunarcore.util.Utils;
@Command(label = "lineup", permission = "player.lineup", requireTarget = true, desc = "/lineup [avatar ids]. USE AT YOUR OWN RISK. Sets your current lineup with the specified avatar ids.")
public class LineupCommand implements CommandHandler {
@Override
public void execute(CommandArgs args) {
// Get target player
Player target = args.getTarget();
// Do not set lineup while the target player is in a battle
if (target.isInBattle()) {
args.sendMessage("Error: The targeted player is in a battle");
return;
}
// Temp avatar list
List<Integer> avatars = new ArrayList<>();
// Validate avatars in temp list
for (String arg : args.getList()) {
// Make sure the avatar actually exist
GameAvatar avatar = target.getAvatarById(Utils.parseSafeInt(arg));
if (avatar == null) continue;
avatars.add(avatar.getAvatarId());
// Soft cap check
if (avatars.size() >= GameConstants.MAX_AVATARS_IN_TEAM) {
break;
}
}
// Replace cleanly
if (avatars.size() > 0) {
// Only replace lineup if we have avatars to replace with
// The client wont like it if we have a lineup with 0 avatars.
PlayerLineup lineup = target.getCurrentLineup();
lineup.getAvatars().clear();
lineup.getAvatars().addAll(avatars);
lineup.save();
// Send client packets to sync lineup
lineup.refreshLineup();
target.getScene().syncLineup();
args.sendMessage("Set the lineup of " + target.getName() + " successfully");
} else {
args.sendMessage("No avatars could be added");
}
}
}

View File

@@ -6,41 +6,27 @@ import java.util.List;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.data.GameData;
import emu.lunarcore.data.excel.ItemExcel;
import emu.lunarcore.game.inventory.GameItem;
import emu.lunarcore.game.mail.Mail;
import emu.lunarcore.game.player.Player;
@Command(label = "mail", aliases = {"m"}, permission = "player.mail", desc = "/mail [content]. Sends the targeted player a system mail.")
@Command(label = "mail", aliases = {"m"}, permission = "player.mail", requireTarget = true, desc = "/mail [content]. Sends the targeted player a system mail.")
public class MailCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
// Get attachments
List<GameItem> attachments = new ArrayList<>();
var it = args.getList().iterator();
while (it.hasNext()) {
try {
String str = it.next();
if (args.getMap() != null) {
for (var entry : args.getMap().int2IntEntrySet()) {
if (entry.getIntValue() <= 0) continue;
if (str.contains(":")) {
String[] split = str.split(":");
int itemId = Integer.parseInt(split[0]);
int count = Integer.parseInt(split[1]);
attachments.add(new GameItem(itemId, count));
it.remove();
}
} catch (Exception e) {
ItemExcel itemExcel = GameData.getItemExcelMap().get(entry.getIntKey());
if (itemExcel == null) continue;
attachments.add(new GameItem(itemExcel, entry.getIntValue()));
}
}
@@ -55,7 +41,7 @@ public class MailCommand implements CommandHandler {
// Send to target
args.getTarget().getMailbox().sendMail(mail);
this.sendMessage(sender, "Sending mail to " + args.getTarget().getName());
args.sendMessage("Sending mail to " + args.getTarget().getName());
}
}

View File

@@ -3,19 +3,12 @@ package emu.lunarcore.command.commands;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.player.Player;
@Command(label = "permission", aliases = {"perm"}, permission = "admin.permission", desc = "/permission {add | remove | clear} [permission]. Gives/removes a permission from the targeted player.")
@Command(label = "permission", aliases = {"perm"}, permission = "admin.permission", requireTarget = true, desc = "/permission {add | remove | clear} [permission]. Gives/removes a permission from the targeted player.")
public class PermissionCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
String type = args.get(0).toLowerCase();
String permission = args.get(1).toLowerCase();
@@ -26,7 +19,7 @@ public class PermissionCommand implements CommandHandler {
args.getTarget().getAccount().addPermission(permission);
}
// Send message
this.sendMessage(sender, "Added permission for " + args.getTarget().getName());
args.sendMessage("Added permission for " + args.getTarget().getName());
}
case "remove" -> {
// Remove permission
@@ -34,16 +27,16 @@ public class PermissionCommand implements CommandHandler {
args.getTarget().getAccount().removePermission(permission);
}
// Send message
this.sendMessage(sender, "Removed permission for " + args.getTarget().getName());
args.sendMessage("Removed permission for " + args.getTarget().getName());
}
case "clear" -> {
// Clear permissions
args.getTarget().getAccount().clearPermission();
// Send message
this.sendMessage(sender, "Cleared permissions for " + args.getTarget().getName());
args.sendMessage("Cleared permissions for " + args.getTarget().getName());
}
default -> {
this.sendMessage(sender, "Error: Invalid arguments");
args.sendMessage("Error: Invalid arguments");
}
}
}

View File

@@ -0,0 +1,17 @@
package emu.lunarcore.command.commands;
import emu.lunarcore.GameConstants;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
@Command(label = "refill", aliases = {"rf"}, permission = "player.refill", requireTarget = true, desc = "/refill - refill your skill points in open world.")
public class RefillMPCommand implements CommandHandler {
@Override
public void execute(CommandArgs args) {
args.getTarget().getCurrentLineup().addMp(GameConstants.MAX_MP);
args.sendMessage("Successfully refilled skill points for " + args.getTarget().getName());
}
}

View File

@@ -0,0 +1,23 @@
package emu.lunarcore.command.commands;
import emu.lunarcore.command.Command;
import emu.lunarcore.game.player.lineup.PlayerLineup;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
@Command(label = "energy", permission = "player.energy", requireTarget = true, desc = "/energy. Refills all characters energy in current lineup.")
public class RefillSPCommand implements CommandHandler {
@Override
public void execute(CommandArgs args) {
PlayerLineup lineup = args.getTarget().getCurrentLineup();
lineup.forEachAvatar(avatar -> {
avatar.setCurrentSp(lineup, 10000);
avatar.save();
});
lineup.refreshLineup();
args.sendMessage("Refilled SP for " + args.getTarget().getName());
}
}

View File

@@ -4,15 +4,14 @@ import emu.lunarcore.LunarCore;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.player.Player;
@Command(label = "reload", permission = "admin.reload", desc = "/reload. Reloads the server config.")
public class ReloadCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
public void execute(CommandArgs args) {
LunarCore.loadConfig();
this.sendMessage(sender, "Reloaded the server config");
args.sendMessage("Reloaded the server config");
}
}

View File

@@ -7,20 +7,13 @@ import emu.lunarcore.data.GameData;
import emu.lunarcore.data.config.AnchorInfo;
import emu.lunarcore.data.config.FloorInfo;
import emu.lunarcore.data.excel.MazePlaneExcel;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.util.Utils;
@Command(label = "scene", aliases = {"sc"}, permission = "player.scene", desc = "/scene [scene id] [floor id]. Teleports the player to the specified scene.")
@Command(label = "scene", aliases = {"sc"}, permission = "player.scene", requireTarget = true, desc = "/scene [scene id] [floor id]. Teleports the player to the specified scene.")
public class SceneCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
// Get arguments
int planeId = Utils.parseSafeInt(args.get(0));
int floorId = Utils.parseSafeInt(args.get(1));
@@ -28,7 +21,7 @@ public class SceneCommand implements CommandHandler {
// Get maze plane
MazePlaneExcel excel = GameData.getMazePlaneExcelMap().get(planeId);
if (excel == null) {
this.sendMessage(sender, "Error: Maze plane not found");
args.sendMessage("Error: Maze plane not found");
return;
}
@@ -39,7 +32,7 @@ public class SceneCommand implements CommandHandler {
// Get floor info
FloorInfo floor = GameData.getFloorInfo(planeId, floorId);
if (floor == null) {
this.sendMessage(sender, "Error: Floor info not found");
args.sendMessage("Error: Floor info not found");
return;
}
@@ -48,7 +41,7 @@ public class SceneCommand implements CommandHandler {
AnchorInfo anchor = floor.getAnchorInfo(startGroup, anchorId);
if (anchor == null) {
this.sendMessage(sender, "Error: Floor info not found");
args.sendMessage("Error: Floor info not found");
return;
}
@@ -57,7 +50,7 @@ public class SceneCommand implements CommandHandler {
// Send packet
if (success) {
this.sendMessage(sender, "Teleported player to " + planeId);
args.sendMessage("Teleported player to " + planeId);
}
}

View File

@@ -0,0 +1,19 @@
package emu.lunarcore.command.commands;
import emu.lunarcore.util.Utils;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
@Command(label = "setlevel", aliases = {"level"}, permission = "player.setlevel", requireTarget = true, desc = "/setlevel [level] - Sets the targeted player's trailblazer level.")
public class SetLevelCommand implements CommandHandler {
@Override
public void execute(CommandArgs args) {
int targetLevel = Utils.parseSafeInt(args.get(0));
args.getTarget().setLevel(targetLevel);
args.sendMessage("Set level to " + targetLevel);
}
}

View File

@@ -1,5 +1,6 @@
package emu.lunarcore.command.commands;
import emu.lunarcore.LunarCore;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
@@ -16,21 +17,15 @@ import emu.lunarcore.game.scene.entity.EntityProp;
import emu.lunarcore.util.Position;
import emu.lunarcore.util.Utils;
@Command(label = "spawn", permission = "player.spawn", desc = "/spawn [monster/prop id] x[amount] s[stage id]. Spawns a monster or prop near the targeted player.")
@Command(label = "spawn", permission = "player.spawn", requireTarget = true, desc = "/spawn [monster/prop id] [stage id] x[amount] lv[level] r[radius]. Spawns a monster or prop near the targeted player.")
public class SpawnCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
Player target = args.getTarget();
if (target.getScene() == null) {
this.sendMessage(sender, "Error: Target is not in scene");
args.sendMessage("Error: Target is not in scene");
return;
}
@@ -40,6 +35,12 @@ public class SpawnCommand implements CommandHandler {
int amount = Math.max(args.getAmount(), 1);
int radius = Math.max(args.getRank(), 5) * 1000;
// Enforce scene max entity limit
if (target.getScene().getEntities().size() + amount >= LunarCore.getConfig().getServerOptions().getSceneMaxEntites()) {
args.sendMessage("Error: Max entities in scene reached");
return;
}
// Spawn monster
NpcMonsterExcel monsterExcel = GameData.getNpcMonsterExcelMap().get(id);
if (monsterExcel != null) {
@@ -62,7 +63,7 @@ public class SpawnCommand implements CommandHandler {
}
if (monsterInfo == null || groupInfo == null) {
this.sendMessage(sender, "Error: No existing monster config found in this scene");
args.sendMessage("Error: No existing monster config found in this scene");
return;
}
@@ -74,11 +75,15 @@ public class SpawnCommand implements CommandHandler {
monster.setEventId(monsterInfo.getEventID());
monster.setOverrideStageId(stage);
if (args.getLevel() > 0) {
monster.setOverrideLevel(Math.min(args.getLevel(), 100));
}
target.getScene().addEntity(monster, true);
}
// Send message when done
this.sendMessage(sender, "Spawning " + amount + " monsters");
args.sendMessage("Spawning " + amount + " monsters");
return;
}
@@ -103,7 +108,7 @@ public class SpawnCommand implements CommandHandler {
}
if (propInfo == null || groupInfo == null) {
this.sendMessage(sender, "Error: No existing prop config found in this scene");
args.sendMessage("Error: No existing prop config found in this scene");
return;
}
@@ -119,11 +124,11 @@ public class SpawnCommand implements CommandHandler {
}
// Send message when done
this.sendMessage(sender, "Spawning " + amount + " props");
args.sendMessage("Spawning " + amount + " props");
return;
}
this.sendMessage(sender, "Error: Invalid id");
args.sendMessage("Error: Invalid id");
}
}

View File

@@ -10,16 +10,16 @@ import emu.lunarcore.game.player.Player;
public class UnstuckCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
public void execute(CommandArgs args) {
// Make sure were on the game server
if (LunarCore.getGameDatabase() == null) {
this.sendMessage(sender, "Error: Game database not connected");
args.sendMessage("Error: Game database not connected");
return;
}
// TODO add some logic to handle unstucking the target if theyre online
if (args.getTarget() != null) {
this.sendMessage(sender, "Error: Targeted player is online");
args.sendMessage("Error: Targeted player is online");
return;
}
@@ -32,10 +32,10 @@ public class UnstuckCommand implements CommandHandler {
player.save();
// Done
this.sendMessage(sender, "Player unstuck successfully");
args.sendMessage("Player unstuck successfully");
} else {
// Done
this.sendMessage(sender, "Error: Player not found in database");
args.sendMessage("Error: Player not found in database");
}
}

View File

@@ -3,20 +3,13 @@ package emu.lunarcore.command.commands;
import emu.lunarcore.command.Command;
import emu.lunarcore.command.CommandArgs;
import emu.lunarcore.command.CommandHandler;
import emu.lunarcore.game.player.Player;
import emu.lunarcore.util.Utils;
@Command(label = "worldlevel", aliases = {"wl"}, permission = "player.worldlevel", desc = "/worldlevel [world level]. Sets the targeted player's equilibrium level.")
@Command(label = "worldlevel", aliases = {"wl"}, permission = "player.worldlevel", requireTarget = true, desc = "/worldlevel [world level]. Sets the targeted player's equilibrium level.")
public class WorldLevelCommand implements CommandHandler {
@Override
public void execute(Player sender, CommandArgs args) {
// Check target
if (args.getTarget() == null) {
this.sendMessage(sender, "Error: Targeted player not found or offline");
return;
}
public void execute(CommandArgs args) {
// Set world level
int level = Utils.parseSafeInt(args.get(0));
level = Math.min(Math.max(level, 0), 6);
@@ -24,7 +17,7 @@ public class WorldLevelCommand implements CommandHandler {
args.getTarget().setWorldLevel(level);
// Done
this.sendMessage(sender, "Set world level to " + level);
args.sendMessage("Set world level to " + level);
}
}

View File

@@ -2,13 +2,14 @@ package emu.lunarcore.data;
import java.lang.reflect.Field;
import java.util.List;
import java.util.ArrayList;
import emu.lunarcore.data.config.FloorInfo;
import emu.lunarcore.data.excel.*;
import emu.lunarcore.game.battle.MazeBuff;
import emu.lunarcore.util.Utils;
import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.ints.*;
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import lombok.Getter;
@@ -18,10 +19,12 @@ public class GameData {
// Excels
@Getter private static Int2ObjectMap<AvatarExcel> avatarExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ItemExcel> itemExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ItemUseExcel> itemUseExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<EquipmentExcel> equipExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<RelicExcel> relicExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<PropExcel> propExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<NpcExcel> npcExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<MonsterExcel> monsterExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<NpcMonsterExcel> npcMonsterExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<StageExcel> stageExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<MazePlaneExcel> mazePlaneExcelMap = new Int2ObjectOpenHashMap<>();
@@ -29,9 +32,15 @@ public class GameData {
@Getter private static Int2ObjectMap<HeroExcel> heroExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ShopExcel> shopExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<RewardExcel> rewardExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<PlayerIconExcel> playerIconExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ItemComposeExcel> itemComposeExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ActivityPanelExcel> activityPanelExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<BackGroundMusicExcel> backGroundMusicExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<QuestExcel> questExcelMap = new Int2ObjectLinkedOpenHashMap<>();
@Getter private static Int2ObjectMap<TextJoinExcel> textJoinExcelMap = new Int2ObjectLinkedOpenHashMap<>();
@Getter private static Int2ObjectMap<ChatBubbleExcel> chatBubbleExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<PhoneThemeExcel> phoneThemeExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ChallengeGroupExcel> challengeGroupExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ChallengeExcel> challengeExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<ChallengeTargetExcel> challengeTargetExcelMap = new Int2ObjectOpenHashMap<>();
@@ -44,6 +53,7 @@ public class GameData {
@Getter private static Int2ObjectMap<RogueRoomExcel> rogueRoomExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<RogueMapExcel> rogueMapExcelMap = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<RogueMonsterExcel> rogueMonsterExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<RogueBuffExcel> rogueBuffExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<AvatarPromotionExcel> avatarPromotionExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<AvatarSkillTreeExcel> avatarSkillTreeExcelMap = new Int2ObjectOpenHashMap<>();
@@ -57,9 +67,10 @@ public class GameData {
private static Int2ObjectMap<ExpTypeExcel> expTypeExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<EquipmentExpTypeExcel> equipmentExpTypeExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<RelicExpTypeExcel> relicExpTypeExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<RelicMainAffixExcel> relicMainAffixExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<RelicSubAffixExcel> relicSubAffixExcelMap = new Int2ObjectOpenHashMap<>();
private static Int2ObjectMap<RelicSetExcel> relicSetExcelMap = new Int2ObjectOpenHashMap<>();
// Configs (Bin)
@Getter private static Object2ObjectMap<String, FloorInfo> floorInfos = new Object2ObjectOpenHashMap<>();
@@ -81,6 +92,77 @@ public class GameData {
return map;
}
public static List<Integer> getAllRelicIds() {
List<Integer> allIds = new ArrayList<>();
for (Int2ObjectMap.Entry<RelicExcel> entry : relicExcelMap.int2ObjectEntrySet()) {
RelicExcel relicExcel = entry.getValue();
allIds.add(relicExcel.getId());
}
return allIds;
}
public static int getRelicSetFromId(int relicId) {
RelicExcel relicExcel = GameData.getRelicExcelMap().get(relicId);
if (relicExcel == null) {
return 0;
}
return relicExcel.getSetId();
}
public static List<Integer> getAllMusicIds() {
List<Integer> allIds = new ArrayList<>();
for (Int2ObjectMap.Entry<BackGroundMusicExcel> entry : backGroundMusicExcelMap.int2ObjectEntrySet()) {
BackGroundMusicExcel backGroundMusicExcel = entry.getValue();
allIds.add(backGroundMusicExcel.getId());
}
return allIds;
}
public static int TextJoinItemFromId(int id) {
for (Int2ObjectMap.Entry<TextJoinExcel> entry : textJoinExcelMap.int2ObjectEntrySet()) {
TextJoinExcel textJoinExcel = entry.getValue();
if (textJoinExcel.getId() == id) {
IntArrayList textJoinItemList = textJoinExcel.getTextJoinItemList();
if (textJoinItemList.size() > 0) {
return textJoinItemList.getInt(textJoinItemList.size() - 1);
}
}
}
return id * 10; // or return a default value if needed
}
public static List<Integer> getAllQuestIds() {
List<Integer> allIds = new ArrayList<>();
for (Int2ObjectMap.Entry<QuestExcel> entry : questExcelMap.int2ObjectEntrySet()) {
QuestExcel questExcel = entry.getValue();
allIds.add(questExcel.getId());
}
return allIds;
}
public static List<Integer> getAllMonsterIds() {
List<Integer> allIds = new ArrayList<>();
for (Int2ObjectMap.Entry<MonsterExcel> entry : monsterExcelMap.int2ObjectEntrySet()) {
MonsterExcel monsterExcel = entry.getValue();
allIds.add(monsterExcel.getId());
}
return allIds;
}
public static int getMusicGroupId(int musicId) {
var excel = backGroundMusicExcelMap.get(musicId);
return excel != null ? excel.getGroupId() : 0;
}
public static AvatarPromotionExcel getAvatarPromotionExcel(int id, int promotion) {
return avatarPromotionExcelMap.get((id << 8) + promotion);
}
@@ -148,4 +230,8 @@ public class GameData {
public static RogueMapExcel getRogueMapExcel(int rogueMapId, int siteId) {
return rogueMapExcelMap.get((rogueMapId << 8) + siteId);
}
public static RogueBuffExcel getRogueBuffExcel(int rogueBuffId, int level) {
return rogueBuffExcelMap.get((rogueBuffId << 4) + level);
}
}

View File

@@ -23,6 +23,8 @@ public class GameDepot {
// Rogue
@Getter private static Int2ObjectMap<int[]> rogueMapGen = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<RogueBuffExcel> rogueAeonBuffs = new Int2ObjectOpenHashMap<>();
@Getter private static Int2ObjectMap<List<RogueBuffExcel>> rogueAeonEnhanceBuffs = new Int2ObjectOpenHashMap<>();
@Getter private static List<RogueBuffExcel> rogueRandomBuffList = new ArrayList<>();
@Getter private static List<RogueMiracleExcel> rogueRandomMiracleList = new ArrayList<>();
@Getter private static List<RogueNPCExcel> rogueRandomNpcList = new ArrayList<>();

View File

@@ -2,7 +2,6 @@ package emu.lunarcore.data.excel;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import lombok.Getter;
@Getter
@@ -12,7 +11,7 @@ public class ActivityPanelExcel extends GameResource {
private int Type;
private int ActivityModuleID;
private boolean IsResidentPanel;
@Override
public int getId() {
return PanelID;

View File

@@ -40,10 +40,10 @@ public class AvatarExcel extends GameResource {
private transient IntSet skillTreeIds;
private transient String nameKey;
private transient int maxSp;
@Setter private transient MazeSkill mazeAttack;
@Setter private transient MazeSkill mazeSkill;
private static Pattern namePattern = Pattern.compile("(?<=Avatar_)(.*?)(?=_Config)");
public AvatarExcel() {
@@ -75,14 +75,14 @@ public class AvatarExcel extends GameResource {
// Cache max sp
this.maxSp = (int) this.SPNeed * 100;
// Get name key
Matcher matcher = namePattern.matcher(this.JsonPath);
if (matcher.find()) {
this.nameKey = matcher.group(0);
}
// Clear variable to save memory
this.JsonPath = null;
}

View File

@@ -7,7 +7,6 @@ import emu.lunarcore.data.GameDepot;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import emu.lunarcore.data.ResourceType.LoadPriority;
import lombok.Getter;
@Getter
@@ -28,7 +27,7 @@ public class AvatarExpItemExcel extends GameResource {
if (excel == null) return;
excel.setAvatarExp(Exp);
// Add to game depot
if (Exp > 0) {
GameDepot.getAvatarExpExcels().add(this);

View File

@@ -41,7 +41,7 @@ public class AvatarSkillTreeExcel extends GameResource {
if (this.isDefaultUnlock()) {
excel.getDefaultSkillTrees().add(this);
}
// Add point id to avatar excel
excel.getSkillTreeIds().add(this.getPointID());
}

View File

@@ -0,0 +1,21 @@
package emu.lunarcore.data.excel;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import lombok.Getter;
@Getter
@ResourceType(name = {"BackGroundMusic.json"})
public class BackGroundMusicExcel extends GameResource {
private int ID;
private int GroupID;
@Override
public int getId() {
return ID;
}
public int getGroupId() {
return GroupID;
}
}

View File

@@ -0,0 +1,42 @@
package emu.lunarcore.data.excel;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import emu.lunarcore.game.rogue.RogueBuffType;
import emu.lunarcore.util.Utils;
import lombok.Getter;
@Getter
@ResourceType(name = {"BattleEventData.json"})
public class BattleEventDataExcel extends GameResource {
private int BattleEventID;
private String Config;
private static final Pattern roguePattern = Pattern.compile("(?<=Avatar_RogueBattleevent)(.*?)(?=_Config.json)");
@Override
public int getId() {
return BattleEventID;
}
@Override
public void onLoad() {
try {
Matcher matcher = roguePattern.matcher(this.Config);
if (matcher.find()) {
int rogueBuffType = Utils.parseSafeInt(matcher.group(0));
var type = RogueBuffType.getById(rogueBuffType);
if (type != null) {
type.setBattleEventSkill(this.BattleEventID);
}
}
} catch (Exception e) {
// Ignored
}
}
}

View File

@@ -15,46 +15,46 @@ public class ChallengeExcel extends GameResource {
private int StageNum;
private int ChallengeCountDown;
private int MazeBuffID;
private int[] ChallengeTargetID;
private int MazeGroupID1;
private int[] ConfigList1;
private int[] NpcMonsterIDList1;
private int[] EventIDList1;
private int MazeGroupID2;
private int[] ConfigList2;
private int[] NpcMonsterIDList2;
private int[] EventIDList2;
private transient Int2ObjectMap<ChallengeMonsterInfo> challengeMonsters1;
private transient Int2ObjectMap<ChallengeMonsterInfo> challengeMonsters2;
@Override
public int getId() {
return ID;
}
@Override
public void onLoad() {
// Cache challenge monsters
this.challengeMonsters1 = new Int2ObjectOpenHashMap<>();
for (int i = 0; i < ConfigList1.length; i++) {
if (ConfigList1[i] == 0) break;
var monster = new ChallengeMonsterInfo(ConfigList1[i], NpcMonsterIDList1[i], EventIDList1[i]);
this.challengeMonsters1.put(monster.getConfigId(), monster);
}
this.challengeMonsters2 = new Int2ObjectOpenHashMap<>();
for (int i = 0; i < ConfigList2.length; i++) {
if (ConfigList2[i] == 0) break;
var monster = new ChallengeMonsterInfo(ConfigList2[i], NpcMonsterIDList2[i], EventIDList2[i]);
this.challengeMonsters2.put(monster.getConfigId(), monster);
}
// Clear arrays to save memory
this.ConfigList1 = null;
this.NpcMonsterIDList1 = null;
@@ -69,12 +69,12 @@ public class ChallengeExcel extends GameResource {
private int configId;
private int npcMonsterId;
private int eventId;
public ChallengeMonsterInfo(int configId, int npcMonsterId, int eventId) {
this.configId = configId;
this.npcMonsterId = npcMonsterId;
this.eventId = eventId;
}
}
}

View File

@@ -9,7 +9,7 @@ import lombok.Getter;
public class ChallengeGroupExcel extends GameResource {
private int GroupID;
private int RewardLineGroupID;
@Override
public int getId() {
return GroupID;

View File

@@ -10,7 +10,7 @@ public class ChallengeRewardExcel extends GameResource {
private int GroupID;
private int StarCount;
private int RewardID;
@Override
public int getId() {
return (GroupID << 16) + StarCount;

View File

@@ -11,7 +11,7 @@ public class ChallengeTargetExcel extends GameResource {
private int ID;
private ChallengeType ChallengeTargetType;
private int ChallengeTargetParam1;
@Override
public int getId() {
return ID;

View File

@@ -0,0 +1,20 @@
package emu.lunarcore.data.excel;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import emu.lunarcore.data.ResourceType.LoadPriority;
import lombok.Getter;
@Getter
@ResourceType(name = {"ChatBubbleConfig.json"}, loadPriority = LoadPriority.LOW)
public class ChatBubbleExcel extends GameResource {
private int ID;
private String ShowType;
private int ShowParam;
@Override
public int getId() {
return ID;
}
}

View File

@@ -16,7 +16,7 @@ public class CocoonExcel extends GameResource {
private int MaxWave;
private IntArrayList StageIDList;
private IntArrayList DropList;
@Override
public int getId() {
return (ID << 8) + WorldLevel;

View File

@@ -7,7 +7,6 @@ import emu.lunarcore.data.GameDepot;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import emu.lunarcore.data.ResourceType.LoadPriority;
import lombok.Getter;
@Getter
@@ -30,7 +29,7 @@ public class EquipmentExpItemExcel extends GameResource {
excel.setEquipmentExp(ExpProvide);
excel.setExpCost(CoinCost);
// Add to game depot
if (ExpProvide > 0) {
GameDepot.getEquipmentExpExcels().add(this);

View File

@@ -10,7 +10,7 @@ import lombok.Getter;
public class HeroExcel extends GameResource {
private int HeroAvatarID;
private PlayerGender Gender;
@Override
public int getId() {
return HeroAvatarID;

View File

@@ -15,11 +15,12 @@ public class ItemComposeExcel extends GameResource {
private int ItemID;
private FormulaType FormulaType;
private List<ItemParam> MaterialCost;
private int[] SpecialMaterialCost;
private IntOpenHashSet SpecialMaterialCost;
private int SpecialMaterialCostNumber;
private int CoinCost;
private int WorldLevelRequire;
private IntOpenHashSet RelicList;
@Override
public int getId() {
return ID;

View File

@@ -8,6 +8,7 @@ import emu.lunarcore.data.common.ItemParam;
import emu.lunarcore.game.enums.ItemMainType;
import emu.lunarcore.game.enums.ItemRarity;
import emu.lunarcore.game.enums.ItemSubType;
import emu.lunarcore.game.enums.ItemUseMethod;
import lombok.Getter;
import lombok.Setter;
@@ -18,11 +19,14 @@ public class ItemExcel extends GameResource {
// General item data
private int ID;
private long ItemName;
private ItemMainType ItemMainType;
private ItemSubType ItemSubType;
private ItemMainType ItemMainType = emu.lunarcore.game.enums.ItemMainType.Unknown;
private ItemSubType ItemSubType = emu.lunarcore.game.enums.ItemSubType.Unknown;
private ItemRarity Rarity;
private int PileLimit;
private int PurposeType;
private int UseDataID;
private ItemUseMethod UseMethod;
private List<ItemParam> ReturnItemIDList;
@@ -44,6 +48,10 @@ public class ItemExcel extends GameResource {
return ItemMainType == emu.lunarcore.game.enums.ItemMainType.Equipment && this.getEquipmentExcel() != null;
}
public boolean isHeadIcon() {
return ItemSubType == emu.lunarcore.game.enums.ItemSubType.HeadIcon;
}
public boolean isRelic() {
return ItemMainType == emu.lunarcore.game.enums.ItemMainType.Relic && this.getRelicExcel() != null;
}
@@ -51,6 +59,10 @@ public class ItemExcel extends GameResource {
public boolean isEquippable() {
return ItemMainType == emu.lunarcore.game.enums.ItemMainType.Relic || ItemMainType == emu.lunarcore.game.enums.ItemMainType.Equipment;
}
public int getRarityNum() {
return this.getRarity().getVal();
}
public int getRelicExp() {
if (this.relicExcel != null) {
@@ -58,7 +70,7 @@ public class ItemExcel extends GameResource {
}
return this.relicExp;
}
public int getRelicExpCost() {
if (this.relicExcel != null) {
return this.relicExcel.getCoinCost();

View File

@@ -0,0 +1,29 @@
package emu.lunarcore.data.excel;
import emu.lunarcore.data.GameResource;
import emu.lunarcore.data.ResourceType;
import emu.lunarcore.game.enums.ItemFoodTargetType;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import lombok.Getter;
@Getter
@ResourceType(name = {"ItemUseData.json", "ItemUseBuffData.json"})
public class ItemUseExcel extends GameResource {
private int UseDataID;
private int ConsumeType;
private int MazeBuffID;
private double PreviewHPRecoveryPercent;
private int PreviewHPRecoveryValue;
private double PreviewPowerPercent;
private int PreviewSkillPoint;
private ItemFoodTargetType UseTargetType;
private IntArrayList UseParam;
@Override
public int getId() {
return UseDataID;
}
}

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