Fix some maps being unable to be teleported into

This commit is contained in:
Melledy
2023-10-15 04:31:17 -07:00
parent d32b04967e
commit 23d4a663f2
4 changed files with 291 additions and 19 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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());