Commit 591ca480 authored by AnimeGitB's avatar AnimeGitB Committed by Luke H-W
Browse files

Some proto name changes

parent bc2c5deb
......@@ -29,13 +29,12 @@ public class MusicGameActivityHandler extends ActivityHandler {
.putAllMusicGameRecordMap(
musicGamePlayerData.getMusicGameRecord().values().stream()
.collect(Collectors.toMap(MusicGamePlayerData.MusicGameRecord::getMusicId, MusicGamePlayerData.MusicGameRecord::toProto)))
.addAllPersonCustomBeatmap(musicGamePlayerData.getPersonalCustomBeatmapRecord().values().stream()
.map(MusicGamePlayerData.CustomBeatmapRecord::toPersonalBriefProto)
.map(MusicBriefInfoOuterClass.MusicBriefInfo.Builder::build)
.toList())
.addAllPersonCustomBeatmap(musicGamePlayerData.getOthersCustomBeatmapRecord().values().stream()
.addAllOthersCustomBeatmap(musicGamePlayerData.getOthersCustomBeatmapRecord().values().stream()
.map(MusicGamePlayerData.CustomBeatmapRecord::toOthersBriefProto)
.map(MusicBriefInfoOuterClass.MusicBriefInfo.Builder::build)
.toList())
......
......@@ -71,8 +71,7 @@ public class MusicGamePlayerData {
.setMaxScore(musicGameBeatmap.getMaxScore())
.setPosition(musicGameBeatmap.getSavePosition())
.setMusicNoteCount(musicGameBeatmap.getMusicNoteCount())
.setMusicShareId(musicShareId)
;
.setMusicShareId(musicShareId);
}
public MusicBriefInfoOuterClass.MusicBriefInfo.Builder toOthersBriefProto(){
......
......@@ -125,7 +125,7 @@ public class EntityAvatar extends GameEntity {
if (healed > 0f) {
getScene().broadcastPacket(
new PacketEntityFightPropChangeReasonNotify(this, FightProperty.FIGHT_PROP_CUR_HP, healed, PropChangeReason.PROP_CHANGE_REASON_ABILITY, ChangeHpReason.CHANGE_HP_REASON_CHANGE_HP_ADD_ABILITY)
new PacketEntityFightPropChangeReasonNotify(this, FightProperty.FIGHT_PROP_CUR_HP, healed, PropChangeReason.PROP_CHANGE_REASON_ABILITY, ChangeHpReason.CHANGE_HP_REASON_ADD_ABILITY)
);
}
......
......@@ -158,7 +158,7 @@ public class SotSManager {
player.getTeamManager().healAvatar(entity.getAvatar(), 0, needHP);
player.getSession().send(new PacketEntityFightPropChangeReasonNotify(entity, FightProperty.FIGHT_PROP_CUR_HP,
((float) needHP / 100), List.of(3), PropChangeReason.PROP_CHANGE_REASON_STATUE_RECOVER,
ChangeHpReason.CHANGE_HP_REASON_CHANGE_HP_ADD_STATUE));
ChangeHpReason.CHANGE_HP_REASON_ADD_STATUE));
player.getSession().send(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_CUR_HP));
}
......
......@@ -48,8 +48,8 @@ public class DeforestationManager {
public void onDeforestationInvoke(HitTreeNotifyOuterClass.HitTreeNotify hit){
synchronized (currentRecord) {
//Grasscutter.getLogger().info("onDeforestationInvoke! Wood records {}", currentRecord);
VectorOuterClass.Vector hitPosition = hit.getHitPostion();
int woodType = hit.getWoodType();
VectorOuterClass.Vector hitPosition = hit.getTreePos();
int woodType = hit.getTreeType();
if (ColliderTypeToWoodItemID.containsKey(woodType)) {// is a available wood type
Scene scene = player.getScene();
int itemId = ColliderTypeToWoodItemID.get(woodType);
......
......@@ -84,7 +84,7 @@ public class BasePacket {
if (this.getHeader() != null && clientSequence == 0) {
return this;
}
setHeader(PacketHead.newBuilder().setClientSequenceId(clientSequence).setTimestamp(System.currentTimeMillis()).build().toByteArray());
setHeader(PacketHead.newBuilder().setClientSequenceId(clientSequence).setSentMs(System.currentTimeMillis()).build().toByteArray());
return this;
}
......
......@@ -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()));
}
}
......@@ -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
......
......@@ -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 {
......@@ -24,7 +23,7 @@ public class PacketAllWidgetDataNotify extends BasePacket {
LunchBoxDataOuterClass.LunchBoxData.newBuilder().build()
)
// Maybe it's a little difficult, or it makes you upset :(
.addAllOneoffGatherPointDetectorDataList(List.of())
.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 (・∀・(・∀・(・∀・*)
......
......@@ -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());
}
......
......@@ -7,7 +7,7 @@ import emu.grasscutter.net.proto.HomeUnknown1NotifyOuterClass;
public class PacketHomeUnknown1Notify extends BasePacket {
public PacketHomeUnknown1Notify(boolean isEnterEditMode) {
super(PacketOpcodes.HomeUnknown1Notify);
super(PacketOpcodes.Unk2700_JDMPECKFGIG_ServerNotify);
var proto = HomeUnknown1NotifyOuterClass.HomeUnknown1Notify.newBuilder();
......
......@@ -6,7 +6,7 @@ import emu.grasscutter.net.packet.PacketOpcodes;
public class PacketHomeUnknown2Rsp extends BasePacket {
public PacketHomeUnknown2Rsp() {
super(PacketOpcodes.HomeUnknown2Rsp);
super(PacketOpcodes.Unk2700_KIIOGMKFNNP_ServerRsp);
}
}
......@@ -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());
}
......
......@@ -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);
.addUnk2700MKOBMGGPNMI(0);
}
});
......
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