mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Some proto name changes
This commit is contained in:
@@ -29,13 +29,12 @@ public class MusicGameActivityHandler extends ActivityHandler {
|
|||||||
.putAllMusicGameRecordMap(
|
.putAllMusicGameRecordMap(
|
||||||
musicGamePlayerData.getMusicGameRecord().values().stream()
|
musicGamePlayerData.getMusicGameRecord().values().stream()
|
||||||
.collect(Collectors.toMap(MusicGamePlayerData.MusicGameRecord::getMusicId, MusicGamePlayerData.MusicGameRecord::toProto)))
|
.collect(Collectors.toMap(MusicGamePlayerData.MusicGameRecord::getMusicId, MusicGamePlayerData.MusicGameRecord::toProto)))
|
||||||
|
|
||||||
.addAllPersonCustomBeatmap(musicGamePlayerData.getPersonalCustomBeatmapRecord().values().stream()
|
.addAllPersonCustomBeatmap(musicGamePlayerData.getPersonalCustomBeatmapRecord().values().stream()
|
||||||
.map(MusicGamePlayerData.CustomBeatmapRecord::toPersonalBriefProto)
|
.map(MusicGamePlayerData.CustomBeatmapRecord::toPersonalBriefProto)
|
||||||
.map(MusicBriefInfoOuterClass.MusicBriefInfo.Builder::build)
|
.map(MusicBriefInfoOuterClass.MusicBriefInfo.Builder::build)
|
||||||
.toList())
|
.toList())
|
||||||
|
|
||||||
.addAllPersonCustomBeatmap(musicGamePlayerData.getOthersCustomBeatmapRecord().values().stream()
|
.addAllOthersCustomBeatmap(musicGamePlayerData.getOthersCustomBeatmapRecord().values().stream()
|
||||||
.map(MusicGamePlayerData.CustomBeatmapRecord::toOthersBriefProto)
|
.map(MusicGamePlayerData.CustomBeatmapRecord::toOthersBriefProto)
|
||||||
.map(MusicBriefInfoOuterClass.MusicBriefInfo.Builder::build)
|
.map(MusicBriefInfoOuterClass.MusicBriefInfo.Builder::build)
|
||||||
.toList())
|
.toList())
|
||||||
|
|||||||
@@ -71,8 +71,7 @@ public class MusicGamePlayerData {
|
|||||||
.setMaxScore(musicGameBeatmap.getMaxScore())
|
.setMaxScore(musicGameBeatmap.getMaxScore())
|
||||||
.setPosition(musicGameBeatmap.getSavePosition())
|
.setPosition(musicGameBeatmap.getSavePosition())
|
||||||
.setMusicNoteCount(musicGameBeatmap.getMusicNoteCount())
|
.setMusicNoteCount(musicGameBeatmap.getMusicNoteCount())
|
||||||
.setMusicShareId(musicShareId)
|
.setMusicShareId(musicShareId);
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MusicBriefInfoOuterClass.MusicBriefInfo.Builder toOthersBriefProto(){
|
public MusicBriefInfoOuterClass.MusicBriefInfo.Builder toOthersBriefProto(){
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class EntityAvatar extends GameEntity {
|
|||||||
|
|
||||||
if (healed > 0f) {
|
if (healed > 0f) {
|
||||||
getScene().broadcastPacket(
|
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.getTeamManager().healAvatar(entity.getAvatar(), 0, needHP);
|
||||||
player.getSession().send(new PacketEntityFightPropChangeReasonNotify(entity, FightProperty.FIGHT_PROP_CUR_HP,
|
player.getSession().send(new PacketEntityFightPropChangeReasonNotify(entity, FightProperty.FIGHT_PROP_CUR_HP,
|
||||||
((float) needHP / 100), List.of(3), PropChangeReason.PROP_CHANGE_REASON_STATUE_RECOVER,
|
((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));
|
player.getSession().send(new PacketEntityFightPropUpdateNotify(entity, FightProperty.FIGHT_PROP_CUR_HP));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ public class DeforestationManager {
|
|||||||
public void onDeforestationInvoke(HitTreeNotifyOuterClass.HitTreeNotify hit){
|
public void onDeforestationInvoke(HitTreeNotifyOuterClass.HitTreeNotify hit){
|
||||||
synchronized (currentRecord) {
|
synchronized (currentRecord) {
|
||||||
//Grasscutter.getLogger().info("onDeforestationInvoke! Wood records {}", currentRecord);
|
//Grasscutter.getLogger().info("onDeforestationInvoke! Wood records {}", currentRecord);
|
||||||
VectorOuterClass.Vector hitPosition = hit.getHitPostion();
|
VectorOuterClass.Vector hitPosition = hit.getTreePos();
|
||||||
int woodType = hit.getWoodType();
|
int woodType = hit.getTreeType();
|
||||||
if (ColliderTypeToWoodItemID.containsKey(woodType)) {// is a available wood type
|
if (ColliderTypeToWoodItemID.containsKey(woodType)) {// is a available wood type
|
||||||
Scene scene = player.getScene();
|
Scene scene = player.getScene();
|
||||||
int itemId = ColliderTypeToWoodItemID.get(woodType);
|
int itemId = ColliderTypeToWoodItemID.get(woodType);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class BasePacket {
|
|||||||
if (this.getHeader() != null && clientSequence == 0) {
|
if (this.getHeader() != null && clientSequence == 0) {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
setHeader(PacketHead.newBuilder().setClientSequenceId(clientSequence).setTimestamp(System.currentTimeMillis()).build().toByteArray());
|
setHeader(PacketHead.newBuilder().setClientSequenceId(clientSequence).setSentMs(System.currentTimeMillis()).build().toByteArray());
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,6 @@ public class HandlerGetAllMailReq extends PacketHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||||
GetAllMailReqOuterClass.GetAllMailReq req = GetAllMailReqOuterClass.GetAllMailReq.parseFrom(payload);
|
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.game.GameSession;
|
||||||
import emu.grasscutter.server.packet.send.PacketHomeUnknown2Rsp;
|
import emu.grasscutter.server.packet.send.PacketHomeUnknown2Rsp;
|
||||||
|
|
||||||
@Opcodes(PacketOpcodes.HomeUnknown2Req)
|
@Opcodes(PacketOpcodes.Unk2700_ACILPONNGGK_ClientReq)
|
||||||
public class HandlerHomeUnknown2Req extends PacketHandler {
|
public class HandlerHomeUnknown2Req extends PacketHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import emu.grasscutter.net.proto.WidgetSlotDataOuterClass;
|
|||||||
import emu.grasscutter.net.proto.WidgetSlotTagOuterClass;
|
import emu.grasscutter.net.proto.WidgetSlotTagOuterClass;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class PacketAllWidgetDataNotify extends BasePacket {
|
public class PacketAllWidgetDataNotify extends BasePacket {
|
||||||
|
|
||||||
@@ -24,7 +23,7 @@ public class PacketAllWidgetDataNotify extends BasePacket {
|
|||||||
LunchBoxDataOuterClass.LunchBoxData.newBuilder().build()
|
LunchBoxDataOuterClass.LunchBoxData.newBuilder().build()
|
||||||
)
|
)
|
||||||
// Maybe it's a little difficult, or it makes you upset :(
|
// 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(* ̄▽ ̄*)ブ
|
// So, goodbye, and hopefully sometime in the future o(* ̄▽ ̄*)ブ
|
||||||
.addAllCoolDownGroupDataList(List.of())
|
.addAllCoolDownGroupDataList(List.of())
|
||||||
// I'll see your PR with a title that says (・∀・(・∀・(・∀・*)
|
// I'll see your PR with a title that says (・∀・(・∀・(・∀・*)
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ public class PacketGetAllMailRsp extends BasePacket {
|
|||||||
GetAllMailRsp.Builder proto = GetAllMailRsp.newBuilder();
|
GetAllMailRsp.Builder proto = GetAllMailRsp.newBuilder();
|
||||||
|
|
||||||
if (isGiftMail) {
|
if (isGiftMail) {
|
||||||
proto.setANKKGPJCINB(true);
|
proto.setUnk2700OPEHLDAGICF(true);
|
||||||
} else {
|
} else {
|
||||||
proto.setANKKGPJCINB(false);
|
proto.setUnk2700OPEHLDAGICF(false);
|
||||||
|
|
||||||
if (player.getAllMail().size() != 0) { // Make sure the player has mail
|
if (player.getAllMail().size() != 0) { // Make sure the player has mail
|
||||||
List<MailData> mailDataList = new ArrayList<MailData>();
|
List<MailData> mailDataList = new ArrayList<MailData>();
|
||||||
@@ -61,7 +61,7 @@ public class PacketGetAllMailRsp extends BasePacket {
|
|||||||
mailData.setImportance(message.importance);
|
mailData.setImportance(message.importance);
|
||||||
mailData.setIsRead(message.isRead);
|
mailData.setIsRead(message.isRead);
|
||||||
mailData.setIsAttachmentGot(message.isAttachmentGot);
|
mailData.setIsAttachmentGot(message.isAttachmentGot);
|
||||||
mailData.setBHCAHLJIKFFValue(1);
|
mailData.setUnk2700NDPPGJKJOMHValue(1);
|
||||||
|
|
||||||
mailDataList.add(mailData.build());
|
mailDataList.add(mailData.build());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import emu.grasscutter.net.proto.HomeUnknown1NotifyOuterClass;
|
|||||||
public class PacketHomeUnknown1Notify extends BasePacket {
|
public class PacketHomeUnknown1Notify extends BasePacket {
|
||||||
|
|
||||||
public PacketHomeUnknown1Notify(boolean isEnterEditMode) {
|
public PacketHomeUnknown1Notify(boolean isEnterEditMode) {
|
||||||
super(PacketOpcodes.HomeUnknown1Notify);
|
super(PacketOpcodes.Unk2700_JDMPECKFGIG_ServerNotify);
|
||||||
|
|
||||||
var proto = HomeUnknown1NotifyOuterClass.HomeUnknown1Notify.newBuilder();
|
var proto = HomeUnknown1NotifyOuterClass.HomeUnknown1Notify.newBuilder();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import emu.grasscutter.net.packet.PacketOpcodes;
|
|||||||
public class PacketHomeUnknown2Rsp extends BasePacket {
|
public class PacketHomeUnknown2Rsp extends BasePacket {
|
||||||
|
|
||||||
public PacketHomeUnknown2Rsp() {
|
public PacketHomeUnknown2Rsp() {
|
||||||
super(PacketOpcodes.HomeUnknown2Rsp);
|
super(PacketOpcodes.Unk2700_KIIOGMKFNNP_ServerRsp);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class PacketMailChangeNotify extends BasePacket {
|
|||||||
mailData.setImportance(message.importance);
|
mailData.setImportance(message.importance);
|
||||||
mailData.setIsRead(message.isRead);
|
mailData.setIsRead(message.isRead);
|
||||||
mailData.setIsAttachmentGot(message.isAttachmentGot);
|
mailData.setIsAttachmentGot(message.isAttachmentGot);
|
||||||
mailData.setBHCAHLJIKFFValue(message.stateValue);
|
mailData.setUnk2700NDPPGJKJOMHValue(message.stateValue);
|
||||||
|
|
||||||
proto.addMailList(mailData.build());
|
proto.addMailList(mailData.build());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ public class PacketQueryCodexMonsterBeKilledNumRsp extends BasePacket {
|
|||||||
if (player.getCodex().getUnlockedAnimal().containsKey(animal)) {
|
if (player.getCodex().getUnlockedAnimal().containsKey(animal)) {
|
||||||
proto.addCodexIdList(animal)
|
proto.addCodexIdList(animal)
|
||||||
.addBeKilledNumList(player.getCodex().getUnlockedAnimal().get(animal))
|
.addBeKilledNumList(player.getCodex().getUnlockedAnimal().get(animal))
|
||||||
.addCHPBKCLKPCJ(0);
|
.addUnk2700MKOBMGGPNMI(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user