Fix monsters not disappearing after battle

This commit is contained in:
Melledy
2023-10-25 10:04:11 -07:00
parent b8dcb8ac59
commit 8c2434af5f

View File

@@ -292,11 +292,12 @@ public class Scene {
GameEntity entity = this.getEntities().remove(entityId); GameEntity entity = this.getEntities().remove(entityId);
if (entity != null) { if (entity != null) {
// Reset entity id and run event // Run event
entity.setEntityId(0);
entity.onRemove(); entity.onRemove();
// Send packet // Send packet
player.sendPacket(new PacketSceneGroupRefreshScNotify(null, entity)); player.sendPacket(new PacketSceneGroupRefreshScNotify(null, entity));
// Reset entity id
entity.setEntityId(0);
} }
} }