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 {
...
@@ -12,10 +12,10 @@ public final class Config {
public
String
GameServerIp
=
"127.0.0.1"
;
public
String
GameServerIp
=
"127.0.0.1"
;
public
String
GameServerPublicIp
=
""
;
public
String
GameServerPublicIp
=
""
;
public
int
GameServerPort
=
22102
;
public
int
GameServerPort
=
22102
;
public
String
DatabaseUrl
=
"mongodb://localhost:27017"
;
public
String
DatabaseUrl
=
"mongodb://localhost:27017"
;
public
String
DatabaseCollection
=
"grasscutter"
;
public
String
DatabaseCollection
=
"grasscutter"
;
public
String
RESOURCE_FOLDER
=
"./resources/"
;
public
String
RESOURCE_FOLDER
=
"./resources/"
;
public
String
DATA_FOLDER
=
"./data/"
;
public
String
DATA_FOLDER
=
"./data/"
;
public
String
PACKETS_FOLDER
=
"./packets/"
;
public
String
PACKETS_FOLDER
=
"./packets/"
;
...
@@ -25,21 +25,21 @@ public final class Config {
...
@@ -25,21 +25,21 @@ public final class Config {
public
GameRates
Game
=
new
GameRates
();
public
GameRates
Game
=
new
GameRates
();
public
ServerOptions
ServerOptions
=
new
ServerOptions
();
public
ServerOptions
ServerOptions
=
new
ServerOptions
();
public
GameRates
getGameRates
()
{
public
GameRates
getGameRates
()
{
return
Game
;
return
Game
;
}
}
public
ServerOptions
getServerOptions
()
{
public
ServerOptions
getServerOptions
()
{
return
ServerOptions
;
return
ServerOptions
;
}
}
public
static
class
GameRates
{
public
static
class
GameRates
{
public
float
ADVENTURE_EXP_RATE
=
1.0f
;
public
float
ADVENTURE_EXP_RATE
=
1.0f
;
public
float
MORA_RATE
=
1.0f
;
public
float
MORA_RATE
=
1.0f
;
public
float
DOMAIN_DROP_RATE
=
1.0f
;
public
float
DOMAIN_DROP_RATE
=
1.0f
;
}
}
public
static
class
ServerOptions
{
public
static
class
ServerOptions
{
public
int
InventoryLimitWeapon
=
2000
;
public
int
InventoryLimitWeapon
=
2000
;
public
int
InventoryLimitRelic
=
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 {
...
@@ -7,7 +7,7 @@ public class ComboTokenReqJson {
public
String
device
;
public
String
device
;
public
String
sign
;
public
String
sign
;
public
class
LoginTokenData
{
public
static
class
LoginTokenData
{
public
String
uid
;
public
String
uid
;
public
String
token
;
public
String
token
;
public
boolean
guest
;
public
boolean
guest
;
...
...
src/main/java/emu/grasscutter/server/dispatch/json/ComboTokenResJson.java
View file @
23226ad4
...
@@ -5,7 +5,7 @@ public class ComboTokenResJson {
...
@@ -5,7 +5,7 @@ public class ComboTokenResJson {
public
int
retcode
;
public
int
retcode
;
public
LoginData
data
=
new
LoginData
();
public
LoginData
data
=
new
LoginData
();
public
class
LoginData
{
public
static
class
LoginData
{
public
int
account_type
=
1
;
public
int
account_type
=
1
;
public
boolean
heartbeat
;
public
boolean
heartbeat
;
public
String
combo_id
;
public
String
combo_id
;
...
...
src/main/java/emu/grasscutter/server/dispatch/json/LoginResultJson.java
View file @
23226ad4
...
@@ -5,7 +5,7 @@ public class LoginResultJson {
...
@@ -5,7 +5,7 @@ public class LoginResultJson {
public
int
retcode
;
public
int
retcode
;
public
VerifyData
data
=
new
VerifyData
();
public
VerifyData
data
=
new
VerifyData
();
public
class
VerifyData
{
public
static
class
VerifyData
{
public
VerifyAccountData
account
=
new
VerifyAccountData
();
public
VerifyAccountData
account
=
new
VerifyAccountData
();
public
boolean
device_grant_required
=
false
;
public
boolean
device_grant_required
=
false
;
public
String
realname_operation
=
"NONE"
;
public
String
realname_operation
=
"NONE"
;
...
@@ -13,7 +13,7 @@ public class LoginResultJson {
...
@@ -13,7 +13,7 @@ public class LoginResultJson {
public
boolean
safe_mobile_required
=
false
;
public
boolean
safe_mobile_required
=
false
;
}
}
public
class
VerifyAccountData
{
public
static
class
VerifyAccountData
{
public
String
uid
;
public
String
uid
;
public
String
name
=
""
;
public
String
name
=
""
;
public
String
email
;
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