Removed debug messages, readded protos, fixed gradle

This commit is contained in:
Benjamin Elsdon 2022-04-27 08:36:13 +08:00
parent b9f7c657ac
commit ed3f88f013
3 changed files with 4 additions and 4 deletions

View File

@ -195,3 +195,7 @@ javadoc {
options.addBooleanOption('html5', true)
}
}
processResources {
dependsOn "generateProto"
}

View 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
}

View File

@ -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);