Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a proper language system #567

Merged
merged 39 commits into from
May 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
32c70cc
Support of Enter Room Scene
Akka0 May 5, 2022
023c5ba
Convert to the superior language system. (pt. 1)
KingRainbow44 May 6, 2022
f731196
Convert to the superior language system. (pt. 2)
KingRainbow44 May 6, 2022
d32d401
Choose Avatar & Enter Tower
Akka0 May 6, 2022
7d51e0d
Merge pull request #1 from Akka0/development
Akka0 May 6, 2022
744aa47
Add drowning. Better movement ticking.
gentlespoon May 6, 2022
a79e008
Add @Transient for temporary team
Akka0 May 6, 2022
696f629
Choose Avatar & Enter Tower
Akka0 May 6, 2022
39a49ae
Add @Transient for temporary team
Akka0 May 6, 2022
39c932b
Implementes auto HP recovery at the statues.
gentlespoon May 6, 2022
e319fd7
fix: lower logging level in SotSManager
gentlespoon May 6, 2022
5968ed3
Remove the red exclamation mark from achievements
May 6, 2022
092dee8
Merge branch 'development' of https://github.com/Grasscutters/Grasscu…
May 6, 2022
098cf37
Fix morphia error when saving player to db
May 6, 2022
0102a3c
The statues will now automatically regen their HP volume over time.
gentlespoon May 6, 2022
da99140
Stop WindSeedClientNotify and PlayerLuaShellNotify from being sent (#…
4Benj May 6, 2022
6144f47
Tower Dungeons Handoff between level and floor
Akka0 May 6, 2022
81ca860
Add some lua functions
Akka0 May 6, 2022
7279842
Merge pull request #2 from Grasscutters/development
Akka0 May 6, 2022
321a2a3
Merge branch 'tower' into development
Akka0 May 6, 2022
6b82a53
Merge pull request #3 from Akka0/development
Akka0 May 6, 2022
22df346
a little fix
Akka0 May 6, 2022
63a37ac
add config option to enable cors for dispatchserver (#579)
exzork May 6, 2022
19a2c9b
Implement Avatar Expedition System
CCasusensa May 6, 2022
6d89477
Merge pull request #594 from Akka0/tower
May 6, 2022
2b58d69
Improved fault tolerance for json file deserialization (#595)
cfuncode May 6, 2022
c4e1108
Add config option to change console server's signature, namecard, lev…
Arikatsu May 6, 2022
7109578
fix scence block loading bug
May 6, 2022
1d4a41f
Allow walking away from the statue within 2.5s to stop auto heal.
gentlespoon May 6, 2022
c582814
Fix #593: Accidental death of character
gentlespoon May 6, 2022
438f845
Convert to the superior language system. (pt. 3)
KingRainbow44 May 6, 2022
7899a60
Add the `en-US` language.
KingRainbow44 May 6, 2022
57a3d53
Add the `zh-TW` language.
KingRainbow44 May 6, 2022
686df18
Ensure we have a fallback for localization
KingRainbow44 May 6, 2022
d8719ec
Update .gitignore & remove files
KingRainbow44 May 6, 2022
80c9119
Merge `development` into `localization`
KingRainbow44 May 6, 2022
4264ca0
Update `Utils.java`
KingRainbow44 May 6, 2022
59b24aa
Rename `en-US` locale
KingRainbow44 May 7, 2022
e6cb97a
Bug fixes
KingRainbow44 May 7, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ mongod.exe
/*.sh
language/
languages/
gacha_mappings.js
gacha-mapping.js
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ plugins {
// Eclipse Support
id 'eclipse'

// Intelij Support
// IntelliJ Support
id 'idea'

// Maven
Expand Down
112 changes: 112 additions & 0 deletions data/ExpeditionReward.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
[
{
"expId": 301,
"expeditionRewardDataList": [
{
"hourTime": 4,
"expeditionRewardData": [
{
"itemId": 202,
"minCount": 625,
"maxCount": 625
}
]
},
{
"hourTime": 8,
"expeditionRewardData": [
{
"itemId": 202,
"minCount": 1575,
"maxCount": 1575
}
]
},
{
"hourTime": 12,
"expeditionRewardData": [
{
"itemId": 202,
"minCount": 2500,
"maxCount": 2500
}
]
},
{
"hourTime": 20,
"expeditionRewardData": [
{
"itemId": 202,
"minCount": 5000,
"maxCount": 5000
}
]
}
]
},
{
"expId": 305,
"expeditionRewardDataList": [
{
"hourTime": 4,
"rewardMora": 0,
"expeditionRewardData": [
{
"itemId": 100064,
"minCount": 1,
"maxCount": 1
}, {
"itemId": 101210,
"minCount": 1,
"maxCount": 1
}
]
},
{
"hourTime": 8,
"rewardMora": 0,
"expeditionRewardData": [
{
"itemId": 100064,
"minCount": 2,
"maxCount": 4
}, {
"itemId": 101210,
"minCount": 2,
"maxCount": 4
}
]
},
{
"hourTime": 12,
"rewardMora": 0,
"expeditionRewardData": [
{
"itemId": 100064,
"minCount": 4,
"maxCount": 6
}, {
"itemId": 101210,
"minCount": 4,
"maxCount": 6
}
]
},
{
"hourTime": 20,
"rewardMora": 0,
"expeditionRewardData": [
{
"itemId": 100064,
"minCount": 8,
"maxCount": 12
}, {
"itemId": 101210,
"minCount": 8,
"maxCount": 12
}
]
}
]
}
]
5 changes: 5 additions & 0 deletions proto/DungeonSettleNotify.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ option java_package = "emu.grasscutter.net.proto";

import "ParamList.proto";
import "StrengthenPointData.proto";
import "TowerLevelEndNotify.proto";

message DungeonSettleNotify {
oneof Detail {
TowerLevelEndNotify tower_level_end_notify = 101;
// it has more!
}
uint32 dungeon_id = 1;
bool is_success = 2;
repeated uint32 fail_cond_list = 3;
Expand Down
16 changes: 16 additions & 0 deletions proto/TowerBuffSelectReq.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

message TowerBuffSelectReq {
enum CmdId {
option allow_alias = true;
ENET_CHANNEL_ID = 0;
NONE = 0;
ENET_IS_RELIABLE = 1;
IS_ALLOW_CLIENT = 1;
CMD_ID = 2424;
}

uint32 tower_buff_id = 1;
}
16 changes: 16 additions & 0 deletions proto/TowerBuffSelectRsp.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

message TowerBuffSelectRsp {
enum CmdId {
option allow_alias = true;
NONE = 0;
ENET_CHANNEL_ID = 0;
ENET_IS_RELIABLE = 1;
CMD_ID = 2491;
}

int32 retcode = 1;
uint32 tower_buff_id = 2;
}
17 changes: 17 additions & 0 deletions proto/TowerCurLevelRecordChangeNotify.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

import "TowerCurLevelRecord.proto";

message TowerCurLevelRecordChangeNotify {
enum CmdId {
option allow_alias = true;
NONE = 0;
ENET_CHANNEL_ID = 0;
ENET_IS_RELIABLE = 1;
CMD_ID = 2489;
}

TowerCurLevelRecord cur_level_record = 1;
}
16 changes: 16 additions & 0 deletions proto/TowerEnterLevelReq.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

message TowerEnterLevelReq {
enum CmdId {
option allow_alias = true;
ENET_CHANNEL_ID = 0;
NONE = 0;
ENET_IS_RELIABLE = 1;
IS_ALLOW_CLIENT = 1;
CMD_ID = 2412;
}

uint32 enter_point_id = 1;
}
18 changes: 18 additions & 0 deletions proto/TowerEnterLevelRsp.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

message TowerEnterLevelRsp {
enum CmdId {
option allow_alias = true;
NONE = 0;
ENET_CHANNEL_ID = 0;
ENET_IS_RELIABLE = 1;
CMD_ID = 2426;
}

int32 retcode = 1;
uint32 floor_id = 2;
uint32 level_index = 3;
repeated uint32 tower_buff_id_list = 4;
}
18 changes: 18 additions & 0 deletions proto/TowerFloorRecordChangeNotify.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

import "TowerFloorRecord.proto";

message TowerFloorRecordChangeNotify {
enum CmdId {
option allow_alias = true;
NONE = 0;
ENET_CHANNEL_ID = 0;
ENET_IS_RELIABLE = 1;
CMD_ID = 2418;
}

repeated TowerFloorRecord tower_floor_record_list = 1;
bool is_finished_entrance_floor = 2;
}
26 changes: 26 additions & 0 deletions proto/TowerLevelEndNotify.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";
import "ItemParam.proto";

message TowerLevelEndNotify {
enum CmdId {
option allow_alias = true;
NONE = 0;
ENET_CHANNEL_ID = 0;
ENET_IS_RELIABLE = 1;
CMD_ID = 2456;
}

enum ContinueStateType {
CONTINUE_STATE_CAN_NOT_CONTINUE = 0;
CONTINUE_STATE_CAN_ENTER_NEXT_LEVEL = 1;
CONTINUE_STATE_CAN_ENTER_NEXT_FLOOR = 2;
}

bool is_success = 1;
repeated uint32 finished_star_cond_list = 2;
repeated ItemParam reward_item_list = 3;
uint32 continue_state = 4;
uint32 next_floor_id = 5;
}
9 changes: 9 additions & 0 deletions proto/TowerLevelStarCondData.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

message TowerLevelStarCondData {
uint32 star_cond_index = 3;
uint32 cond_value = 4;
bool is_pause = 5;
}
19 changes: 19 additions & 0 deletions proto/TowerLevelStarCondNotify.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

import "TowerLevelStarCondData.proto";

message TowerLevelStarCondNotify {
enum CmdId {
option allow_alias = true;
NONE = 0;
ENET_CHANNEL_ID = 0;
ENET_IS_RELIABLE = 1;
CMD_ID = 2492;
}

uint32 floor_id = 1;
uint32 level_index = 2;
repeated TowerLevelStarCondData cond_data_list = 3;
}
19 changes: 19 additions & 0 deletions proto/TowerTeamSelectReq.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

import "TowerTeam.proto";

message TowerTeamSelectReq {
enum CmdId {
option allow_alias = true;
ENET_CHANNEL_ID = 0;
NONE = 0;
ENET_IS_RELIABLE = 1;
IS_ALLOW_CLIENT = 1;
CMD_ID = 2401;
}

uint32 floor_id = 1;
repeated TowerTeam tower_team_list = 2;
}
15 changes: 15 additions & 0 deletions proto/TowerTeamSelectRsp.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
syntax = "proto3";

option java_package = "emu.grasscutter.net.proto";

message TowerTeamSelectRsp {
enum CmdId {
option allow_alias = true;
NONE = 0;
ENET_CHANNEL_ID = 0;
ENET_IS_RELIABLE = 1;
CMD_ID = 2494;
}

int32 retcode = 1;
}
15 changes: 15 additions & 0 deletions proto/WorldPlayerReviveReq.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
syntax = "proto3";
option csharp_namespace = "YSFreedom.Common.Protocol";


message WorldPlayerReviveReq {
enum CmdId {
option allow_alias = true;
ENET_CHANNEL_ID = 0;
NONE = 0;
ENET_IS_RELIABLE = 1;
IS_ALLOW_CLIENT = 1;
CMD_ID = 288;
}

}
7 changes: 6 additions & 1 deletion src/main/java/emu/grasscutter/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import emu.grasscutter.game.mail.Mail;

public final class Config {

public String DatabaseUrl = "mongodb://localhost:27017";
public String DatabaseCollection = "grasscutter";

Expand Down Expand Up @@ -41,6 +40,8 @@ public static class DispatchServerOptions {
public String KeystorePassword = "123456";
public Boolean UseSSL = true;
public Boolean FrontHTTPS = true;
public Boolean CORS = false;
public String[] CORSAllowedOrigins = new String[] { "*" };

public boolean AutomaticallyCreateAccounts = false;
public String[] defaultPermissions = new String[] { "" };
Expand Down Expand Up @@ -80,6 +81,10 @@ public static class GameServerOptions {
public boolean WatchGacha = false;
public String ServerNickname = "Server";
public int ServerAvatarId = 10000007;
public int ServerNameCardId = 210001;
public int ServerLevel = 1;
public int ServerWorldLevel = 1;
public String ServerSignature = "Server Signature";
public int[] WelcomeEmotes = {2007, 1002, 4010};
public String WelcomeMotd = "Welcome to Grasscutter emu";
public String WelcomeMailTitle = "Welcome to Grasscutter!";
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/emu/grasscutter/GameConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ public final class GameConstants {
public static final int MAIN_CHARACTER_FEMALE = 10000007;
public static final String SERVER_AVATAR_NAME = Grasscutter.getConfig().getGameServerOptions().ServerNickname;
public static final int SERVER_AVATAR_ID = Grasscutter.getConfig().getGameServerOptions().ServerAvatarId;
public static final String SERVER_SIGNATURE = Grasscutter.getConfig().getGameServerOptions().ServerSignature;
public static final Position START_POSITION = new Position(2747, 194, -1719);
public static final int SERVER_NAMECARD_ID = Grasscutter.getConfig().getGameServerOptions().ServerNameCardId;
public static final int SERVER_LEVEL = Grasscutter.getConfig().getGameServerOptions().ServerLevel;
public static final int SERVER_WORLD_LEVEL = Grasscutter.getConfig().getGameServerOptions().ServerWorldLevel;

public static final int MAX_FRIENDS = 45;
public static final int MAX_FRIEND_REQUESTS = 50;
Expand Down
Loading