mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 12:05:39 +00:00
parent
b8fd2e2378
commit
2b0f2f74cb
@ -176,13 +176,13 @@ public final class RegionHandler implements Router {
|
||||
Logger logger = Grasscutter.getLogger();
|
||||
if (ctx.queryParamMap().containsKey("version") && ctx.queryParamMap().containsKey("platform")) {
|
||||
String versionName = ctx.queryParam("version");
|
||||
String versionCode = versionName.replaceAll("[/.0-9]*", "");
|
||||
String versionCode = versionName.substring(0,8);
|
||||
String platformName = ctx.queryParam("platform");
|
||||
|
||||
// Determine the region list to use based on the version and platform.
|
||||
if ("CNRELiOS".equals(versionCode)
|
||||
|| "CNRELWin".equals(versionCode)
|
||||
|| "CNRELAndroid".equals(versionCode)) {
|
||||
|| "CNRELAnd".equals(versionCode)) {
|
||||
// Use the CN region list.
|
||||
QueryAllRegionsEvent event = new QueryAllRegionsEvent(regionListResponseCN);
|
||||
event.call();
|
||||
@ -191,7 +191,7 @@ public final class RegionHandler implements Router {
|
||||
ctx.result(event.getRegionList());
|
||||
} else if ("OSRELiOS".equals(versionCode)
|
||||
|| "OSRELWin".equals(versionCode)
|
||||
|| "OSRELAndroid".equals(versionCode)) {
|
||||
|| "OSRELAnd".equals(versionCode)) {
|
||||
// Use the OS region list.
|
||||
QueryAllRegionsEvent event = new QueryAllRegionsEvent(regionListResponse);
|
||||
event.call();
|
||||
|
Loading…
Reference in New Issue
Block a user