diff --git a/README.md b/README.md index cfc384fe..d2498933 100644 --- a/README.md +++ b/README.md @@ -321,4 +321,6 @@ HTML5魔塔交流群群号: `539113091` [@fux4](https://github.com/fux4) 打通了RM和H5之间的障壁(从而使RM动画导出器和怪物数据导出器成为可能),同时也是部分新功能(如跳跃、跟随、画面震动)等的编写者。 +[@tocque](https://github.com/tocque) 装备栏的编写者。 + 以及[百度贴吧魔塔吧](https://tieba.baidu.com/f?kw=%E9%AD%94%E5%A1%94)和H5魔塔交流群`539113091`内的诸位魔塔爱好者们对本样板的大力支持! diff --git a/_server/README.md b/_server/README.md index 2d6a8d08..374db923 100644 --- a/_server/README.md +++ b/_server/README.md @@ -70,7 +70,7 @@ editor.file.editFunctions(["change","['events']['afterChangeLight']","function(x 生成表格并绑定事件的函数 ```javascript editor.mode.loc(); -editor.mode.emenyitem(); +editor.mode.enemyitem(); editor.mode.floor(); editor.mode.tower(); editor.mode.functions(); @@ -83,7 +83,7 @@ editor.mode.onmode('save');//保存 editor.mode.onmode('nextChange');//下次onmode时前端进行切换 editor.mode.onmode('loc'); -editor.mode.onmode('emenyitem'); +editor.mode.onmode('enemyitem'); editor.mode.onmode('floor'); editor.mode.onmode('tower'); editor.mode.onmode('functions'); diff --git a/_server/comment.js b/_server/comment.js index 9f7bb124..0621926b 100644 --- a/_server/comment.js +++ b/_server/comment.js @@ -23,7 +23,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "equips" ] }, - "_data": "只能取keys(钥匙) items(宝石、血瓶) constants(永久物品) tools(消耗道具) equip(装备)" + "_data": "只能取keys(钥匙) items(宝石、血瓶) constants(永久物品) tools(消耗道具) equips(装备)" }, "name": { "_leaf": true, @@ -38,36 +38,9 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "_data": "道具在道具栏中显示的描述" }, "equip": { - "_leaf": false, - "_type": "object", - "_data": { - "type": { - "_leaf": true, - "_type": "textarea", - "_data": "如果是装备,其类别,与equipName按顺序对应(从0开始)" - }, - "atk": { - "_leaf": true, - "_type": "textarea", - "_data": "如果是装备,其增加的攻击数值" - }, - "def": { - "_leaf": true, - "_type": "textarea", - "_data": "如果是装备,其增加的防御数值" - }, - "mdef": { - "_leaf": true, - "_type": "textarea", - "_data": "如果是装备,其增加的魔防数值" - }, - "animate": { - "_leaf": true, - "_type": "textarea", - "_string": true, - "_data": "如果是装备,其攻击动画,仅对type为0的装备有效" - } - } + "_leaf": true, + "_type": "textarea", + "_data": "装备属性设置,仅对cls为equips有效。\n如果此项不为null,需要是一个对象,里面可含\"type\",\"atk\",\"def\",\"mdef\",\"animate\"五项,分别对应装备部位、攻防魔防和动画。\n具体详见文档和已有的几个装备的写法。" }, } }, diff --git a/_server/editor.js b/_server/editor.js index 07741e42..6b53043a 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -709,8 +709,8 @@ editor.prototype.listen = function () { } tip.infos = JSON.parse(JSON.stringify(editor.info)); editor_mode.onmode('nextChange'); - editor_mode.onmode('emenyitem'); - //editor_mode.emenyitem(); + editor_mode.onmode('enemyitem'); + //editor_mode.enemyitem(); } } } @@ -779,7 +779,7 @@ editor.prototype.listen = function () { dataSelection.style.height = ysize - 6 + 'px'; tip.infos = JSON.parse(JSON.stringify(editor.info)); editor_mode.onmode('nextChange'); - editor_mode.onmode('emenyitem'); + editor_mode.onmode('enemyitem'); } var fields = Object.keys(editor.file.comment._data.floors._data.loc._data); diff --git a/_server/editor_mode.js b/_server/editor_mode.js index 47ddbd94..3fe44261 100644 --- a/_server/editor_mode.js +++ b/_server/editor_mode.js @@ -4,7 +4,7 @@ editor_mode = function (editor) { function editor_mode() { this.ids = { 'loc': 'left2', - 'emenyitem': 'left3', + 'enemyitem': 'left3', 'floor': 'left4', 'tower': 'left5', 'functions': 'left8', @@ -208,7 +208,7 @@ editor_mode = function (editor) { editor.drawEventBlock(); }); break; - case 'emenyitem': + case 'enemyitem': if (editor_mode.info.images == 'enemys' || editor_mode.info.images == 'enemy48') { editor.file.editEnemy(editor_mode.info.id, actionList, function (objs_) {/*console.log(objs_);*/ @@ -310,7 +310,7 @@ editor_mode = function (editor) { if (Boolean(callback)) callback(); } - editor_mode.prototype.emenyitem = function (callback) { + editor_mode.prototype.enemyitem = function (callback) { //editor.info=editor.ids[editor.indexs[201]]; if (!core.isset(editor.info)) return; diff --git a/editor-mobile.html b/editor-mobile.html index 5d5a7d8b..9a2b55ea 100644 --- a/editor-mobile.html +++ b/editor-mobile.html @@ -88,7 +88,7 @@ -
+

图块属性  

@@ -264,7 +264,7 @@ - + @@ -449,7 +449,7 @@ if (location.protocol.indexOf("http")!=0) { editor.pos = {x: 0, y: 0}; editor.mode.loc(); editor.info = editor.ids[editor.indexs[201]]; - editor.mode.emenyitem(); + editor.mode.enemyitem(); editor.mode.floor(); editor.mode.tower(); editor.mode.functions(); diff --git a/libs/actions.js b/libs/actions.js index 53fb05ae..d060d672 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -1245,24 +1245,28 @@ actions.prototype.clickToolbox = function(x,y) { } */ var toolsPage = core.status.event.data.toolsPage; - var constantsPage = core.status.event.data.constantsPage + var constantsPage = core.status.event.data.constantsPage; // 上一页 if (x == 3 || x == 4) { - if ( y == 7 && toolsPage>1) + if (y == 7 && toolsPage>1) { core.status.event.data.toolsPage--; - if ( y == 12 && constantsPage>1) - core.status.event.data.constantsPage--; - core.ui.drawToolbox(core.status.event.selection) - return; + core.ui.drawToolbox(core.status.event.selection); + } + if (y == 12 && constantsPage>1) { + core.status.event.data.toolsPage--; + core.ui.drawToolbox(core.status.event.selection); + } } // 下一页 - if ((x == 8 || x == 9)) { - if (( y == 7 && toolsPage1) { + if (index==0) { // 处理向前翻页 + if (toolsPage > 1) { core.status.event.data.toolsPage--; index = 11; } else return; // 第一页不向前翻 - else if (index==12) - if (constantsPage>1) { + } + else if (index==12) { + if (constantsPage == 1) { + if (toolsTotalPage==0) return; + core.status.event.data.toolsPage = toolsTotalPage; + index = (tools.length+11)%12; + } + else { core.status.event.data.constantsPage--; index = 23; } - else return; + } else index -= 1 ; this.clickToolboxIndex(index); return; } if (keycode==38) { // up - if (toolsPage==toolsTotalPage&&index<18&&index>11) { // 进入tools + if (index>=12&&index<=17) { // 进入tools if (toolsTotalPage==0) return; - if (tools.length%12<=6 && tools.length%12>index%12) index -= 12; - else if (tools.length%12>6 && tools.length%6>index%12) index -= 6; - else index = tools.length%12-1; + if (toolsLastIndex>=6) index = Math.min(toolsLastIndex, index-6); + else index = Math.min(toolsLastIndex, index-12); } else if (index<6) return; // 第一行没有向上 else index -= 6; @@ -1349,28 +1360,33 @@ actions.prototype.keyDownToolbox = function (keycode) { core.status.event.data.constantsPage++; index = 12; } - else if((toolsPage==toolsTotalPage && index==tools.length%12-1) || - (constantsPage==constantsTotalPage && index==constants.length%12+11)) // 一个物品无操作 + else if (index == toolsLastIndex) { + if (constantsTotalPage==0) return; + core.status.event.data.constantsPage = 1; + index = 12; + } + else if(index==constantsLastIndex) // 一个物品无操作 return; - else index +=1; + else index++; this.clickToolboxIndex(index); return; } if (keycode==40) { // down - if ((index>5 || (toolsPage==toolsTotalPage && tools.length%12<=6)) && index<12) {// 进入constant - if (constantsTotalPage == 0) return; - if (constantsTotalPage == constantsPage && constants.length%12<(index%6+1)) - index = constants.length%12+11; - else if (index<6) index += 12; - else index += 6; + var nextIndex = null; + if (index<=5) { + if (toolsLastIndex > 5) nextIndex = Math.min(toolsLastIndex, index + 6); + else index+=6; + } + if (nextIndex==null && index<=11) { + if (constantsTotalPage == 0) return; + nextIndex = Math.min(index+6, constantsLastIndex); + } + if (nextIndex==null && index<=17) { + if (constantsLastIndex > 17) nextIndex = Math.min(constantsLastIndex, index+6); + } + if (nextIndex!=null) { + this.clickToolboxIndex(nextIndex); } - else if (toolsPage==toolsTotalPage && tools.length%12>6 && index > tools.length%6 &&index<6) - index = tools.length%12-1; - else if (constantsPage==constantsTotalPage && constants.length%12>6 && index>constants.length%6+11 && index<18) - index = constants.length%12+11; - else if (index>17 || (constantsPage==constantsTotalPage && constants.length%12<=6 && index>11)) return;//最后一行无操作 - else index += 6; - this.clickToolboxIndex(index); return; } } @@ -1438,43 +1454,39 @@ actions.prototype.clickEquipbox = function(x,y) { // 下一页 if ((x == 8 || x == 9) && y == 12) { var lastPage = Math.ceil(Object.keys(core.status.hero.items.equips).length/12); - if (page=0) + if (index>=0) { + if (index<12) index = parseInt(index/2); this.clickEquipboxIndex(index); + } } ////// 选择装备栏界面中某个Index后的操作 ////// actions.prototype.clickEquipboxIndex = function(index) { - if (index<12) { - if (index>=core.status.hero.equipment.length) return; - if (index==core.status.event.selection && core.status.hero.equipment[index] != "blank") { + if (index<6) { + if (index>=(main.equipName||[]).length) return; + if (index==core.status.event.selection && core.isset(core.status.hero.equipment[index])) { core.unloadEquip(index); } } - else { - var equips = null; - equips = Object.keys(core.status.hero.items.equips).sort(); - if (equips==null) return; - if (index>=equips.length+12) return; + else if (index>=12) { + var equips = Object.keys(core.status.hero.items.equips||{}).sort(); if (index==core.status.event.selection) { - var equipId = equips[index-12]; + var equipId = equips[index-12 + (core.status.event.data.page-1)*12]; core.loadEquip(equipId); - equips = Object.keys(core.status.hero.items.equips).sort(); - if ( equips.length == 0) - index = core.status.hero.equipment.length-1; } } core.ui.drawEquipbox(index); @@ -1484,35 +1496,36 @@ actions.prototype.clickEquipboxIndex = function(index) { actions.prototype.keyDownEquipbox = function (keycode) { if (!core.isset(core.status.event.data)) return; - var equipCapacity = core.status.hero.equipment.length; + var equipCapacity = (main.equipName||[]).length; var ownEquipment = Object.keys(core.status.hero.items.equips).sort(); var index = core.status.event.selection; var page = core.status.event.data.page; var totalPage = Math.ceil(ownEquipment.length/12); + var totalLastIndex = 12+(page1) { + if (index==12) { + if (page > 1) { core.status.event.data.page--; index = 23; } - else if (page==1) - index = equipCapacity-1; + else if (page == 1) + index = equipCapacity - 1; else return; + } else index -= 1; this.clickEquipboxIndex(index); return; } if (keycode==38) { // up - if (index<18 && index>11) { // 进入当前装备 - index = Math.ceil((index-12)/2); - if (equipCapacity<=3 && equipCapacity>index) index += 0; - else if (equipCapacity>3 && equipCapacity>index) index += 3; - else index = equipCapacity-1; + if (index<3) return; + else if (index<6) index -= 3; + else if (index < 18) { + index = parseInt((index-12)/2); + if (equipCapacity>3) index = Math.min(equipCapacity-1, index + 3); + else index = Math.min(equipCapacity-1, index); } - else if (index<3) return; // 第一行没有向上 - else if (index<12) index -= 3; else index -= 6; this.clickEquipboxIndex(index); return; @@ -1522,28 +1535,31 @@ actions.prototype.keyDownEquipbox = function (keycode) { core.status.event.data.page++; index = 12; } - else if (index==equipCapacity-1 && totalPage>0) + else if (index==equipCapacity-1) { + if (totalPage==0) return; index = 12; - else if (page==totalPage && index==ownEquipment.length%12+11) + } + else if (index==totalLastIndex) return; - else index += 1; + else index++; this.clickEquipboxIndex(index); return; } if (keycode==40) { // down - if ((index>2 || equipCapacity<=3) && index<12) {// 进入拥有装备 - index = (index%3)*2+13; - if (totalPage == 0) return; - if (totalPage == page && ownEquipment.length%12<(index%6+1)) - index = ownEquipment.length%12+11; + if (index<3) { + if (equipCapacity>3) index = Math.min(index+3, equipCapacity-1); + else { + if (totalPage == 0) return; + index = Math.min(2*index+1+12, totalLastIndex); + } } - else if (equipCapacity>3 && equipCapacity%36 && index>ownEquipment.length%6+11 && index<18) - index = ownEquipment.length%12+11; - else if (index>17 || (totalPage==page && ownEquipment.length%12<=6 && index>11)) return;//最后一行无操作 - else if (index<12) index += 3; - else index += 6; + else if (index < 6) { + if (totalPage == 0) return; + index = Math.min(2*(index-3)+1+12, totalLastIndex); + } + else if (index < 18) + index = Math.min(index+6, totalLastIndex); + else return; this.clickEquipboxIndex(index); return; } diff --git a/libs/control.js b/libs/control.js index 8b9bc67b..ff4c53d2 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1857,16 +1857,17 @@ control.prototype.replay = function () { } } else if (action.indexOf("unEquip:")==0) { - var unloadEquipId = action.substring(8); - var equipType = core.material.items[unloadEquipId].equip.type; - core.ui.drawEquipbox(equipType); - setTimeout(function () { - core.ui.closePanel(); - core.unloadEquip(equipType, function () { - core.replay(); - }); - }, 750 / Math.max(1, core.status.replay.speed)); - return; + var equipType = parseInt(action.substring(8)); + if (core.isset(equipType)) { + core.ui.drawEquipbox(equipType); + setTimeout(function () { + core.ui.closePanel(); + core.unloadEquip(equipType, function () { + core.replay(); + }); + }, 750 / Math.max(1, core.status.replay.speed)); + return; + } } else if (action.indexOf("equip:")==0) { var equipId = action.substring(6); diff --git a/libs/items.js b/libs/items.js index fe052929..7203efde 100644 --- a/libs/items.js +++ b/libs/items.js @@ -187,7 +187,7 @@ items.prototype.loadEquip = function (equipId, callback) { if (core.isset(unloadEquipId)) core.addItem(unloadEquipId, 1); - core.log("已装备上"+loadEquip.name, core.material.icons.items[equipId]); + core.drawTip("已装备上"+loadEquip.name, core.material.icons.items[equipId]); if (core.isset(callback)) callback(); } @@ -217,7 +217,7 @@ items.prototype.unloadEquip = function (equipType, callback) { core.updateStatusBar(); // 记录路线 - core.status.route.push("unEquip:"+unloadEquipId); + core.status.route.push("unEquip:"+equipType); // 装备更换完毕:增加卸下的装备 core.addItem(unloadEquipId, 1); diff --git a/libs/ui.js b/libs/ui.js index 68d7c2d7..9ba566f4 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -1206,7 +1206,9 @@ ui.prototype.drawReplay = function () { ////// 绘制分页 ////// ui.prototype.drawPagination = function (page, totalPage, top) { - if (totalPage <= 1) return; + // if (totalPage0) index=0; + if (equipLength>0 && core.isset(equipEquipment[0])) index=0; else if (ownEquipment.length>0) index=12; else index=0; } - core.status.event.selection=index; - - var selectId; + if (index>=12 && ownEquipment.length==0) index = 0; + var selectId=null; if (index<12) { - if (index>=equipEquipment.length) index=Math.max(0, equipEquipment.length-1); - selectId = equipEquipment[index]; + if (index >= equipLength) index=Math.max(0, equipLength - 1); + selectId = equipEquipment[index]||null; } else { - if (index+12*(page-2)>=ownEquipment.length) index=12+Math.max(0, ownEquipment.length%12-1); - selectId = ownEquipment[index-12]; + if (page == totalPage) index = Math.min(index, (ownEquipment.length+11)%12+12); + selectId = ownEquipment[index-12 + (page-1)*12]; if (!core.hasItem(selectId)) selectId=null; } + core.status.event.selection=index; core.status.event.data.selectId=selectId; core.clearMap('ui', 0, 0, 416, 416); @@ -1792,16 +1801,16 @@ ui.prototype.drawEquipbox = function(index) { core.canvas.ui.textAlign = 'left'; - console.log(equipEquipment[0]); // 描述 if (core.isset(selectId)) { var equip=core.material.items[selectId]; - core.fillText('ui', equip.name, 10, 32, '#FFD700', "bold 20px Verdana") + var equipType = (equip.equip||{}).type || 0; + core.fillText('ui', equip.name + "(" + (allEquips[equipType]||"未知部位") + ")", 10, 32, '#FFD700', "bold 20px Verdana") var text = equip.text||"该装备暂无描述。"; var lines = core.splitLines('ui', text, 406, '17px Verdana'); - core.fillText('ui', lines[0], 10, 62, '#FFFFFF', '17px Verdana'); + core.fillText('ui', lines[0], 10, 62, '#FFFFFF', '17px Verdana'); // 比较属性 if (lines.length==1) { @@ -1810,43 +1819,20 @@ ui.prototype.drawEquipbox = function(index) { else { compare = core.compareEquipment(selectId, equipEquipment[equip.equip.type]); } - // 绘制 - var drawList; //= [['攻击',atk],['防御',def],['魔防',mdef]]; - var drawPointer = 0; - var color; - if (compare.atk!=0) { - if (compare.atk>0) color = '#00FF00'; - else color = '#FF0000'; - drawList = '攻击 '+core.status.hero.atk+'->'; - core.fillText('ui', drawList, 10+drawPointer, 89, '#CCCCCC', 'bold 14px Verdana'); - drawPointer += core.canvas.ui.measureText(drawList).width; + var drawOffset = 10; - drawList = (core.status.hero.atk+compare.atk)+' '; - core.fillText('ui', drawList, 10+drawPointer, 89, color, 'bold 14px Verdana'); - drawPointer += core.canvas.ui.measureText(drawList).width; - } - if (compare.def!=0) { - if (compare.def>0) color = '#00FF00'; - else color = '#FF0000'; - drawList = '防御 '+core.status.hero.atk+'->'; - core.fillText('ui', drawList, 10+drawPointer, 89, '#CCCCCC', 'bold 14px Verdana'); - drawPointer += core.canvas.ui.measureText(drawList).width; - - drawList = (core.status.hero.atk+compare.def)+' '; - core.fillText('ui', drawList, 10+drawPointer, 89, color, 'bold 14px Verdana'); - drawPointer += core.canvas.ui.measureText(drawList).width; - } - if (compare.mdef!=0) { - if (compare.mdef>0) color = '#00FF00'; - else color = '#FF0000'; - drawList = '魔防 '+core.status.hero.atk+'->'; - core.fillText('ui', drawList, 10+drawPointer, 89, '#CCCCCC', 'bold 14px Verdana'); - drawPointer += core.canvas.ui.measureText(drawList).width; - - drawList = (core.status.hero.atk+compare.mdef)+' '; - core.fillText('ui', drawList, 10+drawPointer, 89, color, 'bold 14px Verdana'); - drawPointer += core.canvas.ui.measureText(drawList).width; - } + [['攻击','atk'], ['防御','def'], ['魔防','mdef']].forEach(function (t) { + var title = t[0], name = t[1]; + if (!core.isset(compare[name]) || compare[name]==0) return; + var color = '#00FF00'; + if (compare[name]<0) color = '#FF0000'; + var content = title + ' ' + core.getStatus(name) + '->'; + core.fillText('ui', content, drawOffset, 89, '#CCCCCC', 'bold 14px Verdana'); + drawOffset += core.canvas.ui.measureText(content).width; + var newValue = core.getStatus(name) + compare[name] + ""; + core.fillText('ui', newValue, drawOffset, 89, color); + drawOffset += core.canvas.ui.measureText(newValue).width + 15; + }) } else { var leftText = text.substring(lines[0].length); @@ -1858,34 +1844,33 @@ ui.prototype.drawEquipbox = function(index) { var images = core.material.images.items; // 当前装备 - for (var i = 0 ; i < core.status.hero.equipment.length ; i++) { - var equipId = core.status.hero.equipment[i]; + for (var i = 0 ; i < equipLength ; i++) { + var equipId = equipEquipment[i] || null; if (core.isset(equipId)) { var icon = core.material.icons.items[equipId]; - core.canvas.ui.drawImage(images, 0, icon*32, 32, 32, 16*(8*(i%3)+5)+5, 144+Math.floor(i/3)*64+5-ydelta, 32, 32); + core.canvas.ui.drawImage(images, 0, icon*32, 32, 32, 16*(8*(i%3)+5)+5, 144+Math.floor(i/3)*54+5-ydelta, 32, 32); } - core.fillText('ui', main.equipName[i], 16*(8*(i%3)+1)+40, 144+Math.floor(i/3)*64+32-ydelta, '#FFFFFF', "bold 16px Verdana"); - if (index == i) - core.strokeRect('ui', 16*(8*(i%3)+5)+1, 144+Math.floor(i/3)*64+1-ydelta, 40, 40, '#FFD700'); + core.fillText('ui', allEquips[i]||"未知", 16*(8*(i%3)+1)+40, 144+Math.floor(i/3)*54+32-ydelta, '#FFFFFF', "bold 16px Verdana"); + core.strokeRect('ui', 16*(8*(i%3)+5)+1, 144+Math.floor(i/3)*54+1-ydelta, 40, 40, index==i?'#FFD700':"#FFFFFF"); } // 现有装备 for (var i=0;i<12;i++) { var ownEquip=ownEquipment[12*(page-1)+i]; - if (!core.isset(ownEquip)) break; + if (!core.isset(ownEquip)) continue; var icon=core.material.icons.items[ownEquip]; - core.canvas.ui.drawImage(images, 0, icon*32, 32, 32, 16*(4*(i%6)+1)+5, 304+Math.floor(i/6)*64+5-ydelta, 32, 32) + core.canvas.ui.drawImage(images, 0, icon*32, 32, 32, 16*(4*(i%6)+1)+5, 304+Math.floor(i/6)*54+5-ydelta, 32, 32) // 个数 if (core.itemCount(ownEquip)>1) - core.fillText('ui', core.itemCount(ownEquip), 16*(4*(i%6)+1)+40, 304+Math.floor(i/6)*64+38-ydelta, '#FFFFFF', "bold 14px Verdana"); + core.fillText('ui', core.itemCount(ownEquip), 16*(4*(i%6)+1)+40, 304+Math.floor(i/6)*54+38-ydelta, '#FFFFFF', "bold 14px Verdana"); if (selectId == ownEquip) - core.strokeRect('ui', 16*(4*(i%6)+1)+1, 304+Math.floor(i/6)*64+1-ydelta, 40, 40, '#FFD700'); + core.strokeRect('ui', 16*(4*(i%6)+1)+1, 304+Math.floor(i/6)*54+1-ydelta, 40, 40, '#FFD700'); } this.drawPagination(page, totalPage, 12); // 道具栏 core.canvas.ui.textAlign = 'center'; - core.fillText('ui', '道具栏', 370, 19,'#DDDDDD', 'bold 15px Verdana'); + core.fillText('ui', '[道具栏]', 370, 25,'#DDDDDD', 'bold 15px Verdana'); // 退出按钮 core.fillText('ui', '返回游戏', 370, 403,'#DDDDDD', 'bold 15px Verdana'); } diff --git a/libs/utils.js b/libs/utils.js index 3551cea1..9a05a0a1 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -325,7 +325,7 @@ utils.prototype.encodeRoute = function (route) { if (t.indexOf('item:')==0) ans+="I"+t.substring(5)+":"; else if (t.indexOf('unEquip:')==0) - ans+="u"+t.substring(8)+":"; + ans+="u"+t.substring(8); else if (t.indexOf('equip:')==0) ans+="e"+t.substring(6)+":"; else if (t.indexOf('fly:')==0) @@ -387,7 +387,7 @@ utils.prototype.decodeRoute = function (route) { while (index