Fix pos above pos util
This commit is contained in:
@@ -420,7 +420,7 @@ function getPosBehindPos(pos, angle, distance) {
|
|||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function getPosAbovePos(pos, distance) {
|
function getPosAbovePos(pos, distance) {
|
||||||
return toVector3(pos.x, pos.y, pos.z+distancez);
|
return toVector3(pos.x, pos.y, pos.z+distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -1594,18 +1594,34 @@ function getClanFromParams(params) {
|
|||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
function getJobFromParams(params) {
|
function getClanRankFromParams(clanId, params) {
|
||||||
if(isNaN(params)) {
|
if(isNaN(params)) {
|
||||||
for(let i in getServerData().jobs) {
|
for(let i in getClanData(clanId).ranks) {
|
||||||
if(toLowerCase(getServerData().jobs[i].name).indexOf(toLowerCase(params)) != -1) {
|
if(toLowerCase(getClanData(clanId).ranks[i].name).indexOf(toLowerCase(params)) != -1) {
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(typeof getServerData().jobs[params] != "undefined") {
|
if(typeof getClanData(clanId).ranks[params] != "undefined") {
|
||||||
return toInteger(params);
|
return toInteger(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function getJobFromParams(params) {
|
||||||
|
if(isNaN(params)) {
|
||||||
|
for(let i in getServerData().jobs) {
|
||||||
|
if(toLowerCase(getServerData().jobs[i].name).indexOf(toLowerCase(params)) != -1) {
|
||||||
|
return getServerData().jobs[i].databaseId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if(typeof getServerData().jobs[params] != "undefined") {
|
||||||
|
return getServerData().jobs[params].databaseId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user