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

@@ -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());
@@ -31,7 +32,9 @@ 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.");
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) {
Grasscutter.getLogger().debug("But it failed.");
@@ -43,5 +46,4 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
scriptManager.callEvent(args);
}
}