mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-12-05 03:03:31 +00:00
f139818224
* feature(2.7 version): support 2.7 version & upload new protos 1. Support GC in GI 2.7.0; 2. Upload new protos; 3. Fix some bugs cuz by new protos. BREAKING CHANGE: all * fix(database helper): fix player uid issues * fix(ability embryo): uint32 to fixed32 * fix(proto): map mark rename MAP_MARK_FROM_TYPE_NOE to MAP_MARK_FROM_TYPE_NONE * fix(game version): change game version to 2.7.0 * perf(proto): remove unused protos 1. Remove unused protos; 2. Temporarily commented out some of the proto fields. * fix(proto): uint32 to fixed32
60 lines
2.3 KiB
Java
60 lines
2.3 KiB
Java
package emu.grasscutter.server.packet.send;
|
||
|
||
import emu.grasscutter.game.player.Player;
|
||
import emu.grasscutter.net.packet.BasePacket;
|
||
import emu.grasscutter.net.packet.PacketOpcodes;
|
||
import emu.grasscutter.net.proto.AllWidgetDataNotifyOuterClass.AllWidgetDataNotify;
|
||
import emu.grasscutter.net.proto.LunchBoxDataOuterClass;
|
||
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 {
|
||
|
||
public PacketAllWidgetDataNotify(Player player) {
|
||
super(PacketOpcodes.AllWidgetDataNotify);
|
||
|
||
// 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 (player.getWidgetId() == null) {
|
||
proto.addAllSlotList(List.of());
|
||
} else {
|
||
proto.addSlotList(
|
||
WidgetSlotDataOuterClass.WidgetSlotData.newBuilder()
|
||
.setIsActive(true)
|
||
.setMaterialId(player.getWidgetId())
|
||
.build()
|
||
);
|
||
|
||
proto.addSlotList(
|
||
WidgetSlotDataOuterClass.WidgetSlotData.newBuilder()
|
||
.setTag(WidgetSlotTagOuterClass.WidgetSlotTag.WIDGET_SLOT_TAG_ATTACH_AVATAR)
|
||
.build()
|
||
);
|
||
}
|
||
|
||
AllWidgetDataNotify protoData = proto.build();
|
||
|
||
this.setData(protoData);
|
||
}
|
||
}
|
||
|