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