fix(mt0): fix some schemes in MT0
修复0F梅障第二次展示不同的问题 修复0F仙子出现时缺少动画问题 修复0F仙子出现时莫名消失又突然出现的问题 显示新道具现在将强制显示在中间
This commit is contained in:
parent
3360d2f37b
commit
13e08b122f
File diff suppressed because it is too large
Load Diff
@ -496,6 +496,38 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
||||
}
|
||||
return;
|
||||
}
|
||||
////// 获得某个物品 //////
|
||||
core.events.getItem = function (id, num, x, y, isGentleClick, callback) {
|
||||
if (num == null) num = 1;
|
||||
var itemCls = core.material.items[id].cls;
|
||||
core.removeBlock(x, y);
|
||||
core.items.getItemEffect(id, num);
|
||||
var text = '获得 ' + core.material.items[id].name;
|
||||
if (num > 1) text += "x" + num;
|
||||
if (itemCls === 'items' && num == 1) text += core.items.getItemEffectTip(id);
|
||||
core.drawTip(text, id);
|
||||
|
||||
// --- 首次获得道具的提示
|
||||
if (!core.hasFlag("__itemHint__")) core.setFlag("__itemHint__", []);
|
||||
var itemHint = core.getFlag("__itemHint__");
|
||||
if (core.flags.itemFirstText && itemHint.indexOf(id) < 0 && itemCls != 'items') {
|
||||
var hint = core.material.items[id].text || "该道具暂无描述";
|
||||
try {
|
||||
hint = core.replaceText(hint);
|
||||
} catch (e) { }
|
||||
if (!core.status.event.id || core.status.event.id == 'action') {
|
||||
core.insertAction("\t[" + core.material.items[id].name + "," + id + "]\b[center]" + hint + "\n"
|
||||
+ (id.endsWith('Key') ? "(钥匙类道具,遇到对应的门时自动打开)"
|
||||
: itemCls == 'tools' ? "(消耗类道具,请按T在道具栏使用)"
|
||||
: itemCls == 'constants' ? "(永久类道具,请按T在道具栏使用)"
|
||||
: itemCls == 'equips' ? "(装备类道具,请按Q在装备栏进行装备)" : ""));
|
||||
}
|
||||
itemHint.push(id);
|
||||
}
|
||||
|
||||
this.afterGetItem(id, x, y, isGentleClick);
|
||||
if (callback) callback();
|
||||
}
|
||||
},
|
||||
"drawLight": function () {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user