This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Difference Between CN and EN regions
1. (CN)Fixed the problem of unable to complete the construction 2. (CN)Fixed the crash issue when viewing ship details 3. Recharge is temporarily disabled because according to the code we cannot easily complete in-game purchases as they are implemented through the sdk at the end. 4. Fixed the problem of some page crashes. The reason is that azurlane will check whether the data has been tampered with on certain occasions(not for priv server). 5. Implemented the function of checking whether the commander exists on the login page 6. (CN_JP_KR_TW)Implemented ServerInterconnection in azurlane code, which seems to be used to switch ios/android servers. This content has only been tested in CN_JP_KR_TW.
- Loading branch information
1 parent
ca76e66
commit 75f4ef0
Showing
12 changed files
with
179 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package answer | ||
|
||
import ( | ||
"github.com/ggmolly/belfast/connection" | ||
"github.com/ggmolly/belfast/protobuf" | ||
"google.golang.org/protobuf/proto" | ||
) | ||
|
||
func ChargeCommandAnswer(buffer *[]byte, client *connection.Client) (int, int, error) { | ||
// Disable Charge | ||
response := protobuf.SC_11502{ | ||
Result: proto.Uint32(5002), | ||
PayId: proto.String(""), | ||
Url: proto.String(""), | ||
OrderSign: proto.String(""), | ||
} | ||
|
||
return client.SendMessage(11502, &response) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package answer | ||
|
||
import ( | ||
"github.com/ggmolly/belfast/connection" | ||
"github.com/ggmolly/belfast/protobuf" | ||
"google.golang.org/protobuf/proto" | ||
) | ||
|
||
func CheaterMark(buffer *[]byte, client *connection.Client) (int, int, error) { | ||
var protoData protobuf.CS_10994 | ||
err := proto.Unmarshal((*buffer), &protoData) | ||
if err != nil { | ||
return 0, 10995, err | ||
} | ||
|
||
response := protobuf.SC_10995{ | ||
Result: proto.Uint32(protoData.GetType()), | ||
} | ||
|
||
return client.SendMessage(10995, &response) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package answer | ||
|
||
import ( | ||
"github.com/ggmolly/belfast/connection" | ||
"github.com/ggmolly/belfast/consts" | ||
"github.com/ggmolly/belfast/protobuf" | ||
"google.golang.org/protobuf/proto" | ||
"os" | ||
) | ||
|
||
// In the Azurlane code, it is called ServerInterconnection, used to switch Android/iOS servers | ||
func Forge_SC10803_CN_JP_KR_TW(buffer *[]byte, client *connection.Client) (int, int, error) { | ||
belfastRegion := os.Getenv("AL_REGION") | ||
response := protobuf.SC_10803_CN_JP_KR_TW{ | ||
GatewayIp: proto.String(consts.RegionGateways[belfastRegion]), | ||
GatewayPort: proto.Uint32(80), | ||
ProxyIp: proto.String(consts.RegionProxies[belfastRegion]), | ||
ProxyPort: proto.Uint32(20000), | ||
} | ||
|
||
return client.SendMessage(10803, &response) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package answer | ||
|
||
import ( | ||
"github.com/ggmolly/belfast/connection" | ||
"github.com/ggmolly/belfast/protobuf" | ||
"google.golang.org/protobuf/proto" | ||
) | ||
|
||
// Check if an account exists on the game server | ||
func PlayerExist(buffer *[]byte, client *connection.Client) (int, int, error) { | ||
var protoData protobuf.CS_10026 | ||
err := proto.Unmarshal((*buffer), &protoData) | ||
if err != nil { | ||
return 0, 10027, err | ||
} | ||
|
||
response := protobuf.SC_10027{} | ||
|
||
err = client.GetCommander(protoData.GetAccountId()) | ||
if err != nil { | ||
// Player not found? | ||
response.UserId = proto.Uint32(0) | ||
response.Level = proto.Uint32(0) | ||
} else { | ||
// Even if the player is punished, we still return player information | ||
response.UserId = proto.Uint32(client.Commander.CommanderID) | ||
response.Level = proto.Uint32(uint32(client.Commander.Level)) | ||
} | ||
|
||
return client.SendMessage(10027, &response) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters