commit
8125965525
10
libs/ui.js
10
libs/ui.js
@ -403,9 +403,9 @@ ui.prototype._getPosition = function (content) {
|
|||||||
py = core.status.event.data.y;
|
py = core.status.event.data.y;
|
||||||
}
|
}
|
||||||
content = content.replace("\b", "\\b")
|
content = content.replace("\b", "\\b")
|
||||||
.replace(/\\b\[(up|center|down|hero|null)(,(hero|null|\d+,\d+))?]/g, function (s0, s1, s2, s3) {
|
.replace(/\\b\[(up|center|down|hero|null)(,(hero|null|\d+,\d+|\d+))?]/g, function (s0, s1, s2, s3) {
|
||||||
pos = s1;
|
pos = s1;
|
||||||
if (s3 == 'hero' || s1=='hero') {
|
if (s3 == 'hero' || s1=='hero' && !s3) {
|
||||||
px = core.status.hero.loc.x;
|
px = core.status.hero.loc.x;
|
||||||
py = core.status.hero.loc.y;
|
py = core.status.hero.loc.y;
|
||||||
}
|
}
|
||||||
@ -414,9 +414,15 @@ ui.prototype._getPosition = function (content) {
|
|||||||
}
|
}
|
||||||
else if (s3) {
|
else if (s3) {
|
||||||
var str = s3.split(',');
|
var str = s3.split(',');
|
||||||
|
if(str.length==1){
|
||||||
|
var follower = (core.status.hero.followers||{})[parseInt(str[0])-1]||{};
|
||||||
|
px = follower.x || null;
|
||||||
|
py = follower.y || null;
|
||||||
|
}else{
|
||||||
px = parseInt(str[0]);
|
px = parseInt(str[0]);
|
||||||
py = parseInt(str[1]);
|
py = parseInt(str[1]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if(pos=='hero' || pos=='null'){
|
if(pos=='hero' || pos=='null'){
|
||||||
pos = py==null?'center':(py>=core.__HALF_SIZE__? 'up':'down');
|
pos = py==null?'center':(py>=core.__HALF_SIZE__? 'up':'down');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user