|
|
|
@ -2828,8 +2828,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
const ctx = core.dymCanvas[name],
|
|
|
|
|
canvas = ctx.canvas;
|
|
|
|
|
const ratio = canvas.hasAttribute("isHD") ? core.domStyle.ratio : 1;
|
|
|
|
|
canvas.style.width = (innerSize / ratio) * core.domStyle.scale + "px";
|
|
|
|
|
canvas.style.height = (innerSize / ratio) * core.domStyle.scale + "px";
|
|
|
|
|
canvas.style.width = core.__PIXELS__ * core.domStyle.scale + "px";
|
|
|
|
|
canvas.style.height = core.__PIXELS__ * core.domStyle.scale + "px";
|
|
|
|
|
canvas.style.left =
|
|
|
|
|
parseFloat(canvas.getAttribute("_left")) * core.domStyle.scale + "px";
|
|
|
|
|
canvas.style.top =
|
|
|
|
@ -2956,6 +2956,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
_resize_canvas(obj);
|
|
|
|
|
|
|
|
|
|
if (core.status.automaticRoute == null) core.status.automaticRoute = {};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
core.updateStatusBar();
|
|
|
|
|
if (main.dom.CGUI && main.dom.CGUI.style.display === "block")
|
|
|
|
|
core.ui.CG.update();
|
|
|
|
@ -3021,6 +3023,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
}
|
|
|
|
|
_redrawMap() {
|
|
|
|
|
if (core.domStyle.isVertical) {
|
|
|
|
|
|
|
|
|
|
core.clearMap(
|
|
|
|
|
uictx,
|
|
|
|
|
MAP_BLOCK_LEFT_VERTICAL,
|
|
|
|
@ -3747,10 +3750,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
31 * 3,
|
|
|
|
|
31 * 3,
|
|
|
|
|
]);
|
|
|
|
|
if (core.status.lockControl || core.isMoving()) return;
|
|
|
|
|
|
|
|
|
|
if (core.isReplaying()) {
|
|
|
|
|
this.replayAction[col][row].call(core);
|
|
|
|
|
} else if (core.isPlaying()) {
|
|
|
|
|
if (core.status.lockControl || core.isMoving()) return;
|
|
|
|
|
if (col === 0 && row === 3) {
|
|
|
|
|
core.doSL("autoSave", "load");
|
|
|
|
|
} else if (col === 1 && row === 3) {
|
|
|
|
@ -3834,10 +3838,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
31 * 3,
|
|
|
|
|
31 * 3,
|
|
|
|
|
]);
|
|
|
|
|
if (core.status.lockControl || core.isMoving()) return;
|
|
|
|
|
|
|
|
|
|
if (core.isReplaying()) {
|
|
|
|
|
this.replayAction[col][row].call(core);
|
|
|
|
|
} else if (core.isPlaying()) {
|
|
|
|
|
if (core.status.lockControl || core.isMoving()) return;
|
|
|
|
|
if (col === 0 && row === 3) {
|
|
|
|
|
core.doSL("autoSave", "load");
|
|
|
|
|
} else if (col === 1 && row === 3) {
|
|
|
|
@ -15606,6 +15611,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
},
|
|
|
|
|
"滑动转场": function () {
|
|
|
|
|
// 在此增加新插件
|
|
|
|
|
|
|
|
|
|
const defaultChange = {
|
|
|
|
|
left: "leftPortal", // 左箭头
|
|
|
|
|
up: "upPortal", // 上箭头
|
|
|
|
@ -15625,14 +15631,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
};
|
|
|
|
|
let allChangeEntries = Object.entries(defaultChange);
|
|
|
|
|
const move = document.createElement("canvas");
|
|
|
|
|
const speed = 12;
|
|
|
|
|
let modedata = 0;
|
|
|
|
|
const move2 = document.createElement("canvas");
|
|
|
|
|
|
|
|
|
|
move.width = 1248;
|
|
|
|
|
move.height = 1248;
|
|
|
|
|
move.width = 416;
|
|
|
|
|
move.height = 416;
|
|
|
|
|
move2.width = 416;
|
|
|
|
|
move2.height = 416;
|
|
|
|
|
|
|
|
|
|
const ctx = move.getContext("2d");
|
|
|
|
|
|
|
|
|
|
const ctx2 = move2.getContext("2d");
|
|
|
|
|
events.prototype.changeFloor = function (
|
|
|
|
|
floorId,
|
|
|
|
|
stair,
|
|
|
|
@ -15661,6 +15668,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
|
|
|
|
|
this._changeFloor_beforeChange(info, block, callback);
|
|
|
|
|
};
|
|
|
|
|
const { Animation, linear, bezier, circle, hyper, trigo, power, inverseTrigo, shake, sleep } = core.plugin.animate
|
|
|
|
|
|
|
|
|
|
events.prototype._changeFloor_beforeChange = function (
|
|
|
|
|
info,
|
|
|
|
|
block,
|
|
|
|
@ -15689,95 +15698,100 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
);
|
|
|
|
|
const v = dirData[dir][1], // 水平数值
|
|
|
|
|
h = dirData[dir][0]; //竖直数值
|
|
|
|
|
ctx.clearRect(0, 0, 1248, 1248);
|
|
|
|
|
ctx.clearRect(0, 0, 416, 416);
|
|
|
|
|
ctx2.clearRect(0, 0, 416, 416);
|
|
|
|
|
core.drawThumbnail(core.status.floorId, null, {
|
|
|
|
|
damage: data.damage,
|
|
|
|
|
ctx: ctx,
|
|
|
|
|
x: 416,
|
|
|
|
|
y: 416,
|
|
|
|
|
x: 0,
|
|
|
|
|
y: 0,
|
|
|
|
|
size: 1,
|
|
|
|
|
all: data.all,
|
|
|
|
|
});
|
|
|
|
|
if (dir !== "upFloor" && dir !== "downFloor") {
|
|
|
|
|
core.drawThumbnail(toFloorId, null, {
|
|
|
|
|
damage: dataTo.damage,
|
|
|
|
|
ctx: ctx,
|
|
|
|
|
x: 416 + 416 * v,
|
|
|
|
|
y: 416 + 416 * h,
|
|
|
|
|
ctx: ctx2,
|
|
|
|
|
x: 0,
|
|
|
|
|
y: 0,
|
|
|
|
|
size: 1,
|
|
|
|
|
all: dataTo.all,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
var _run = function () {
|
|
|
|
|
var cb = function () {
|
|
|
|
|
modedata = 0;
|
|
|
|
|
core.clearUI();
|
|
|
|
|
core.clearMap("data");
|
|
|
|
|
const changefloor = async function () {
|
|
|
|
|
const animate = new Animation()
|
|
|
|
|
const change = core.createCanvas("change", 0, 0, 416, 416, 100)
|
|
|
|
|
change.canvas.style.width = core.__PIXELS__ * core.domStyle.scale + "px"
|
|
|
|
|
change.canvas.style.height = core.__PIXELS__ * core.domStyle.scale + "px"
|
|
|
|
|
|
|
|
|
|
const fn = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const x1 = -animate.x * v;
|
|
|
|
|
const y1 = -animate.x * h
|
|
|
|
|
const x2 = (416 - animate.x) * v;
|
|
|
|
|
const y2 = (416 - animate.x) * h;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let status = animate.x > 208 ? "rightFoot" : "leftFoot";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const img = core.material.images.hero;
|
|
|
|
|
const heroIconArr = core.material.icons.hero;
|
|
|
|
|
const width = core.material.icons.hero.width || 32;
|
|
|
|
|
const height = core.material.icons.hero.height;
|
|
|
|
|
const heroIcon = heroIconArr[dir];
|
|
|
|
|
const imgx = (heroIcon[status] % 4) * width,
|
|
|
|
|
imgy = heroIcon.loc * height,
|
|
|
|
|
x = core.status.hero.loc.x * 32 -
|
|
|
|
|
core.bigmap.offsetX -
|
|
|
|
|
(animate.x - (animate.x * 32) / 416) * v,
|
|
|
|
|
y = core.status.hero.loc.y * 32 -
|
|
|
|
|
16 -
|
|
|
|
|
(animate.x - (animate.x * 32) / 416) * h;
|
|
|
|
|
const ctx3 = core.dymCanvas.change
|
|
|
|
|
core.clearMap(ctx3)
|
|
|
|
|
core.fillRect(ctx3, x1,
|
|
|
|
|
y1, 416, 416)
|
|
|
|
|
ctx3.drawImage(
|
|
|
|
|
move,
|
|
|
|
|
0, 0, 416, 416,
|
|
|
|
|
x1,
|
|
|
|
|
y1, 416, 416
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
ctx3.drawImage(
|
|
|
|
|
move2,
|
|
|
|
|
0, 0, 416, 416,
|
|
|
|
|
x2,
|
|
|
|
|
y2,
|
|
|
|
|
416, 416
|
|
|
|
|
);
|
|
|
|
|
ctx3.drawImage(
|
|
|
|
|
img,
|
|
|
|
|
imgx, imgy,
|
|
|
|
|
width,
|
|
|
|
|
height,
|
|
|
|
|
x, y,
|
|
|
|
|
width,
|
|
|
|
|
height
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
animate.ticker.add(fn)
|
|
|
|
|
|
|
|
|
|
animate.mode(linear()).time(core.values.floorChangeTime).move(416, 0)
|
|
|
|
|
await animate.all();
|
|
|
|
|
animate.ticker.destroy()
|
|
|
|
|
|
|
|
|
|
window.setTimeout(function () {
|
|
|
|
|
core.events._changeFloor_changing(info, callback);
|
|
|
|
|
};
|
|
|
|
|
core.clearMap(change)
|
|
|
|
|
}, 25)
|
|
|
|
|
|
|
|
|
|
var animate = window.setInterval(
|
|
|
|
|
function () {
|
|
|
|
|
if (modedata >= 416) {
|
|
|
|
|
delete core.animateFrame.asyncId[animate];
|
|
|
|
|
clearInterval(animate);
|
|
|
|
|
cb();
|
|
|
|
|
} else {
|
|
|
|
|
core.clearUI();
|
|
|
|
|
core.clearMap("data");
|
|
|
|
|
}
|
|
|
|
|
changefloor()
|
|
|
|
|
|
|
|
|
|
core.canvas.data.drawImage(
|
|
|
|
|
move,
|
|
|
|
|
416 + modedata * v,
|
|
|
|
|
416 + modedata * h,
|
|
|
|
|
416,
|
|
|
|
|
416,
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
416,
|
|
|
|
|
416
|
|
|
|
|
);
|
|
|
|
|
let status = "leftFoot";
|
|
|
|
|
|
|
|
|
|
if (modedata > 208) {
|
|
|
|
|
status = "rightFoot";
|
|
|
|
|
}
|
|
|
|
|
const img = core.material.images.hero;
|
|
|
|
|
const heroIconArr = core.material.icons.hero;
|
|
|
|
|
const width = core.material.icons.hero.width || 32;
|
|
|
|
|
const height = core.material.icons.hero.height;
|
|
|
|
|
const heroIcon = heroIconArr[dir];
|
|
|
|
|
|
|
|
|
|
core.canvas.data.drawImage(
|
|
|
|
|
img,
|
|
|
|
|
(heroIcon[status] % 4) * width,
|
|
|
|
|
heroIcon.loc * height,
|
|
|
|
|
width,
|
|
|
|
|
height,
|
|
|
|
|
core.status.hero.loc.x * 32 -
|
|
|
|
|
core.bigmap.offsetX -
|
|
|
|
|
(modedata - (modedata * 32) / 416) * v,
|
|
|
|
|
core.status.hero.loc.y * 32 -
|
|
|
|
|
16 -
|
|
|
|
|
(modedata - (modedata * 32) / 416) * h,
|
|
|
|
|
width,
|
|
|
|
|
height
|
|
|
|
|
);
|
|
|
|
|
modedata += speed;
|
|
|
|
|
clearInterval(animate);
|
|
|
|
|
delete core.animateFrame.asyncId[animate];
|
|
|
|
|
_run();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
core.status.replay.speed == 24 ?
|
|
|
|
|
1 :
|
|
|
|
|
10 / core.status.replay.speed
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
core.animateFrame.lastAsyncId = animate;
|
|
|
|
|
core.animateFrame.asyncId[animate] = cb;
|
|
|
|
|
};
|
|
|
|
|
_run();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -19688,6 +19702,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
|
|
|
|
|
let now = 0;
|
|
|
|
|
let start = 0
|
|
|
|
|
let sounds = []
|
|
|
|
|
core.registerAnimationFrame(
|
|
|
|
|
|
|
|
|
|
"animationDrawable",
|
|
|
|
@ -19790,10 +19805,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
one.sound &&
|
|
|
|
|
core.sounds[one.sound] &&
|
|
|
|
|
core.musicStatus.soundStatus;
|
|
|
|
|
if (farme >= one.startfarme && lisen && !one.start) {
|
|
|
|
|
if (farme >= one.startfarme && lisen && !one.start && sounds.includes(farme)) {
|
|
|
|
|
one.start = true
|
|
|
|
|
if (one.stopbefore) core.stopSound();
|
|
|
|
|
core.playSound(one.sound);
|
|
|
|
|
sounds.includes(farme)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
ctx.globalAlpha = 1;
|
|
|
|
@ -21429,6 +21445,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
"start": 0,
|
|
|
|
|
"pause": false,
|
|
|
|
|
"pausetime": 0,
|
|
|
|
|
'sounds': [],
|
|
|
|
|
"index": 0,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -21476,7 +21493,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
obj.animate,
|
|
|
|
|
core.status.heroCenter.px,
|
|
|
|
|
core.status.heroCenter.py,
|
|
|
|
|
obj.index
|
|
|
|
|
obj.index,
|
|
|
|
|
obj.sounds
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
core.maps._drawAnimateFrame(
|
|
|
|
@ -21484,7 +21502,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
obj.animate,
|
|
|
|
|
obj.centerX,
|
|
|
|
|
obj.centerY,
|
|
|
|
|
obj.index
|
|
|
|
|
obj.index,
|
|
|
|
|
obj.sounds
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -23648,7 +23667,34 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
return;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
control.prototype._doSL_replayLoad_afterGet = function (id, data) {
|
|
|
|
|
if (!data) {
|
|
|
|
|
core.playSound("操作失败");
|
|
|
|
|
return core.drawTip("无效的存档");
|
|
|
|
|
}
|
|
|
|
|
if (data.version != core.firstData.version) {
|
|
|
|
|
core.playSound("操作失败");
|
|
|
|
|
return core.drawTip("存档版本不匹配");
|
|
|
|
|
}
|
|
|
|
|
if (data.hero.flags.__events__ && data.guid != core.getGuid()) {
|
|
|
|
|
core.playSound("操作失败");
|
|
|
|
|
return core.drawTip("此存档可能存在风险,无法读档");
|
|
|
|
|
}
|
|
|
|
|
var route = core.subarray(core.status.route, core.decodeRoute(data.route));
|
|
|
|
|
if (route == null) {
|
|
|
|
|
core.playSound("操作失败");
|
|
|
|
|
return core.drawTip("无法从此存档回放录像");
|
|
|
|
|
}
|
|
|
|
|
core.closePanel()
|
|
|
|
|
core.loadData(data, function () {
|
|
|
|
|
core.removeFlag("__fromLoad__");
|
|
|
|
|
core.startReplay(route);
|
|
|
|
|
core.drawTip("回退到存档节点");
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function saveLoadclick(x, y) { //点击画布(x,y)触发的效果
|
|
|
|
|
debugger
|
|
|
|
|
const makeBox = ([x, y], [w, h]) => { //创建点击检测区域
|
|
|
|
|
return [
|
|
|
|
|
[x, y],
|
|
|
|
@ -23796,47 +23842,44 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
choose = false
|
|
|
|
|
let a = Math.ceil((y - 224) / 100)
|
|
|
|
|
let real_id = 9 * page + a
|
|
|
|
|
if (real_id == index) {
|
|
|
|
|
if (core.status.event.data.mode === "fav") {
|
|
|
|
|
real_id = core.saves.favorite[a - 1]
|
|
|
|
|
}
|
|
|
|
|
if (core.status.event.data.mode !== "fav" && core.status.event.data.mode !== "all") {
|
|
|
|
|
real_id = core.saves[core.status.event.data.mode][a - 1]
|
|
|
|
|
}
|
|
|
|
|
if (core.status.event.data.mode === "fav") {
|
|
|
|
|
real_id = core.saves.favorite[9 * page + a - 1]
|
|
|
|
|
}
|
|
|
|
|
if (core.status.event.data.mode !== "fav" && core.status.event.data.mode !== "all") {
|
|
|
|
|
real_id = core.saves[core.status.event.data.mode][9 * page + a - 1]
|
|
|
|
|
}
|
|
|
|
|
if (10 * page + a == index) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
core.saveLoad.setId(real_id)
|
|
|
|
|
|
|
|
|
|
core.doSL(real_id, core.status.event.id)
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
if (core.status.event.data.mode === "fav") {
|
|
|
|
|
real_id = core.saves.favorite[a - 1]
|
|
|
|
|
}
|
|
|
|
|
if (core.status.event.data.mode !== "fav" && core.status.event.data.mode !== "all") {
|
|
|
|
|
real_id = core.saves[core.status.event.data.mode][a - 1]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
core.saveLoad.setId(real_id)
|
|
|
|
|
}
|
|
|
|
|
core.ui._drawSLPanel(10 * page + a)
|
|
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (inRect(pos, save9box)) {
|
|
|
|
|
choose = false
|
|
|
|
|
let real_id = 9 * page + 9
|
|
|
|
|
if (real_id == index) {
|
|
|
|
|
if (core.status.event.data.mode === "fav") {
|
|
|
|
|
real_id = core.saves.favorite[9 * page + 8]
|
|
|
|
|
}
|
|
|
|
|
if (core.status.event.data.mode !== "fav" && core.status.event.data.mode !== "all") {
|
|
|
|
|
real_id = core.saves[core.status.event.data.mode][9 * page + 8]
|
|
|
|
|
}
|
|
|
|
|
if (core.status.event.data.mode === "fav") {
|
|
|
|
|
real_id = core.saves.favorite[9 * page + 8]
|
|
|
|
|
}
|
|
|
|
|
if (core.status.event.data.mode !== "fav" && core.status.event.data.mode !== "all") {
|
|
|
|
|
real_id = core.saves[core.status.event.data.mode][9 * page + 8]
|
|
|
|
|
}
|
|
|
|
|
if (10 * page + 9 == index) {
|
|
|
|
|
|
|
|
|
|
core.saveLoad.setId(real_id)
|
|
|
|
|
core.doSL(real_id, core.status.event.id)
|
|
|
|
|
return
|
|
|
|
|
} else {
|
|
|
|
|
real_id = core.saves.favorite[9 * page + 8]
|
|
|
|
|
|
|
|
|
|
if (core.status.event.data.mode !== "fav" && core.status.event.data.mode !== "all") {
|
|
|
|
|
real_id = core.saves[core.status.event.data.mode][9 * page + 8]
|
|
|
|
|
}
|
|
|
|
|
core.saveLoad.setId(real_id)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -23882,7 +23925,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
|
|
|
|
|
core.myprompt("请输入想要显示的存档名(长度不超过5字符)", null, function (value) {
|
|
|
|
|
if (value && value.length <= 5) {
|
|
|
|
|
|
|
|
|
|
core.saves.favoriteName[real_id] = value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
core.setLocalStorage("_saveName", core.saves.favoriteName)
|
|
|
|
|
core.control._updateFavoriteSaves();
|
|
|
|
|
core.ui._drawSLPanel(10 * page + offset);
|
|
|
|
|
} else if (value) {
|
|
|
|
@ -23965,6 +24012,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
core.saves.favorite = core.saves.favorite.sort(function (a, b) { return a - b; }); // 保证有序
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
core.control._updateFavoriteSaves()
|
|
|
|
|
core.ui._drawSLPanel(index);
|
|
|
|
|
return
|
|
|
|
@ -24158,11 +24206,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
for (let i = 1; i < 9; i++) {
|
|
|
|
|
core.setLocalStorage("class_" + i, core.saves["class_" + i])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
core.setLocalStorage("favoriteName", core.saves.favoriteName);
|
|
|
|
|
};
|
|
|
|
|
////// 绘制存档/读档界面 //////
|
|
|
|
|
ui.prototype._drawSLPanel = function (index, refresh) {
|
|
|
|
|
core.control._updateFavoriteSaves()
|
|
|
|
|
|
|
|
|
|
core.control._loadClassSaves();
|
|
|
|
|
core.control._loadFavoriteSaves();
|
|
|
|
|
|
|
|
|
@ -24460,8 +24509,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
|
|
|
|
|
ui.prototype._drawSLPanel_loadSave = function (page, callback) {
|
|
|
|
|
var ids = [0];
|
|
|
|
|
for (var i = 1; i <= 10; ++i) {
|
|
|
|
|
var id = 10 * page + i;
|
|
|
|
|
for (var i = 1; i <= 9; ++i) {
|
|
|
|
|
var id = 9 * page + i;
|
|
|
|
|
if (core.status.event.data.mode == 'fav')
|
|
|
|
|
id = core.saves.favorite[id - 1]; // 因为favorite第一个不是自动存档 所以要偏移1
|
|
|
|
|
if (core.status.event.data.mode !== 'fav' && core.status.event.data.mode !== "all")
|
|
|
|
@ -25688,7 +25737,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
for (var i = 0; i < core.status.animateObjs.length; i++) {
|
|
|
|
|
var obj = core.status.animateObjs[i];
|
|
|
|
|
if (obj.pause) obj.pausetime += frametime
|
|
|
|
|
if (obj.start === 0) obj.start = core.animateFrame.animateTime
|
|
|
|
|
if (obj.start === 0) {
|
|
|
|
|
obj.sounds = []
|
|
|
|
|
obj.start = core.animateFrame.animateTime
|
|
|
|
|
}
|
|
|
|
|
obj.index = Math.floor((core.animateFrame.animateTime - obj.start - obj.pausetime) / (1000 / 60))
|
|
|
|
|
if (obj.reverse) obj.index = obj.animate.frames.length - obj.index
|
|
|
|
|
if ((!obj.reverse && obj.index >= obj.animate.frames.length) || (obj.reverse && obj.index <= 0)) {
|
|
|
|
@ -25696,9 +25748,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
if (obj.reverse) {
|
|
|
|
|
obj.index = obj.animate.frames.length
|
|
|
|
|
obj.start = core.animateFrame.animateTime
|
|
|
|
|
obj.sounds = []
|
|
|
|
|
obj.pausetime = 0
|
|
|
|
|
} else {
|
|
|
|
|
obj.start = core.animateFrame.animateTime
|
|
|
|
|
obj.sounds = []
|
|
|
|
|
obj.index = 0
|
|
|
|
|
obj.pausetime = 0
|
|
|
|
|
}
|
|
|
|
@ -25731,12 +25785,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
const heroy = core.status.hero.loc.y * 32 + 32 + sy - core.material.icons.hero.height / 2;
|
|
|
|
|
|
|
|
|
|
core.status.animateObjs.forEach(function (obj) {
|
|
|
|
|
|
|
|
|
|
if (obj.hero) {
|
|
|
|
|
|
|
|
|
|
core.maps._drawAnimateFrame('animate', obj.animate, herox, heroy, obj.index);
|
|
|
|
|
core.maps._drawAnimateFrame('animate', obj.animate, herox, heroy, obj.index, obj.sounds);
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
core.maps._drawAnimateFrame('animate', obj.animate, tran.value[obj.id + obj.name + "x"], tran.value[obj.id + obj.name + "y"], obj.index);
|
|
|
|
|
core.maps._drawAnimateFrame('animate', obj.animate, tran.value[obj.id + obj.name + "x"], tran.value[obj.id + obj.name + "y"], obj.index, obj.sounds);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -25760,12 +25815,13 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
centerX += core.bigmap.offsetX;
|
|
|
|
|
centerY += core.bigmap.offsetY;
|
|
|
|
|
}
|
|
|
|
|
var id = setTimeout(null);
|
|
|
|
|
animate.se = animate.se || {};
|
|
|
|
|
if (typeof animate.se == 'string') animate.se = { 1: animate.se };
|
|
|
|
|
tran.mode(linear()).time(1).absolute()
|
|
|
|
|
tran.value[id + name + "x"] = centerX
|
|
|
|
|
tran.value[id + name + "y"] = centerY
|
|
|
|
|
var id = setTimeout(null);
|
|
|
|
|
|
|
|
|
|
core.status.animateObjs.push({
|
|
|
|
|
"name": name,
|
|
|
|
|
"id": id,
|
|
|
|
@ -25776,6 +25832,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
"pause": false,
|
|
|
|
|
"pausetime": 0,
|
|
|
|
|
"index": 0,
|
|
|
|
|
'sounds': [],
|
|
|
|
|
"callback": callback
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -25815,6 +25872,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
"loop": loop,
|
|
|
|
|
"pausetime": 0,
|
|
|
|
|
"index": 0,
|
|
|
|
|
'sounds': [],
|
|
|
|
|
"callback": callback
|
|
|
|
|
})
|
|
|
|
|
else core.status.animateObjs.push({
|
|
|
|
@ -25829,6 +25887,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
"loop": loop,
|
|
|
|
|
"pausetime": 0,
|
|
|
|
|
"index": 0,
|
|
|
|
|
'sounds': [],
|
|
|
|
|
"callback": callback
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -25862,6 +25921,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
"pause": false,
|
|
|
|
|
"pausetime": 0,
|
|
|
|
|
"index": 0,
|
|
|
|
|
'sounds': [],
|
|
|
|
|
"callback": callback
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -25877,11 +25937,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
////// 绘制动画的某一帧 //////
|
|
|
|
|
maps.prototype._drawAnimateFrame = function (name, animate, centerX, centerY, index) {
|
|
|
|
|
maps.prototype._drawAnimateFrame = function (name, animate, centerX, centerY, index, sounds) {
|
|
|
|
|
var ctx = core.getContextByName(name);
|
|
|
|
|
if (!ctx) return;
|
|
|
|
|
var frame = animate.frames[index % animate.frame];
|
|
|
|
|
core.playSound((animate.se || {})[index % animate.frame + 1], (animate.pitch || {})[index % animate.frame + 1]);
|
|
|
|
|
if (!sounds.includes(index)) {
|
|
|
|
|
core.playSound((animate.se || {})[index % animate.frame + 1], (animate.pitch || {})[index % animate.frame + 1]);
|
|
|
|
|
sounds.push(index)
|
|
|
|
|
}
|
|
|
|
|
var ratio = animate.ratio;
|
|
|
|
|
frame.forEach(function (t) {
|
|
|
|
|
var image = animate.images[t.index];
|
|
|
|
@ -26033,6 +26096,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
reverse: reverse,
|
|
|
|
|
pausetime: 0,
|
|
|
|
|
farme: 0,
|
|
|
|
|
sounds: []
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
core.plugin.playing.add(data);
|
|
|
|
@ -26085,10 +26149,12 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
one.farme = data.allFarme
|
|
|
|
|
one.start = thistime
|
|
|
|
|
one.pausetime = 0
|
|
|
|
|
one.sounds = []
|
|
|
|
|
} else {
|
|
|
|
|
one.start = thistime
|
|
|
|
|
one.farme = 0
|
|
|
|
|
one.pausetime = 0
|
|
|
|
|
one.sounds = []
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -26223,9 +26289,10 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
sound.sound &&
|
|
|
|
|
core.material.sounds[sound.sound] &&
|
|
|
|
|
core.musicStatus.soundStatus;
|
|
|
|
|
if (one.farme == sound.startfarme && lisen) {
|
|
|
|
|
if (one.farme == sound.startfarme && lisen && one.sounds.includes(one.farme)) {
|
|
|
|
|
if (sound.stopbefore) core.stopSound();
|
|
|
|
|
core.playSound(sound.sound);
|
|
|
|
|
one.sounds.push(one.farme)
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -26233,5 +26300,26 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
"任务系统": function () {
|
|
|
|
|
// 在此增加新插件
|
|
|
|
|
this.task = { //任务总表(键名和id后期改为"floorId+'.'+npc+'.'+Number"的格式,即“楼层名.npc名.任务序号”)
|
|
|
|
|
1: { id: 1, name: "寻找丢失的钱袋", text: "梅尔森的钱袋被小偷偷走了,去找到小偷并拿回梅尔森的钱袋", type: "物品" }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.taskAccept = function (id) { //任务接取
|
|
|
|
|
let accept = core.getFlag("accept") ?? []; //正在进行任务
|
|
|
|
|
let success = core.getFlag("success") ?? []; //已提交任务
|
|
|
|
|
let nocontinue = false
|
|
|
|
|
accept.forEach(v => { if (v.id === id) nocontinue = ture })
|
|
|
|
|
success.forEach(v => { if (v.id === id) nocontinue = ture })
|
|
|
|
|
if (nocontinue) return //已接取或已完成该任务return
|
|
|
|
|
let task = this.task[id] //获取任务内容
|
|
|
|
|
switch (task.type) {
|
|
|
|
|
case "物品":
|
|
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|