Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
23226ad4
Commit
23226ad4
authored
Apr 21, 2022
by
Jaida Wu
Browse files
Refact code
Signed-off-by:
Jaida Wu
<
mlgmxyysd@meowcat.org
>
parent
e242e72b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/Config.java
View file @
23226ad4
...
...
@@ -12,10 +12,10 @@ public final class Config {
public
String
GameServerIp
=
"127.0.0.1"
;
public
String
GameServerPublicIp
=
""
;
public
int
GameServerPort
=
22102
;
public
String
DatabaseUrl
=
"mongodb://localhost:27017"
;
public
String
DatabaseCollection
=
"grasscutter"
;
public
String
RESOURCE_FOLDER
=
"./resources/"
;
public
String
DATA_FOLDER
=
"./data/"
;
public
String
PACKETS_FOLDER
=
"./packets/"
;
...
...
@@ -25,21 +25,21 @@ public final class Config {
public
GameRates
Game
=
new
GameRates
();
public
ServerOptions
ServerOptions
=
new
ServerOptions
();
public
GameRates
getGameRates
()
{
return
Game
;
}
public
ServerOptions
getServerOptions
()
{
return
ServerOptions
;
}
public
static
class
GameRates
{
public
float
ADVENTURE_EXP_RATE
=
1.0f
;
public
float
MORA_RATE
=
1.0f
;
public
float
DOMAIN_DROP_RATE
=
1.0f
;
}
public
static
class
ServerOptions
{
public
int
InventoryLimitWeapon
=
2000
;
public
int
InventoryLimitRelic
=
2000
;
...
...
src/main/java/emu/grasscutter/server/dispatch/DispatchServer.java
View file @
23226ad4
This diff is collapsed.
Click to expand it.
src/main/java/emu/grasscutter/server/dispatch/json/ComboTokenReqJson.java
View file @
23226ad4
...
...
@@ -7,7 +7,7 @@ public class ComboTokenReqJson {
public
String
device
;
public
String
sign
;
public
class
LoginTokenData
{
public
static
class
LoginTokenData
{
public
String
uid
;
public
String
token
;
public
boolean
guest
;
...
...
src/main/java/emu/grasscutter/server/dispatch/json/ComboTokenResJson.java
View file @
23226ad4
...
...
@@ -5,7 +5,7 @@ public class ComboTokenResJson {
public
int
retcode
;
public
LoginData
data
=
new
LoginData
();
public
class
LoginData
{
public
static
class
LoginData
{
public
int
account_type
=
1
;
public
boolean
heartbeat
;
public
String
combo_id
;
...
...
src/main/java/emu/grasscutter/server/dispatch/json/LoginResultJson.java
View file @
23226ad4
...
...
@@ -5,7 +5,7 @@ public class LoginResultJson {
public
int
retcode
;
public
VerifyData
data
=
new
VerifyData
();
public
class
VerifyData
{
public
static
class
VerifyData
{
public
VerifyAccountData
account
=
new
VerifyAccountData
();
public
boolean
device_grant_required
=
false
;
public
String
realname_operation
=
"NONE"
;
...
...
@@ -13,7 +13,7 @@ public class LoginResultJson {
public
boolean
safe_mobile_required
=
false
;
}
public
class
VerifyAccountData
{
public
static
class
VerifyAccountData
{
public
String
uid
;
public
String
name
=
""
;
public
String
email
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment