mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Convert to the far superior config system
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package emu.grasscutter.game.gacha;
|
||||
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.net.proto.GachaInfoOuterClass.GachaInfo;
|
||||
import emu.grasscutter.net.proto.GachaUpInfoOuterClass.GachaUpInfo;
|
||||
|
||||
import static emu.grasscutter.Configuration.*;
|
||||
|
||||
public class GachaBanner {
|
||||
private int gachaType;
|
||||
private int scheduleId;
|
||||
@@ -95,15 +96,11 @@ public class GachaBanner {
|
||||
public GachaInfo toProto() {
|
||||
return toProto("");
|
||||
}
|
||||
|
||||
public GachaInfo toProto(String sessionKey) {
|
||||
String record = "http" + (Grasscutter.getConfig().getDispatchOptions().FrontHTTPS ? "s" : "") + "://"
|
||||
+ (Grasscutter.getConfig().getDispatchOptions().PublicIp.isEmpty() ?
|
||||
Grasscutter.getConfig().getDispatchOptions().Ip :
|
||||
Grasscutter.getConfig().getDispatchOptions().PublicIp)
|
||||
+ ":"
|
||||
+ Integer.toString(Grasscutter.getConfig().getDispatchOptions().PublicPort == 0 ?
|
||||
Grasscutter.getConfig().getDispatchOptions().Port :
|
||||
Grasscutter.getConfig().getDispatchOptions().PublicPort)
|
||||
String record = "http" + (DISPATCH_INFO.encryption.useInRouting ? "s" : "") + "://"
|
||||
+ lr(DISPATCH_INFO.accessAddress, DISPATCH_INFO.bindAddress) + ":"
|
||||
+ lr(DISPATCH_INFO.accessPort, DISPATCH_INFO.bindPort)
|
||||
+ "/gacha?s=" + sessionKey + "&gachaType=" + gachaType;
|
||||
// Grasscutter.getLogger().info("record = " + record);
|
||||
GachaInfo.Builder info = GachaInfo.newBuilder()
|
||||
|
||||
Reference in New Issue
Block a user