disableShopOnDamage & consoleOpened isPC
This commit is contained in:
parent
822a0deb5b
commit
12fe714703
@ -919,6 +919,7 @@ control.prototype.checkBlock = function () {
|
||||
core.status.hero.hp -= damage;
|
||||
core.drawTip("受到"+(core.status.checkBlock.type[loc]||"伤害")+damage+"点");
|
||||
this._checkBlock_soundAndAnimate(x, y);
|
||||
this._checkBlock_disableQuickShop();
|
||||
if (core.status.hero.hp <= 0) {
|
||||
core.status.hero.hp=0;
|
||||
core.updateStatusBar();
|
||||
@ -935,6 +936,15 @@ control.prototype._checkBlock_soundAndAnimate = function (x,y) {
|
||||
core.drawAnimate("zone", x, y);
|
||||
}
|
||||
|
||||
control.prototype._checkBlock_disableQuickShop = function () {
|
||||
// 禁用快捷商店
|
||||
if (core.flags.disableShopOnDamage) {
|
||||
for (var shopId in core.status.shops) {
|
||||
core.status.shops[shopId].visited = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////// 阻击 //////
|
||||
control.prototype._checkBlock_snipe = function (snipe) {
|
||||
if (!snipe || snipe.length == 0) return;
|
||||
|
||||
@ -1005,6 +1005,7 @@ utils.prototype.consoleOpened = function () {
|
||||
if (!core.flags.checkConsole) return false;
|
||||
if (window.Firebug && window.Firebug.chrome && window.Firebug.chrome.isInitialized)
|
||||
return true;
|
||||
if (!core.platform.isPC) return false;
|
||||
var threshold = 160;
|
||||
var zoom = Math.min(window.outerWidth / window.innerWidth, window.outerHeight / window.innerHeight);
|
||||
return window.outerWidth - zoom * window.innerWidth > threshold
|
||||
|
||||
Loading…
Reference in New Issue
Block a user