Fix game location util
This commit is contained in:
@@ -1117,13 +1117,14 @@ async function waitUntil(condition) {
|
|||||||
|
|
||||||
function getGameLocationFromParams(params) {
|
function getGameLocationFromParams(params) {
|
||||||
if(isNaN(params)) {
|
if(isNaN(params)) {
|
||||||
for(let i in getGameData().locations[getServerGame()]) {
|
let locations = getGameData().locations[getGame()];
|
||||||
if(toLowerCase(getGameData().locations[getServerGame()][i][0]).indexOf(toLowerCase(params)) != -1) {
|
for(let i in locations) {
|
||||||
|
if(toLowerCase(locations[i][0]).indexOf(toLowerCase(params)) != -1) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(typeof getGameData().locations[getServerGame()][params] != "undefined") {
|
if(typeof getGameData().locations[getGame()][params] != "undefined") {
|
||||||
return toInteger(params);
|
return toInteger(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user