prevent saving some scenes to db

as they cause invalid scene bug during login
This commit is contained in:
tamilpp25 2022-08-06 15:20:15 +05:30
parent e65a807f62
commit 5c6ae768b8

View File

@ -37,10 +37,13 @@ export default async function handle(command: Command) {
const lineup = await Interface.target.player.getLineup();
const curAvatarEntity = new ActorEntity(Interface.target.player.scene, lineup.leaderSlot, posData.pos);
const allowedScenes = ['Train','Town','Maze']
// Update scene information on player.
Interface.target.player.db.posData.planeID = planeData.PlaneID;
Interface.target.player.db.posData.floorID = floorId
await Interface.target.player.save()
if(allowedScenes.includes(planeData.PlaneType)){
Interface.target.player.db.posData.planeID = planeData.PlaneID;
Interface.target.player.db.posData.floorID = floorId
await Interface.target.player.save()
}
//change scene for player
Interface.target.send(GetCurSceneInfoScRsp, {