mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-24 05:32:52 +08:00
Format code [skip actions]
This commit is contained in:
parent
84e1371499
commit
2643c6b3b7
@ -304,7 +304,7 @@ public class EntityGadget extends EntityBaseGadget {
|
|||||||
}
|
}
|
||||||
configRoute.setStartIndex(I);
|
configRoute.setStartIndex(I);
|
||||||
this.position.set(points[I].getPos());
|
this.position.set(points[I].getPos());
|
||||||
if(I == points.length - 1) {
|
if (I == points.length - 1) {
|
||||||
configRoute.setStarted(false);
|
configRoute.setStarted(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -17,7 +17,8 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
|
|||||||
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
public void handle(GameSession session, byte[] header, byte[] payload) throws Exception {
|
||||||
val data = ClientScriptEventNotify.parseFrom(payload);
|
val data = ClientScriptEventNotify.parseFrom(payload);
|
||||||
val scriptManager = session.getPlayer().getScene().getScriptManager();
|
val scriptManager = session.getPlayer().getScene().getScriptManager();
|
||||||
val args = new ScriptArgs(0, data.getEventType())
|
val args =
|
||||||
|
new ScriptArgs(0, data.getEventType())
|
||||||
.setSourceEntityId(data.getSourceEntityId())
|
.setSourceEntityId(data.getSourceEntityId())
|
||||||
.setTargetEntityId(data.getTargetEntityId());
|
.setTargetEntityId(data.getTargetEntityId());
|
||||||
|
|
||||||
@ -29,11 +30,13 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(data.getEventType() == EventType.EVENT_AVATAR_NEAR_PLATFORM){
|
if (data.getEventType() == EventType.EVENT_AVATAR_NEAR_PLATFORM) {
|
||||||
if(data.getParamList(0) == 0) {
|
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());
|
val entity = session.getPlayer().getScene().getEntityById(data.getSourceEntityId());
|
||||||
if(entity == null) {
|
if (entity == null) {
|
||||||
Grasscutter.getLogger().debug("But it failed.");
|
Grasscutter.getLogger().debug("But it failed.");
|
||||||
} else {
|
} else {
|
||||||
args.setParam1(entity.getConfigId());
|
args.setParam1(entity.getConfigId());
|
||||||
@ -43,5 +46,4 @@ public class HandlerClientScriptEventNotify extends PacketHandler {
|
|||||||
|
|
||||||
scriptManager.callEvent(args);
|
scriptManager.callEvent(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user