Props now spawn with the right states and simulated universe screen should show up when interacted with

This commit is contained in:
Melledy
2023-09-27 06:00:51 -07:00
parent dbb6880819
commit 889a26028d
4 changed files with 39 additions and 2 deletions

View File

@@ -12,6 +12,6 @@ public class PropInfo extends ObjectInfo {
private int AnchorID; private int AnchorID;
private int PropID; private int PropID;
private int EventID; private int EventID;
private PropState State; private PropState State = PropState.Closed;
private boolean IsDelete; private boolean IsDelete;
} }

View File

@@ -96,7 +96,7 @@ public class Scene {
for (PropInfo propInfo : group.getPropList()) { for (PropInfo propInfo : group.getPropList()) {
// Create prop from prop info // Create prop from prop info
EntityProp prop = new EntityProp(propInfo.getPropID(), propInfo.clonePos()); EntityProp prop = new EntityProp(propInfo.getPropID(), propInfo.clonePos());
//prop.setState(propInfo.getState()); prop.setState(propInfo.getState());
prop.getRot().set( prop.getRot().set(
(int) (propInfo.getRotX() * 1000f), (int) (propInfo.getRotX() * 1000f),
(int) (propInfo.getRotY() * 1000f), (int) (propInfo.getRotY() * 1000f),
@@ -105,6 +105,11 @@ public class Scene {
prop.setInstId(propInfo.getID()); prop.setInstId(propInfo.getID());
prop.setGroupId(group.getId()); prop.setGroupId(group.getId());
// Hacky fix for rogue entry
if (prop.getPropId() == 1003) {
prop.setState(PropState.Open);
}
// Add to monsters // Add to monsters
this.addEntity(prop); this.addEntity(prop);
} }

View File

@@ -0,0 +1,16 @@
package emu.lunarcore.server.packet.recv;
import emu.lunarcore.server.game.GameSession;
import emu.lunarcore.server.packet.CmdId;
import emu.lunarcore.server.packet.Opcodes;
import emu.lunarcore.server.packet.PacketHandler;
@Opcodes(CmdId.GetRogueInfoCsReq)
public class HandlerGetRogueInfoCsReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] data) throws Exception {
session.send(CmdId.GetRogueInfoScRsp);
}
}

View File

@@ -0,0 +1,16 @@
package emu.lunarcore.server.packet.recv;
import emu.lunarcore.server.game.GameSession;
import emu.lunarcore.server.packet.CmdId;
import emu.lunarcore.server.packet.Opcodes;
import emu.lunarcore.server.packet.PacketHandler;
@Opcodes(CmdId.GetRogueInitialScoreCsReq)
public class HandlerGetRogueInitialScoreCsReq extends PacketHandler {
@Override
public void handle(GameSession session, byte[] header, byte[] data) throws Exception {
session.send(CmdId.GetRogueInitialScoreScRsp);
}
}