mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-10 04:32:53 +08:00
Some proto name changes
This commit is contained in:
parent
bc2c5deb48
commit
591ca4805a
@ -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 {
|
||||
|
||||
@ -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()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -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());
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
.addBeKilledNumList(player.getCodex().getUnlockedAnimal().get(animal))
|
||||
.addUnk2700MKOBMGGPNMI(0);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user