@@ -35,7 +35,8 @@ module.exports = { | |||||
hidden: character.dead || null, | hidden: character.dead || null, | ||||
account: character.account, | account: character.account, | ||||
zoneName: character.zoneName || clientConfig.config.defaultZone, | zoneName: character.zoneName || clientConfig.config.defaultZone, | ||||
zoneId: character.zoneId || null | |||||
zoneId: character.zoneId || null, | |||||
zoneMapSeed: character.zoneMapSeed | |||||
}); | }); | ||||
character.components = character.components || []; | character.components = character.components || []; | ||||
@@ -212,12 +212,15 @@ module.exports = { | |||||
if (msg.keepPos && (!physics.isValid(obj.x, obj.y) || !map.canPathFromPos(obj))) | if (msg.keepPos && (!physics.isValid(obj.x, obj.y) || !map.canPathFromPos(obj))) | ||||
msg.keepPos = false; | msg.keepPos = false; | ||||
if (!msg.keepPos || !obj.has('x') || (map.mapFile.properties.isRandom && obj.instanceId !== map.seed)) { | |||||
if (!msg.keepPos || !obj.has('x') || (map.mapFile.properties.isRandom && obj.zoneMapSeed !== map.seed)) { | |||||
obj.x = spawnPos.x; | obj.x = spawnPos.x; | ||||
obj.y = spawnPos.y; | obj.y = spawnPos.y; | ||||
} | } | ||||
obj.instanceId = map.seed || null; | |||||
if (map.seed) | |||||
obj.zoneMapSeed = map.seed; | |||||
else | |||||
delete obj.zoneMapSeed; | |||||
obj.spawn = map.spawn; | obj.spawn = map.spawn; | ||||