Some proto name changes

This commit is contained in:
AnimeGitB
2022-07-13 12:09:02 +09:30
committed by Luke H-W
parent bc2c5deb48
commit 591ca4805a
14 changed files with 46 additions and 49 deletions

View File

@@ -16,6 +16,6 @@ public class HandlerGetAllMailReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
GetAllMailReqOuterClass.GetAllMailReq req = GetAllMailReqOuterClass.GetAllMailReq.parseFrom(payload);
session.send(new PacketGetAllMailRsp(session.getPlayer(), req.getANKKGPJCINB()));
session.send(new PacketGetAllMailRsp(session.getPlayer(), req.getUnk2700OPEHLDAGICF()));
}
}

View File

@@ -6,7 +6,7 @@ import emu.grasscutter.net.packet.PacketOpcodes;
import emu.grasscutter.server.game.GameSession;
import emu.grasscutter.server.packet.send.PacketHomeUnknown2Rsp;
@Opcodes(PacketOpcodes.HomeUnknown2Req)
@Opcodes(PacketOpcodes.Unk2700_ACILPONNGGK_ClientReq)
public class HandlerHomeUnknown2Req extends PacketHandler {
@Override

View File

@@ -9,7 +9,6 @@ import emu.grasscutter.net.proto.WidgetSlotDataOuterClass;
import emu.grasscutter.net.proto.WidgetSlotTagOuterClass;
import java.util.List;
import java.util.Map;
public class PacketAllWidgetDataNotify extends BasePacket {
@@ -19,35 +18,35 @@ public class PacketAllWidgetDataNotify extends BasePacket {
// TODO: Implement this
AllWidgetDataNotify.Builder proto = AllWidgetDataNotify.newBuilder()
// If you want to implement this, feel free to do so. :)
.setLunchBoxData(
LunchBoxDataOuterClass.LunchBoxData.newBuilder().build()
)
// Maybe it's a little difficult, or it makes you upset :(
.addAllOneoffGatherPointDetectorDataList(List.of())
// So, goodbye, and hopefully sometime in the future o(* ̄▽ ̄*)ブ
.addAllCoolDownGroupDataList(List.of())
// I'll see your PR with a title that says (・∀・(・∀・(・∀・*)
.addAllAnchorPointList(List.of())
// "Complete implementation of widget functionality" b ̄▽ ̄d 
.addAllClientCollectorDataList(List.of())
// Good luck, my boy.
.addAllNormalCoolDownDataList(List.of());
// If you want to implement this, feel free to do so. :)
.setLunchBoxData(
LunchBoxDataOuterClass.LunchBoxData.newBuilder().build()
)
// Maybe it's a little difficult, or it makes you upset :(
.addAllOneofGatherPointDetectorDataList(List.of())
// So, goodbye, and hopefully sometime in the future o(* ̄▽ ̄*)ブ
.addAllCoolDownGroupDataList(List.of())
// I'll see your PR with a title that says (・∀・(・∀・(・∀・*)
.addAllAnchorPointList(List.of())
// "Complete implementation of widget functionality" b ̄▽ ̄d 
.addAllClientCollectorDataList(List.of())
// Good luck, my boy.
.addAllNormalCoolDownDataList(List.of());
if (player.getWidgetId() == null) {
proto.addAllSlotList(List.of());
} else {
proto.addSlotList(
WidgetSlotDataOuterClass.WidgetSlotData.newBuilder()
.setIsActive(true)
.setMaterialId(player.getWidgetId())
.build()
WidgetSlotDataOuterClass.WidgetSlotData.newBuilder()
.setIsActive(true)
.setMaterialId(player.getWidgetId())
.build()
);
proto.addSlotList(
WidgetSlotDataOuterClass.WidgetSlotData.newBuilder()
.setTag(WidgetSlotTagOuterClass.WidgetSlotTag.WIDGET_SLOT_TAG_ATTACH_AVATAR)
.build()
WidgetSlotDataOuterClass.WidgetSlotData.newBuilder()
.setTag(WidgetSlotTagOuterClass.WidgetSlotTag.WIDGET_SLOT_TAG_ATTACH_AVATAR)
.build()
);
}

View File

@@ -24,9 +24,9 @@ public class PacketGetAllMailRsp extends BasePacket {
GetAllMailRsp.Builder proto = GetAllMailRsp.newBuilder();
if (isGiftMail) {
proto.setANKKGPJCINB(true);
proto.setUnk2700OPEHLDAGICF(true);
} else {
proto.setANKKGPJCINB(false);
proto.setUnk2700OPEHLDAGICF(false);
if (player.getAllMail().size() != 0) { // Make sure the player has mail
List<MailData> mailDataList = new ArrayList<MailData>();
@@ -61,7 +61,7 @@ public class PacketGetAllMailRsp extends BasePacket {
mailData.setImportance(message.importance);
mailData.setIsRead(message.isRead);
mailData.setIsAttachmentGot(message.isAttachmentGot);
mailData.setBHCAHLJIKFFValue(1);
mailData.setUnk2700NDPPGJKJOMHValue(1);
mailDataList.add(mailData.build());
}

View File

@@ -6,13 +6,13 @@ import emu.grasscutter.net.proto.HomeUnknown1NotifyOuterClass;
public class PacketHomeUnknown1Notify extends BasePacket {
public PacketHomeUnknown1Notify(boolean isEnterEditMode) {
super(PacketOpcodes.HomeUnknown1Notify);
public PacketHomeUnknown1Notify(boolean isEnterEditMode) {
super(PacketOpcodes.Unk2700_JDMPECKFGIG_ServerNotify);
var proto = HomeUnknown1NotifyOuterClass.HomeUnknown1Notify.newBuilder();
var proto = HomeUnknown1NotifyOuterClass.HomeUnknown1Notify.newBuilder();
proto.setIsEnterEditMode(isEnterEditMode);
proto.setIsEnterEditMode(isEnterEditMode);
this.setData(proto);
}
this.setData(proto);
}
}

View File

@@ -5,8 +5,8 @@ import emu.grasscutter.net.packet.PacketOpcodes;
public class PacketHomeUnknown2Rsp extends BasePacket {
public PacketHomeUnknown2Rsp() {
super(PacketOpcodes.HomeUnknown2Rsp);
public PacketHomeUnknown2Rsp() {
super(PacketOpcodes.Unk2700_KIIOGMKFNNP_ServerRsp);
}
}
}

View File

@@ -54,7 +54,7 @@ public class PacketMailChangeNotify extends BasePacket {
mailData.setImportance(message.importance);
mailData.setIsRead(message.isRead);
mailData.setIsAttachmentGot(message.isAttachmentGot);
mailData.setBHCAHLJIKFFValue(message.stateValue);
mailData.setUnk2700NDPPGJKJOMHValue(message.stateValue);
proto.addMailList(mailData.build());
}

View File

@@ -14,10 +14,10 @@ public class PacketQueryCodexMonsterBeKilledNumRsp extends BasePacket {
QueryCodexMonsterBeKilledNumRsp.Builder proto = QueryCodexMonsterBeKilledNumRsp.newBuilder();
codexList.forEach(animal -> {
if(player.getCodex().getUnlockedAnimal().containsKey(animal)){
if (player.getCodex().getUnlockedAnimal().containsKey(animal)) {
proto.addCodexIdList(animal)
.addBeKilledNumList(player.getCodex().getUnlockedAnimal().get(animal))
.addCHPBKCLKPCJ(0);
.addBeKilledNumList(player.getCodex().getUnlockedAnimal().get(animal))
.addUnk2700MKOBMGGPNMI(0);
}
});