mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-23 18:54:37 +01:00
Fix some maps being unable to be teleported into
This commit is contained in:
@@ -9,6 +9,7 @@ public class ObjectInfo {
|
||||
public float PosX;
|
||||
public float PosY;
|
||||
public float PosZ;
|
||||
public boolean IsDelete;
|
||||
public String Name;
|
||||
public float RotY;
|
||||
|
||||
|
||||
@@ -108,6 +108,9 @@ public class Scene {
|
||||
// Add monsters
|
||||
if (group.getMonsterList() != null && group.getMonsterList().size() > 0) {
|
||||
for (MonsterInfo monsterInfo : group.getMonsterList()) {
|
||||
// Don't spawn entity if they have the IsDelete flag in group info
|
||||
if (monsterInfo.isIsDelete()) continue;
|
||||
|
||||
// Get excels from game data
|
||||
NpcMonsterExcel npcMonsterExcel = GameData.getNpcMonsterExcelMap().get(monsterInfo.getNPCMonsterID());
|
||||
if (npcMonsterExcel == null) continue;
|
||||
@@ -128,6 +131,9 @@ public class Scene {
|
||||
// Add props
|
||||
if (group.getPropList() != null && group.getPropList().size() > 0) {
|
||||
for (PropInfo propInfo : group.getPropList()) {
|
||||
// Don't spawn entity if they have the IsDelete flag in group info
|
||||
if (propInfo.isIsDelete()) continue;
|
||||
|
||||
// Get prop excel
|
||||
PropExcel propExcel = GameData.getPropExcelMap().get(propInfo.getPropID());
|
||||
if (propExcel == null) {
|
||||
@@ -164,8 +170,8 @@ public class Scene {
|
||||
// Add npcs
|
||||
if (group.getNPCList() != null && group.getNPCList().size() > 0) {
|
||||
for (NpcInfo npcInfo : group.getNPCList()) {
|
||||
// Sanity check
|
||||
if (!GameData.getNpcExcelMap().containsKey(npcInfo.getNPCID())) {
|
||||
// Don't spawn entity if they have the IsDelete flag in group info
|
||||
if (npcInfo.isIsDelete() || !GameData.getNpcExcelMap().containsKey(npcInfo.getNPCID())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package emu.lunarcore.server.packet.send;
|
||||
|
||||
import emu.lunarcore.game.player.Player;
|
||||
import emu.lunarcore.proto.GetPlayerBoardDataScRspOuterClass.GetPlayerBoardDataScRsp;
|
||||
import emu.lunarcore.proto.GetPlayerBoardDataScRspOuterClass.GetPlayerBoardDataScRspUnk1;
|
||||
import emu.lunarcore.proto.HeadIconOuterClass.HeadIcon;
|
||||
import emu.lunarcore.server.packet.BasePacket;
|
||||
import emu.lunarcore.server.packet.CmdId;
|
||||
@@ -12,6 +13,7 @@ public class PacketGetPlayerBoardDataScRsp extends BasePacket {
|
||||
super(CmdId.GetPlayerBoardDataScRsp);
|
||||
|
||||
var data = GetPlayerBoardDataScRsp.newInstance()
|
||||
.setUnk1(GetPlayerBoardDataScRspUnk1.newInstance())
|
||||
.setCurrentHeadIconId(player.getHeadIcon())
|
||||
.setSignature(player.getSignature());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user