Format code [skip actions]

This commit is contained in:
github-actions 2023-09-15 00:45:41 +00:00
parent 84e1371499
commit 2643c6b3b7
2 changed files with 12 additions and 10 deletions

View File

@ -304,7 +304,7 @@ public class EntityGadget extends EntityBaseGadget {
}
configRoute.setStartIndex(I);
this.position.set(points[I].getPos());
if(I == points.length - 1) {
if (I == points.length - 1) {
configRoute.setStarted(false);
}
},

View File

@ -17,7 +17,8 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
val data = ClientScriptEventNotify.parseFrom(payload);
val scriptManager = session.getPlayer().getScene().getScriptManager();
val args = new ScriptArgs(0, data.getEventType())
val args =
new ScriptArgs(0, data.getEventType())
.setSourceEntityId(data.getSourceEntityId())
.setTargetEntityId(data.getTargetEntityId());
@ -29,11 +30,13 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
}
}
if(data.getEventType() == EventType.EVENT_AVATAR_NEAR_PLATFORM){
if(data.getParamList(0) == 0) {
Grasscutter.getLogger().debug("Found a zero Param1 for an EVENT_AVATAR_NEAR_PLATFORM. Doing the configID workaround.");
if (data.getEventType() == EventType.EVENT_AVATAR_NEAR_PLATFORM) {
if (data.getParamList(0) == 0) {
Grasscutter.getLogger()
.debug(
"Found a zero Param1 for an EVENT_AVATAR_NEAR_PLATFORM. Doing the configID workaround.");
val entity = session.getPlayer().getScene().getEntityById(data.getSourceEntityId());
if(entity == null) {
if (entity == null) {
Grasscutter.getLogger().debug("But it failed.");
} else {
args.setParam1(entity.getConfigId());
@ -43,5 +46,4 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
scriptManager.callEvent(args);
}
}