Commit ed3f88f0 authored by Benjamin Elsdon's avatar Benjamin Elsdon
Browse files

Removed debug messages, readded protos, fixed gradle

parent b9f7c657
......@@ -194,4 +194,8 @@ javadoc {
if(JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
processResources {
dependsOn "generateProto"
}
\ No newline at end of file
......@@ -609,7 +609,6 @@ public class GenshinPlayer {
this.save();
Grasscutter.getLogger().info("Mail sent to user [" + this.getUid() + ":" + this.getNickname() + "]!");
if(this.isOnline()) {
Grasscutter.getLogger().info("user online.");
this.sendPacket(new PacketMailChangeNotify(this, message));
} // TODO: setup a way for the mail notification to show up when someone receives mail when they were offline
}
......
......@@ -41,11 +41,8 @@ public class PacketGetAllMailRsp extends GenshinPacket {
for (Mail message : player.getAllMail()) {
if(message.stateValue == 1) { // Make sure it isn't a gift
Grasscutter.getLogger().info("a");
if (message.expireTime > (int) Instant.now().getEpochSecond()) { // Make sure the message isn't expired (The game won't show expired mail, but I don't want to send unnecessary information).
Grasscutter.getLogger().info("b");
if(mailDataList.size() <= 1000) { // Make sure that there isn't over 1000 messages in the mailbox. (idk what will happen if there is but the game probably won't like it.)
Grasscutter.getLogger().info("c");
MailTextContent.Builder mailTextContent = MailTextContent.newBuilder();
mailTextContent.setTitle(message.mailContent.title);
mailTextContent.setContent(message.mailContent.content);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment