diff --git a/libs/control.js b/libs/control.js index 674b163a..ca98964e 100644 --- a/libs/control.js +++ b/libs/control.js @@ -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; diff --git a/libs/utils.js b/libs/utils.js index 9da86c95..a527f9e9 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -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