From 6ef648010a15f9b7463d8cbe97f81400eed9d11e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=A1=E7=81=B5=E6=9A=B4=E9=BE=99=E5=A4=A7=E5=B8=9D?= Date: Wed, 3 Jul 2024 00:23:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B9=8B=E5=89=8D=E7=9A=84=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=BC=A9=E8=BF=9B=E6=9C=89=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../grasscutter/game/entity/EntityAvatar.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java b/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java index c1a6a6016a4..9d662a382ca 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityAvatar.java @@ -70,17 +70,17 @@ public EntityAvatar(Scene scene, Avatar avatar) { Grasscutter.getLogger().error("Unable to create EntityAvatar instance; provided scene is null."); } - var world = scene.getWorld(); - this.id = world.getNextEntityId(EntityIdType.AVATAR); - - var weapon = this.getAvatar().getWeapon(); - if (weapon != null) { - if (!(weapon.getWeaponEntity() != null && weapon.getWeaponEntity().getScene() == scene)) { - weapon.setWeaponEntity( - new EntityWeapon(this.getPlayer().getScene(), weapon.getItemData().getGadgetId())); - scene.getWeaponEntities().put(weapon.getWeaponEntity().getId(), weapon.getWeaponEntity()); - } + var world = scene.getWorld(); + this.id = world.getNextEntityId(EntityIdType.AVATAR); + + var weapon = this.getAvatar().getWeapon(); + if (weapon != null) { + if (!(weapon.getWeaponEntity() != null && weapon.getWeaponEntity().getScene() == scene)) { + weapon.setWeaponEntity( + new EntityWeapon(this.getPlayer().getScene(), weapon.getItemData().getGadgetId())); + scene.getWeaponEntities().put(weapon.getWeaponEntity().getId(), weapon.getWeaponEntity()); } + } this.initAbilities();