Skip to content

Commit

Permalink
currently not fixed codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Simplxss committed Dec 17, 2022
1 parent 6385787 commit 187debf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public EntityClientGadget(Scene scene, Player player, EvtCreateGadgetNotify noti
this.campType = notify.getCampType();
this.ownerEntityId = notify.getPropOwnerEntityId();
this.targetEntityId = notify.getTargetEntityId();
this.asyncLoad = notify.getIsAsyncLoad();
// this.asyncLoad = notify.getIsAsyncLoad();

GameEntity owner = scene.getEntityById(this.ownerEntityId);
if (owner instanceof EntityClientGadget ownerGadget) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@
import emu.grasscutter.net.proto.EntityAiSyncNotifyOuterClass.EntityAiSyncNotify;

public class PacketEntityAiSyncNotify extends BasePacket {

public PacketEntityAiSyncNotify(EntityAiSyncNotify notify) {
super(PacketOpcodes.EntityAiSyncNotify, true);

EntityAiSyncNotify.Builder proto = EntityAiSyncNotify.newBuilder();

for (int monsterId : notify.getLocalAvatarAlertedMonsterListList()) {
proto.addInfoList(AiSyncInfo.newBuilder().setEntityId(monsterId).setHasPathToTarget(true));
}

proto.addInfoList(AiSyncInfo.newBuilder().setEntityId(monsterId)
//.setHasPathToTarget(true)
);
}

this.setData(proto);
}
}

0 comments on commit 187debf

Please sign in to comment.