diff --git a/src/main/java/emu/grasscutter/game/world/World.java b/src/main/java/emu/grasscutter/game/world/World.java index a1e63ebea..59e884d2e 100644 --- a/src/main/java/emu/grasscutter/game/world/World.java +++ b/src/main/java/emu/grasscutter/game/world/World.java @@ -1,20 +1,15 @@ package emu.grasscutter.game.world; -import static emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType.SCRIPT; - import emu.grasscutter.data.GameData; import emu.grasscutter.data.excels.dungeon.DungeonData; -import emu.grasscutter.game.entity.EntityTeam; -import emu.grasscutter.game.entity.EntityWorld; +import emu.grasscutter.game.entity.*; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.player.Player.SceneLoadState; -import emu.grasscutter.game.props.EnterReason; -import emu.grasscutter.game.props.EntityIdType; -import emu.grasscutter.game.props.PlayerProperty; -import emu.grasscutter.game.props.SceneType; +import emu.grasscutter.game.props.*; import emu.grasscutter.game.quest.enums.QuestContent; import emu.grasscutter.game.world.data.TeleportProperties; import emu.grasscutter.net.packet.BasePacket; +import emu.grasscutter.net.proto.ChatInfoOuterClass.ChatInfo.SystemHint; import emu.grasscutter.net.proto.EnterTypeOuterClass.EnterType; import emu.grasscutter.scripts.data.SceneConfig; import emu.grasscutter.server.event.player.PlayerTeleportEvent; @@ -22,17 +17,14 @@ import emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType; import emu.grasscutter.server.game.GameServer; import emu.grasscutter.server.packet.send.*; import emu.grasscutter.utils.ConversionUtils; -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; -import it.unimi.dsi.fastutil.ints.Int2ObjectMaps; -import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import lombok.Getter; -import lombok.val; +import it.unimi.dsi.fastutil.ints.*; +import lombok.*; import org.jetbrains.annotations.NotNull; +import java.util.*; + +import static emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType.SCRIPT; + public class World implements Iterable { @Getter private final GameServer server; @Getter private final Player host; @@ -164,6 +156,14 @@ public class World implements Iterable { player.getTeamManager().getCurrentSinglePlayerTeamInfo(), player.getTeamManager().getMaxTeamSize()); player.getTeamManager().setCurrentCharacterIndex(0); + + if (player != this.getHost()) { + this.broadcastPacket(new PacketPlayerChatNotify( + player, 0, + SystemHint.newBuilder() + .setType(1).build() + )); + } } // Add to scene @@ -217,6 +217,12 @@ public class World implements Iterable { victim.getSceneId(), victim.getPosition())); } + } else { + this.broadcastPacket(new PacketPlayerChatNotify( + player, 0, + SystemHint.newBuilder() + .setType(2).build() + )); } }