甘艺伟 1 週間 前
コミット
35ec917905

+ 3 - 3
assets/bundle/gridMap/mergeProp/mat_10204.png.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "2.3.7",
   "ver": "2.3.7",
-  "uuid": "91d1d93d-126a-4a93-81b1-af84d005f68d",
+  "uuid": "6509897e-93e4-4087-b89b-00165bee6eb3",
   "importer": "texture",
   "importer": "texture",
   "type": "sprite",
   "type": "sprite",
   "wrapMode": "clamp",
   "wrapMode": "clamp",
@@ -14,9 +14,9 @@
   "subMetas": {
   "subMetas": {
     "mat_10204": {
     "mat_10204": {
       "ver": "1.0.6",
       "ver": "1.0.6",
-      "uuid": "4028ddd0-c594-4725-9a82-fe3febdca3e9",
+      "uuid": "41c90e06-634b-495f-b80b-f00c1212a534",
       "importer": "sprite-frame",
       "importer": "sprite-frame",
-      "rawTextureUuid": "91d1d93d-126a-4a93-81b1-af84d005f68d",
+      "rawTextureUuid": "6509897e-93e4-4087-b89b-00165bee6eb3",
       "trimType": "auto",
       "trimType": "auto",
       "trimThreshold": 1,
       "trimThreshold": 1,
       "rotated": false,
       "rotated": false,

+ 3 - 3
assets/bundle/gridMap/mergeProp/mat_10205.png.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "2.3.7",
   "ver": "2.3.7",
-  "uuid": "2549335c-e440-472b-87e5-593e9e998810",
+  "uuid": "0c67dab6-81ba-4724-8271-5674da1c25f1",
   "importer": "texture",
   "importer": "texture",
   "type": "sprite",
   "type": "sprite",
   "wrapMode": "clamp",
   "wrapMode": "clamp",
@@ -14,9 +14,9 @@
   "subMetas": {
   "subMetas": {
     "mat_10205": {
     "mat_10205": {
       "ver": "1.0.6",
       "ver": "1.0.6",
-      "uuid": "0694a1be-d5ad-44c5-a1a0-04a9c383ec99",
+      "uuid": "08da0fad-34f6-4609-96ff-c1e1951db4c9",
       "importer": "sprite-frame",
       "importer": "sprite-frame",
-      "rawTextureUuid": "2549335c-e440-472b-87e5-593e9e998810",
+      "rawTextureUuid": "0c67dab6-81ba-4724-8271-5674da1c25f1",
       "trimType": "auto",
       "trimType": "auto",
       "trimThreshold": 1,
       "trimThreshold": 1,
       "rotated": false,
       "rotated": false,

+ 36 - 36
assets/json/chapterLayout.json

@@ -1,40 +1,40 @@
 [
 [
   {"id":10001,"infoId":1,"grid":11,"type":1,"correlationId":10001,"unlock":0},
   {"id":10001,"infoId":1,"grid":11,"type":1,"correlationId":10001,"unlock":0},
   {"id":10002,"infoId":1,"grid":12,"type":1,"correlationId":20001,"unlock":0},
   {"id":10002,"infoId":1,"grid":12,"type":1,"correlationId":20001,"unlock":0},
-  {"id":10003,"infoId":1,"grid":13,"type":4,"correlationId":10101,"unlock":0},
-  {"id":10004,"infoId":1,"grid":15,"type":4,"correlationId":10102,"unlock":0},
-  {"id":10005,"infoId":1,"grid":16,"type":4,"correlationId":10103,"unlock":0},
-  {"id":10006,"infoId":1,"grid":22,"type":4,"correlationId":10104,"unlock":0},
-  {"id":10007,"infoId":1,"grid":23,"type":4,"correlationId":10105,"unlock":0},
-  {"id":10008,"infoId":1,"grid":25,"type":4,"correlationId":10106,"unlock":0},
-  {"id":10009,"infoId":1,"grid":26,"type":4,"correlationId":10107,"unlock":0},
-  {"id":10010,"infoId":1,"grid":31,"type":4,"correlationId":10108,"unlock":0},
-  {"id":10011,"infoId":1,"grid":32,"type":4,"correlationId":10109,"unlock":0},
-  {"id":10012,"infoId":1,"grid":34,"type":4,"correlationId":10110,"unlock":0},
-  {"id":10013,"infoId":1,"grid":36,"type":4,"correlationId":10201,"unlock":0},
-  {"id":10014,"infoId":1,"grid":41,"type":4,"correlationId":10202,"unlock":0},
-  {"id":10015,"infoId":1,"grid":42,"type":4,"correlationId":10203,"unlock":0},
-  {"id":10016,"infoId":1,"grid":43,"type":4,"correlationId":10204,"unlock":0},
-  {"id":10017,"infoId":1,"grid":44,"type":4,"correlationId":10205,"unlock":0},
-  {"id":10018,"infoId":1,"grid":46,"type":4,"correlationId":10206,"unlock":0},
-  {"id":10019,"infoId":1,"grid":53,"type":4,"correlationId":10207,"unlock":0},
-  {"id":20001,"infoId":2,"grid":11,"type":4,"correlationId":10208,"unlock":0},
-  {"id":20002,"infoId":2,"grid":12,"type":4,"correlationId":10209,"unlock":0},
-  {"id":20003,"infoId":2,"grid":13,"type":4,"correlationId":10210,"unlock":0},
-  {"id":20004,"infoId":2,"grid":15,"type":4,"correlationId":10301,"unlock":0},
-  {"id":20005,"infoId":2,"grid":16,"type":4,"correlationId":10302,"unlock":0},
-  {"id":20006,"infoId":2,"grid":22,"type":4,"correlationId":10303,"unlock":0},
-  {"id":20007,"infoId":2,"grid":23,"type":4,"correlationId":10304,"unlock":0},
-  {"id":20008,"infoId":2,"grid":25,"type":4,"correlationId":10305,"unlock":0},
-  {"id":20009,"infoId":2,"grid":26,"type":4,"correlationId":10306,"unlock":0},
-  {"id":20010,"infoId":2,"grid":31,"type":4,"correlationId":10307,"unlock":0},
-  {"id":20011,"infoId":2,"grid":32,"type":4,"correlationId":10308,"unlock":0},
-  {"id":20012,"infoId":2,"grid":34,"type":4,"correlationId":10309,"unlock":0},
-  {"id":20013,"infoId":2,"grid":36,"type":4,"correlationId":10310,"unlock":0},
-  {"id":20014,"infoId":2,"grid":41,"type":4,"correlationId":10401,"unlock":0},
-  {"id":20015,"infoId":2,"grid":42,"type":4,"correlationId":10402,"unlock":0},
-  {"id":20016,"infoId":2,"grid":43,"type":4,"correlationId":10403,"unlock":0},
-  {"id":20017,"infoId":2,"grid":44,"type":4,"correlationId":10404,"unlock":0},
-  {"id":20018,"infoId":2,"grid":46,"type":4,"correlationId":10405,"unlock":0},
-  {"id":20019,"infoId":2,"grid":53,"type":4,"correlationId":10406,"unlock":0}
+  {"id":10003,"infoId":1,"grid":13,"type":2,"correlationId":10101,"unlock":0},
+  {"id":10004,"infoId":1,"grid":15,"type":2,"correlationId":10102,"unlock":0},
+  {"id":10005,"infoId":1,"grid":16,"type":2,"correlationId":10103,"unlock":0},
+  {"id":10006,"infoId":1,"grid":22,"type":2,"correlationId":10104,"unlock":0},
+  {"id":10007,"infoId":1,"grid":23,"type":2,"correlationId":10105,"unlock":0},
+  {"id":10008,"infoId":1,"grid":25,"type":2,"correlationId":10106,"unlock":0},
+  {"id":10009,"infoId":1,"grid":26,"type":2,"correlationId":10107,"unlock":0},
+  {"id":10010,"infoId":1,"grid":31,"type":2,"correlationId":10108,"unlock":0},
+  {"id":10011,"infoId":1,"grid":32,"type":2,"correlationId":10109,"unlock":0},
+  {"id":10012,"infoId":1,"grid":34,"type":2,"correlationId":10110,"unlock":0},
+  {"id":10013,"infoId":1,"grid":36,"type":2,"correlationId":10201,"unlock":0},
+  {"id":10014,"infoId":1,"grid":41,"type":2,"correlationId":10202,"unlock":0},
+  {"id":10015,"infoId":1,"grid":42,"type":2,"correlationId":10203,"unlock":0},
+  {"id":10016,"infoId":1,"grid":43,"type":2,"correlationId":10204,"unlock":0},
+  {"id":10017,"infoId":1,"grid":44,"type":2,"correlationId":10205,"unlock":0},
+  {"id":10018,"infoId":1,"grid":46,"type":2,"correlationId":10206,"unlock":0},
+  {"id":10019,"infoId":1,"grid":53,"type":2,"correlationId":10207,"unlock":0},
+  {"id":20001,"infoId":2,"grid":11,"type":2,"correlationId":10208,"unlock":0},
+  {"id":20002,"infoId":2,"grid":12,"type":2,"correlationId":10209,"unlock":0},
+  {"id":20003,"infoId":2,"grid":13,"type":2,"correlationId":10210,"unlock":0},
+  {"id":20004,"infoId":2,"grid":15,"type":2,"correlationId":10301,"unlock":0},
+  {"id":20005,"infoId":2,"grid":16,"type":2,"correlationId":10302,"unlock":0},
+  {"id":20006,"infoId":2,"grid":22,"type":2,"correlationId":10303,"unlock":0},
+  {"id":20007,"infoId":2,"grid":23,"type":2,"correlationId":10304,"unlock":0},
+  {"id":20008,"infoId":2,"grid":25,"type":2,"correlationId":10305,"unlock":0},
+  {"id":20009,"infoId":2,"grid":26,"type":2,"correlationId":10306,"unlock":0},
+  {"id":20010,"infoId":2,"grid":31,"type":2,"correlationId":10307,"unlock":0},
+  {"id":20011,"infoId":2,"grid":32,"type":2,"correlationId":10308,"unlock":0},
+  {"id":20012,"infoId":2,"grid":34,"type":2,"correlationId":10309,"unlock":0},
+  {"id":20013,"infoId":2,"grid":36,"type":2,"correlationId":10310,"unlock":0},
+  {"id":20014,"infoId":2,"grid":41,"type":2,"correlationId":10401,"unlock":0},
+  {"id":20015,"infoId":2,"grid":42,"type":2,"correlationId":10402,"unlock":0},
+  {"id":20016,"infoId":2,"grid":43,"type":2,"correlationId":10403,"unlock":0},
+  {"id":20017,"infoId":2,"grid":44,"type":2,"correlationId":10404,"unlock":0},
+  {"id":20018,"infoId":2,"grid":46,"type":2,"correlationId":10405,"unlock":0},
+  {"id":20019,"infoId":2,"grid":53,"type":2,"correlationId":10406,"unlock":0}
 ]
 ]

+ 3 - 3
assets/json/itemKind.json

@@ -1,8 +1,8 @@
 [
 [
   {"kind":"1","name":"货币&普通道具"},
   {"kind":"1","name":"货币&普通道具"},
-  {"kind":"2","name":""},
-  {"kind":"3","name":""},
-  {"kind":"4","name":""},
+  {"kind":"2","name":"合成材料"},
+  {"kind":"3","name":"发射器"},
+  {"kind":"4","name":"装备"},
   {"kind":"5","name":""},
   {"kind":"5","name":""},
   {"kind":"6","name":""},
   {"kind":"6","name":""},
   {"kind":"7","name":""},
   {"kind":"7","name":""},

+ 12 - 0
assets/json/mergeMerge.json

@@ -0,0 +1,12 @@
+[
+  {"id":1001,"formula":[2,10101,2,10102],"item1":[2,10201],"rate1":5000,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1002,"formula":[2,10101,2,10102],"item1":[2,10202],"rate1":5000,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1003,"formula":[2,10102,2,10103],"item1":[2,10203],"rate1":3333,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1004,"formula":[2,10102,2,10103],"item1":[2,10204],"rate1":3333,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1005,"formula":[2,10102,2,10103],"item1":[2,10205],"rate1":3333,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1006,"formula":[2,10103,2,10104],"item1":[2,10206],"rate1":2500,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1007,"formula":[2,10103,2,10104],"item1":[2,10207],"rate1":2500,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1008,"formula":[2,10103,2,10104],"item1":[2,10208],"rate1":2500,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1009,"formula":[2,10103,2,10104],"item1":[2,10209],"rate1":2500,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0},
+  {"id":1010,"formula":[2,10201,2,10202],"item1":[3,18311],"rate1":10000,"item2":null,"rate2":0,"item3":null,"rate3":0,"item4":null,"rate4":0}
+]

+ 6 - 0
assets/json/mergeMerge.json.meta

@@ -0,0 +1,6 @@
+{
+  "ver": "1.0.2",
+  "uuid": "7f82d6f6-53c7-4fe1-a829-6ea6e4206677",
+  "importer": "json",
+  "subMetas": {}
+}

+ 1 - 1
assets/json/taskDesc.json.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "1.0.2",
   "ver": "1.0.2",
-  "uuid": "60d4f060-99e2-4e5c-aba1-ebf0c20aaf00",
+  "uuid": "798d91d2-8ed5-463d-9439-cd6984e16e39",
   "importer": "json",
   "importer": "json",
   "subMetas": {}
   "subMetas": {}
 }
 }

+ 1 - 1
assets/json/taskMain.json.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "1.0.2",
   "ver": "1.0.2",
-  "uuid": "f2dfbc87-e84f-4857-8722-70d804a9195d",
+  "uuid": "6746662e-61b5-4743-b276-8ee0cb01bcf5",
   "importer": "json",
   "importer": "json",
   "subMetas": {}
   "subMetas": {}
 }
 }

+ 4 - 2
assets/script/common/gameCfg.ts

@@ -1,7 +1,7 @@
 import ConfProxy, { ConfListProxy } from "./confProxy"
 import ConfProxy, { ConfListProxy } from "./confProxy"
 import { XlsConfig, xlsAttrAttr, xlsAudioInfo, xlsChapterInfo, xlsChapterLayout, xlsEmitterInfo, xlsGuideInfo, xlsItemKind
 import { XlsConfig, xlsAttrAttr, xlsAudioInfo, xlsChapterInfo, xlsChapterLayout, xlsEmitterInfo, xlsGuideInfo, xlsItemKind
-, xlsKaiqiInfo, xlsLanguageLang, xlsLanguageClientText, xlsLanguageSeverHouduan, xlsMathInfo, xlsMergePropInfo, xlsNameName, xlsPackageInfo, xlsPingbiciInfo
-, xlsTaskDesc, xlsTaskMain } from "./xlsConfig"
+, xlsKaiqiInfo, xlsLanguageLang, xlsLanguageClientText, xlsLanguageSeverHouduan, xlsMathInfo, xlsMergePropInfo, xlsMergeMerge, xlsNameName, xlsPackageInfo
+, xlsPingbiciInfo, xlsTaskDesc, xlsTaskMain } from "./xlsConfig"
 
 
 export default class Gamecfg {
 export default class Gamecfg {
     static attrAttr:ConfProxy<xlsAttrAttr>
     static attrAttr:ConfProxy<xlsAttrAttr>
@@ -18,6 +18,7 @@ export default class Gamecfg {
     static languageSeverHouduan:ConfProxy<xlsLanguageSeverHouduan>
     static languageSeverHouduan:ConfProxy<xlsLanguageSeverHouduan>
     static mathInfo:ConfProxy<xlsMathInfo>
     static mathInfo:ConfProxy<xlsMathInfo>
     static mergePropInfo:ConfProxy<xlsMergePropInfo>
     static mergePropInfo:ConfProxy<xlsMergePropInfo>
+    static mergeMerge:ConfProxy<xlsMergeMerge>
     static nameName:ConfProxy<xlsNameName>
     static nameName:ConfProxy<xlsNameName>
     static packageInfo:ConfProxy<xlsPackageInfo>
     static packageInfo:ConfProxy<xlsPackageInfo>
     static pingbiciInfo:ConfProxy<xlsPingbiciInfo>
     static pingbiciInfo:ConfProxy<xlsPingbiciInfo>
@@ -53,6 +54,7 @@ export default class Gamecfg {
                Gamecfg.kaiqiInfo = new ConfProxy("kaiqiInfo",xls.xlsKaiqiInfo ,"id")
                Gamecfg.kaiqiInfo = new ConfProxy("kaiqiInfo",xls.xlsKaiqiInfo ,"id")
                Gamecfg.languageSeverHouduan = new ConfProxy("languageSeverHouduan",xls.xlsLanguageSeverHouduan ,"key")
                Gamecfg.languageSeverHouduan = new ConfProxy("languageSeverHouduan",xls.xlsLanguageSeverHouduan ,"key")
                Gamecfg.mergePropInfo = new ConfProxy("mergePropInfo",xls.xlsMergePropInfo ,"id")
                Gamecfg.mergePropInfo = new ConfProxy("mergePropInfo",xls.xlsMergePropInfo ,"id")
+               Gamecfg.mergeMerge = new ConfProxy("mergeMerge",xls.xlsMergeMerge ,"id")
                Gamecfg.nameName = new ConfProxy("nameName",xls.xlsNameName ,"frist")
                Gamecfg.nameName = new ConfProxy("nameName",xls.xlsNameName ,"frist")
                Gamecfg.pingbiciInfo = new ConfProxy("pingbiciInfo",xls.xlsPingbiciInfo ,"id")
                Gamecfg.pingbiciInfo = new ConfProxy("pingbiciInfo",xls.xlsPingbiciInfo ,"id")
                Gamecfg.taskDesc = new ConfProxy("taskDesc",xls.xlsTaskDesc ,"kind")
                Gamecfg.taskDesc = new ConfProxy("taskDesc",xls.xlsTaskDesc ,"kind")

+ 12 - 9
assets/script/common/xlsConfig.ts

@@ -29,6 +29,8 @@ export type xlsLanguageLang = {key:string,cn:string,kr:string,tw:string,jp:strin
 export type xlsMathInfo = {key:string,pram:{"count"?:number,"count1"?:number,"str"?:string,"item"?:number[],"items"?:number[][],"kv"?:{[key:string]:number}}}
 export type xlsMathInfo = {key:string,pram:{"count"?:number,"count1"?:number,"str"?:string,"item"?:number[],"items"?:number[][],"kv"?:{[key:string]:number}}}
 // type for mergeProp.excel
 // type for mergeProp.excel
 export type xlsMergePropInfo = {id:number,name:string,icon:string,type:number,quality:number}
 export type xlsMergePropInfo = {id:number,name:string,icon:string,type:number,quality:number}
+// type for merge.excel
+export type xlsMergeMerge = {id:number,formula:number[],item1:number[],rate1:number,item2:number[],rate2:number,item3:number[],rate3:number,item4:number[],rate4:number}
 // type for monster.excel
 // type for monster.excel
 // type for name.excel
 // type for name.excel
 export type xlsNameName = {}
 export type xlsNameName = {}
@@ -45,24 +47,25 @@ export type xlsTaskMain = {id:string,nextid:string,kind:string,need:number,item:
 // type for wing.excel
 // type for wing.excel
 
 
 export class XlsConfig {
 export class XlsConfig {
-    xlsAttrAttr: xlsAttrAttr[]
-    xlsAudioInfo: xlsAudioInfo[]
     xlsChapterInfo: xlsChapterInfo[]
     xlsChapterInfo: xlsChapterInfo[]
     xlsChapterLayout: xlsChapterLayout[]
     xlsChapterLayout: xlsChapterLayout[]
-    xlsEmitterInfo: xlsEmitterInfo[]
     xlsItemKind: xlsItemKind[]
     xlsItemKind: xlsItemKind[]
+    xlsAudioInfo: xlsAudioInfo[]
     xlsKaiqiInfo: xlsKaiqiInfo[]
     xlsKaiqiInfo: xlsKaiqiInfo[]
+    xlsEmitterInfo: xlsEmitterInfo[]
     xlsLanguageClientText: xlsLanguageClientText[]
     xlsLanguageClientText: xlsLanguageClientText[]
-    xlsPackageInfo: xlsPackageInfo[]
+    xlsAttrAttr: xlsAttrAttr[]
     xlsGuideInfo: xlsGuideInfo[]
     xlsGuideInfo: xlsGuideInfo[]
-    xlsMathInfo: xlsMathInfo[]
-    xlsMergePropInfo: xlsMergePropInfo[]
-    xlsNameName: xlsNameName[]
-    xlsPingbiciInfo: xlsPingbiciInfo[]
     xlsLanguageSeverHouduan: xlsLanguageSeverHouduan[]
     xlsLanguageSeverHouduan: xlsLanguageSeverHouduan[]
-    xlsLanguageLang: xlsLanguageLang[]
+    xlsMergePropInfo: xlsMergePropInfo[]
+    xlsPackageInfo: xlsPackageInfo[]
+    xlsMergeMerge: xlsMergeMerge[]
+    xlsMathInfo: xlsMathInfo[]
     xlsTaskDesc: xlsTaskDesc[]
     xlsTaskDesc: xlsTaskDesc[]
     xlsTaskMain: xlsTaskMain[]
     xlsTaskMain: xlsTaskMain[]
+    xlsPingbiciInfo: xlsPingbiciInfo[]
+    xlsNameName: xlsNameName[]
+    xlsLanguageLang: xlsLanguageLang[]
 
 
     constructor(bundleName:string, callback: Function, progressCallback?: Function) {
     constructor(bundleName:string, callback: Function, progressCallback?: Function) {
         cc.assetManager.loadBundle(bundleName, (err, bundle) => {
         cc.assetManager.loadBundle(bundleName, (err, bundle) => {

+ 30 - 1
assets/script/data/model/GridMap/GridMapModel.ts

@@ -4,17 +4,46 @@ import { ReqHcMerge } from "../../../shared/hc/PtlHcMerge";
 import EventMng from "../../../manager/EventMng";
 import EventMng from "../../../manager/EventMng";
 import { GridEvent } from "../../../logic/gridMap/GridEvent";
 import { GridEvent } from "../../../logic/gridMap/GridEvent";
 import { ReqHcInfo } from "../../../shared/hc/PtlHcInfo";
 import { ReqHcInfo } from "../../../shared/hc/PtlHcInfo";
+import Gamecfg from "../../../common/gameCfg";
 
 
+/** 合成物品数据 */
+export interface MergeItem {
+    type: number,
+    id: number,
+    rate: number
+}
 
 
 export default class GridMapModel extends GridMapModelData {
 export default class GridMapModel extends GridMapModelData {
-
+    /** 配方可合成的物品 */
+    public formulaMap: { [key: string]: MergeItem[] } = {};
+    /** 可合成物品的配方 */
+    public itemFormula: { [key: string]: string } = {};
     constructor() {
     constructor() {
         super('gridMap');
         super('gridMap');
     }
     }
 
 
     protected onRegister(): void {
     protected onRegister(): void {
+
     }
     }
 
 
+    /** 过滤合成链 */
+    filterMergeChain() {
+        this.formulaMap = {};
+        this.itemFormula = {};
+        for (let key in Gamecfg.mergeMerge.pool) {
+            let item = Gamecfg.mergeMerge.pool[key];
+            let formulaKey = `${item.formula[0]}_${item.formula[1]}_${item.formula[2]}_${item.formula[3]}`;
+            this.formulaMap[formulaKey] = [];
+            for (let idx = 1; idx <= 4; idx++) {
+                let mergeItem = item[`item${idx}`];
+                let mergeItemRate = item[`rate${idx}`];
+                if (mergeItem) {
+                    this.formulaMap[formulaKey].push({ type: mergeItem[0], id: mergeItem[1], rate: mergeItemRate });
+                    this.itemFormula[`${mergeItem[0]}_${mergeItem[1]}`] = formulaKey;
+                }
+            }
+        }
+    }
 
 
 
 
     /** 请求棋盘信息 */
     /** 请求棋盘信息 */

+ 43 - 23
assets/script/logic/gridMap/UEGridMap.ts

@@ -207,34 +207,54 @@ export default class UEGridMap extends UEBase {
         }
         }
         return null;
         return null;
     }
     }
+    /** 检测目标格子是否可以放置&合成&交换物品 */
+    private CellCanPut(fromCell: UECell, toCell: UECell): boolean {
+        //目标格子是空格子
+        if (toCell.IsEmpty()) {
+            return true;
+        }
+        //检测目标格子物品是否可以拖动
+        if (toCell.GetCube().CanDrag()) {
+            return true;
+        }
+
+        //目标位置是物品,但是可以合成
+        if (this.CanMergeItems(fromCell, toCell)) {
+            return true;
+        }
+
+        return false;
+    }
 
 
     /** 尝试合成 */
     /** 尝试合成 */
     private TryMergeItems(fromCell: UECell, toCell: UECell) {
     private TryMergeItems(fromCell: UECell, toCell: UECell) {
         //检测是否可以合成
         //检测是否可以合成
-
-        // GameDataCenter.gridMap.sendHcMerge({ gzid1: fromCell.GetZIndex().toString(), gzid2: toCell.GetZIndex().toString() })
-
-        if (toCell.IsEmpty()) {
-            //格子上没有物品
-            fromCell.MoveCubeToCell(toCell);
-            toCell.SetCube(fromCell.GetCube());
-            fromCell.SetCube(null);
-        } else if (this.CanMergeItems(fromCell, toCell)) {
-            toCell.GetCube().PlayMergeAnim();
-            fromCell.ClearCube();
-            toCell.ClearCube();
-            let vec = this.TranIdxToPos(toCell.GetZIndex());
-            let mergeCube = this.CreateCube(vec.y, vec.x);
-            mergeCube.Init({
-                type: 3,
-                id: 10022,
-                zIndex: toCell.GetZIndex(),
-                unlock: 0
-            });
-            toCell.SetCube(mergeCube);
-        } else {
-            this.SwitchCell(fromCell, toCell);
+        if (!this.CellCanPut(fromCell, toCell)) {
+            return;
         }
         }
+        GameDataCenter.gridMap.sendHcMerge({ gzid1: fromCell.GetZIndex().toString(), gzid2: toCell.GetZIndex().toString() })
+
+        // if (toCell.IsEmpty()) {
+        //     //格子上没有物品
+        //     fromCell.MoveCubeToCell(toCell);
+        //     toCell.SetCube(fromCell.GetCube());
+        //     fromCell.SetCube(null);
+        // } else if (this.CanMergeItems(fromCell, toCell)) {
+        //     toCell.GetCube().PlayMergeAnim();
+        //     fromCell.ClearCube();
+        //     toCell.ClearCube();
+        //     let vec = this.TranIdxToPos(toCell.GetZIndex());
+        //     let mergeCube = this.CreateCube(vec.y, vec.x);
+        //     mergeCube.Init({
+        //         type: 3,
+        //         id: 10022,
+        //         zIndex: toCell.GetZIndex(),
+        //         unlock: 0
+        //     });
+        //     toCell.SetCube(mergeCube);
+        // } else {
+        //     this.SwitchCell(fromCell, toCell);
+        // }
     }
     }
 
 
     private TranIdxToPos(idx: number): cc.Vec2 {
     private TranIdxToPos(idx: number): cc.Vec2 {

+ 1 - 1
assets/script/shared/admin/PtlDeleteSetting.ts.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "1.1.0",
   "ver": "1.1.0",
-  "uuid": "0e4d0806-8eb3-4934-b156-470657e757c2",
+  "uuid": "0bdc6a20-12b9-44a4-9b95-84976960d2d1",
   "importer": "typescript",
   "importer": "typescript",
   "isPlugin": false,
   "isPlugin": false,
   "loadPluginInWeb": true,
   "loadPluginInWeb": true,

+ 1 - 1
assets/script/shared/admin/PtlGetSetting.ts.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "1.1.0",
   "ver": "1.1.0",
-  "uuid": "4c8f017f-47b8-45ce-9068-684639c58bd1",
+  "uuid": "0412f5a8-a580-4fc2-a5fe-c0db88d30452",
   "importer": "typescript",
   "importer": "typescript",
   "isPlugin": false,
   "isPlugin": false,
   "loadPluginInWeb": true,
   "loadPluginInWeb": true,

+ 1 - 1
assets/script/shared/admin/PtlGetVer.ts.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "1.1.0",
   "ver": "1.1.0",
-  "uuid": "0d84ba83-5cd4-4dc1-8cdd-f6214354a834",
+  "uuid": "19ba49b5-0909-4289-b7c5-ea3357b9d425",
   "importer": "typescript",
   "importer": "typescript",
   "isPlugin": false,
   "isPlugin": false,
   "loadPluginInWeb": true,
   "loadPluginInWeb": true,

+ 1 - 1
assets/script/shared/admin/PtlHuodongFind.ts.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "1.1.0",
   "ver": "1.1.0",
-  "uuid": "d1a1fff5-5753-4e61-9625-bdc2624261ef",
+  "uuid": "d19a63b9-8b8f-4c2a-ba48-15e2316a95ae",
   "importer": "typescript",
   "importer": "typescript",
   "isPlugin": false,
   "isPlugin": false,
   "loadPluginInWeb": true,
   "loadPluginInWeb": true,

+ 1 - 1
assets/script/shared/admin/PtlUpdateSetting.ts.meta

@@ -1,6 +1,6 @@
 {
 {
   "ver": "1.1.0",
   "ver": "1.1.0",
-  "uuid": "ec617965-d6d8-43ca-a3e4-651b06e67256",
+  "uuid": "c1c0d542-9e7f-43fc-8037-b358784d7917",
   "importer": "typescript",
   "importer": "typescript",
   "isPlugin": false,
   "isPlugin": false,
   "loadPluginInWeb": true,
   "loadPluginInWeb": true,