feature(widget): simple implementation of widget

Simple implementation of a part of the gadget support, very rough, hard code variables, I am very sorry for that. It can now handle part of the gadget rig. More features and better support await PRs from others. if no one else does, I'll give it a try.
This commit is contained in:
Yazawazi
2022-05-12 16:06:59 +08:00
committed by Melledy
parent f45e106b2a
commit 8c32438b52
8 changed files with 232 additions and 1 deletions

View File

@@ -82,6 +82,8 @@ public class Player {
private Set<Integer> flyCloakList;
private Set<Integer> costumeList;
private Integer widgetId;
@Transient private long nextGuid = 0;
@Transient private int peerId;
@Transient private World world;
@@ -297,6 +299,14 @@ public class Player {
this.updateProfile();
}
public Integer getWidgetId() {
return widgetId;
}
public void setWidgetId(Integer widgetId) {
this.widgetId = widgetId;
}
public Position getPos() {
return pos;
}
@@ -1141,6 +1151,9 @@ public class Player {
session.send(new PacketPlayerStoreNotify(this));
session.send(new PacketAvatarDataNotify(this));
session.send(new PacketAllWidgetDataNotify(this));
session.send(new PacketWidgetGadgetAllDataNotify());
getTodayMoonCard(); // The timer works at 0:0, some users log in after that, use this method to check if they have received a reward today or not. If not, send the reward.
session.send(new PacketPlayerEnterSceneNotify(this)); // Enter game world