Comparing version 0.3.13 to 0.3.14
@@ -389,8 +389,8 @@ "use strict"; | ||
throw new Error("Prepare pathfinding before querying getPath()!"); | ||
if (from.map == to.map && this.canWalkPath(from, to)) { | ||
return [{ type: "move", map: from.map, x: from.x, y: from.y }, { type: "move", map: from.map, x: to.x, y: to.y }]; | ||
} | ||
const fromNode = this.findClosestNode(from.map, from.x, from.y); | ||
const toNode = this.findClosestNode(to.map, to.x, to.y); | ||
const path = []; | ||
if (from.map == to.map && this.canWalkPath(from, to)) { | ||
return [{ type: "move", map: from.map, x: from.x, y: from.y }, { type: "move", map: from.map, x: to.x, y: to.y }]; | ||
} | ||
console.log(`Looking for a path from ${fromNode.id} to ${toNode.id}...`); | ||
@@ -401,3 +401,3 @@ const rawPath = this.path.find(fromNode.id, toNode.id); | ||
} | ||
path.push({ type: "move", map: from.map, x: from.x, y: from.y }); | ||
path.push({ type: "move", map: fromNode.data.map, x: fromNode.data.x, y: fromNode.data.y }); | ||
for (let i = rawPath.length - 1; i > 0; i--) { | ||
@@ -404,0 +404,0 @@ const currentNode = rawPath[i]; |
{ | ||
"name": "alclient", | ||
"version": "0.3.13", | ||
"version": "0.3.14", | ||
"description": "A node client for interacting with Adventure Land - The Code MMORPG", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
504393