diff --git a/src/generated/main/emu/lunarcore/proto/GateserverOuterClass.java b/src/generated/main/emu/lunarcore/proto/GateserverOuterClass.java index 827addc..014bf75 100644 --- a/src/generated/main/emu/lunarcore/proto/GateserverOuterClass.java +++ b/src/generated/main/emu/lunarcore/proto/GateserverOuterClass.java @@ -91,7 +91,7 @@ public final class GateserverOuterClass { /** *
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -107,6 +107,11 @@ public final class GateserverOuterClass {
*/
private final Utf8String ifixVersion = Utf8String.newEmptyInstance();
+ /**
+ * optional string msg = 1550;
+ */
+ private final Utf8String msg = Utf8String.newEmptyInstance();
+
private Gateserver() {
}
@@ -833,7 +838,7 @@ public final class GateserverOuterClass {
/**
*
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -845,7 +850,7 @@ public final class GateserverOuterClass {
/**
*
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -859,7 +864,7 @@ public final class GateserverOuterClass {
/**
*
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -871,7 +876,7 @@ public final class GateserverOuterClass {
/**
*
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -883,7 +888,7 @@ public final class GateserverOuterClass {
/**
*
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -896,7 +901,7 @@ public final class GateserverOuterClass {
/**
*
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -911,7 +916,7 @@ public final class GateserverOuterClass {
/**
*
- * lua version
+ * lua versionf
*
*
* optional string mdk_res_version = 1213;
@@ -1017,6 +1022,71 @@ public final class GateserverOuterClass {
return this;
}
+ /**
+ * optional string msg = 1550;
+ * @return whether the msg field is set
+ */
+ public boolean hasMsg() {
+ return (bitField0_ & 0x00010000) != 0;
+ }
+
+ /**
+ * optional string msg = 1550;
+ * @return this
+ */
+ public Gateserver clearMsg() {
+ bitField0_ &= ~0x00010000;
+ msg.clear();
+ return this;
+ }
+
+ /**
+ * optional string msg = 1550;
+ * @return the msg
+ */
+ public String getMsg() {
+ return msg.getString();
+ }
+
+ /**
+ * optional string msg = 1550;
+ * @return internal {@code Utf8String} representation of msg for reading
+ */
+ public Utf8String getMsgBytes() {
+ return this.msg;
+ }
+
+ /**
+ * optional string msg = 1550;
+ * @return internal {@code Utf8String} representation of msg for modifications
+ */
+ public Utf8String getMutableMsgBytes() {
+ bitField0_ |= 0x00010000;
+ return this.msg;
+ }
+
+ /**
+ * optional string msg = 1550;
+ * @param value the msg to set
+ * @return this
+ */
+ public Gateserver setMsg(final CharSequence value) {
+ bitField0_ |= 0x00010000;
+ msg.copyFrom(value);
+ return this;
+ }
+
+ /**
+ * optional string msg = 1550;
+ * @param value the msg to set
+ * @return this
+ */
+ public Gateserver setMsg(final Utf8String value) {
+ bitField0_ |= 0x00010000;
+ msg.copyFrom(value);
+ return this;
+ }
+
@Override
public Gateserver copyFrom(final Gateserver other) {
cachedSize = other.cachedSize;
@@ -1038,6 +1108,7 @@ public final class GateserverOuterClass {
clientSecretKey.copyFrom(other.clientSecretKey);
mdkResVersion.copyFrom(other.mdkResVersion);
ifixVersion.copyFrom(other.ifixVersion);
+ msg.copyFrom(other.msg);
}
return this;
}
@@ -1096,6 +1167,9 @@ public final class GateserverOuterClass {
if (other.hasIfixVersion()) {
getMutableIfixVersionBytes().copyFrom(other.ifixVersion);
}
+ if (other.hasMsg()) {
+ getMutableMsgBytes().copyFrom(other.msg);
+ }
return this;
}
@@ -1122,6 +1196,7 @@ public final class GateserverOuterClass {
clientSecretKey.clear();
mdkResVersion.clear();
ifixVersion.clear();
+ msg.clear();
return this;
}
@@ -1141,6 +1216,7 @@ public final class GateserverOuterClass {
clientSecretKey.clear();
mdkResVersion.clear();
ifixVersion.clear();
+ msg.clear();
return this;
}
@@ -1169,7 +1245,8 @@ public final class GateserverOuterClass {
&& (!hasIfixUrl() || ifixUrl.equals(other.ifixUrl))
&& (!hasClientSecretKey() || clientSecretKey.equals(other.clientSecretKey))
&& (!hasMdkResVersion() || mdkResVersion.equals(other.mdkResVersion))
- && (!hasIfixVersion() || ifixVersion.equals(other.ifixVersion));
+ && (!hasIfixVersion() || ifixVersion.equals(other.ifixVersion))
+ && (!hasMsg() || msg.equals(other.msg));
}
@Override
@@ -1238,6 +1315,10 @@ public final class GateserverOuterClass {
output.writeRawLittleEndian16((short) 20386);
output.writeStringNoTag(ifixVersion);
}
+ if ((bitField0_ & 0x00010000) != 0) {
+ output.writeRawLittleEndian16((short) 24818);
+ output.writeStringNoTag(msg);
+ }
}
@Override
@@ -1291,6 +1372,9 @@ public final class GateserverOuterClass {
if ((bitField0_ & 0x00008000) != 0) {
size += 2 + ProtoSink.computeStringSizeNoTag(ifixVersion);
}
+ if ((bitField0_ & 0x00010000) != 0) {
+ size += 2 + ProtoSink.computeStringSizeNoTag(msg);
+ }
return size;
}
@@ -1441,6 +1525,15 @@ public final class GateserverOuterClass {
input.readString(ifixVersion);
bitField0_ |= 0x00008000;
tag = input.readTag();
+ if (tag != 12402) {
+ break;
+ }
+ }
+ case 12402: {
+ // msg
+ input.readString(msg);
+ bitField0_ |= 0x00010000;
+ tag = input.readTag();
if (tag != 0) {
break;
}
@@ -1510,6 +1603,9 @@ public final class GateserverOuterClass {
if ((bitField0_ & 0x00008000) != 0) {
output.writeString(FieldNames.ifixVersion, ifixVersion);
}
+ if ((bitField0_ & 0x00010000) != 0) {
+ output.writeString(FieldNames.msg, msg);
+ }
output.endObject();
}
@@ -1704,6 +1800,17 @@ public final class GateserverOuterClass {
}
break;
}
+ case 108417: {
+ if (input.isAtField(FieldNames.msg)) {
+ if (!input.trySkipNullValue()) {
+ input.readString(msg);
+ bitField0_ |= 0x00010000;
+ }
+ } else {
+ input.skipUnknownField();
+ }
+ break;
+ }
default: {
input.skipUnknownField();
break;
@@ -1787,6 +1894,8 @@ public final class GateserverOuterClass {
static final FieldName mdkResVersion = FieldName.forField("mdkResVersion", "mdk_res_version");
static final FieldName ifixVersion = FieldName.forField("ifixVersion", "ifix_version");
+
+ static final FieldName msg = FieldName.forField("msg");
}
}
}
diff --git a/src/main/java/emu/lunarcore/data/excel/ItemExcel.java b/src/main/java/emu/lunarcore/data/excel/ItemExcel.java
index c368552..110e424 100644
--- a/src/main/java/emu/lunarcore/data/excel/ItemExcel.java
+++ b/src/main/java/emu/lunarcore/data/excel/ItemExcel.java
@@ -59,6 +59,28 @@ public class ItemExcel extends GameResource {
return this.relicExp;
}
+ public int getRarityNum() {
+ if (this.getRarity() == ItemRarity.Unknown) {
+ return 0;
+ }
+ if (this.getRarity() == ItemRarity.Normal) {
+ return 1;
+ }
+ if (this.getRarity() == ItemRarity.NotNormal) {
+ return 2;
+ }
+ if (this.getRarity() == ItemRarity.Rare) {
+ return 3;
+ }
+ if (this.getRarity() == ItemRarity.VeryRare) {
+ return 4;
+ }
+ if (this.getRarity() == ItemRarity.SuperRare) {
+ return 5;
+ }
+ return 0;
+ }
+
public int getRelicExpCost() {
if (this.relicExcel != null) {
return this.relicExcel.getCoinCost();
diff --git a/src/main/java/emu/lunarcore/server/http/handlers/QueryGatewayHandler.java b/src/main/java/emu/lunarcore/server/http/handlers/QueryGatewayHandler.java
index ec167d5..cf7e482 100644
--- a/src/main/java/emu/lunarcore/server/http/handlers/QueryGatewayHandler.java
+++ b/src/main/java/emu/lunarcore/server/http/handlers/QueryGatewayHandler.java
@@ -24,6 +24,7 @@ public class QueryGatewayHandler implements Handler {
.setRegionName(LunarCore.getConfig().getGameServer().getId())
.setIp(LunarCore.getConfig().getGameServer().getPublicAddress())
.setPort(LunarCore.getConfig().getGameServer().getPort())
+ .setMsg("Access verification failed. Please check if you have logged in to the correct account and server.") // in case there is some error idk
.setUnk1(true)
.setUnk2(true)
.setUnk3(true)