From 86a175d26034c6e2a43a46928cb0ff44ae02a0da Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 25 Feb 2017 23:41:26 +0800 Subject: [PATCH] r --- game/config.js | 1 - game/game.js | 25 +++++++++++++++++-------- mode/boss.js | 3 ++- mode/guozhan.js | 2 +- mode/versus.js | 1 + 5 files changed, 21 insertions(+), 11 deletions(-) diff --git a/game/config.js b/game/config.js index 0735a2846..fd92db80e 100644 --- a/game/config.js +++ b/game/config.js @@ -77,7 +77,6 @@ window.config={ hiddenCardPack:[], hiddenPlayPack:[], favouriteCharacter:[], - recentCharacter:[], recentIP:[], alteredSkills:[], diff --git a/game/game.js b/game/game.js index ded0b6975..ef7546e86 100644 --- a/game/game.js +++ b/game/game.js @@ -50,7 +50,8 @@ return lib.config.favouriteCharacter.contains(name)?capt:null; }, '最近':function(name,capt){ - return lib.config.recentCharacter.contains(name)?capt:null; + var list=get.config('recentCharacter')||[]; + return list.contains(name)?capt:null; } }, onDB:function(func){ @@ -2798,6 +2799,12 @@ } } }, + onlyguozhanexpand:{ + name:'默认展开自由选将', + init:false, + restart:true, + intro:'开启后自由选将对话框将默认显示全部武将' + }, change_identity:{ name:'自由选择座位', init:true, @@ -20375,17 +20382,18 @@ } }, addRecentCharacter:function(){ + var list=get.config('recentCharacter')||[]; for(var i=0;inum){ - lib.config.recentCharacter.splice(num); + if(list.length>num){ + list.splice(num); } - game.saveConfig('recentCharacter',lib.config.recentCharacter); + game.saveConfig('recentCharacter',list,true); }, createCard:function(name,suit,number,nature){ if(typeof name=='object'){ @@ -30015,7 +30023,7 @@ var translate; var pack=null; if(packname=='最近'){ - pack=lib.config.recentCharacter; + pack=get.config('recentCharacter')||[]; } else if(packname=='收藏'){ pack=lib.config.favouriteCharacter; @@ -30027,7 +30035,8 @@ dialog.add([list,'character']); var bool=true; var node; - if(lib.config.recentCharacter.length){ + var recent=get.config('recentCharacter'); + if(recent&&recent.length){ node=createNode('最近'); if(lib.config.character_dialog_tool=='最近'){ clickCapt.call(node); diff --git a/mode/boss.js b/mode/boss.js index bd3fb1344..4700222bd 100644 --- a/mode/boss.js +++ b/mode/boss.js @@ -206,7 +206,7 @@ mode.boss={ game.saveConfig('continue_name_boss'); } for(var i=0;i