wujia преди 6 месеца
родител
ревизия
5297358976

+ 8 - 1
assets/script/game/common/LoginManager.ts

@@ -13,6 +13,7 @@ import { TimeUtil } from "../../framework/util/TimeUtil";
 import { MailData } from "../data/MailData";
 import { RoleData } from "../data/RoleData";
 import { AccountData } from "../data/AccountData";
+import { GoodsData } from "../data/GoodsData";
 
 
 const Macro = {
@@ -186,7 +187,13 @@ export class LoginManager {
             if (data.get_mails) {
                 MailData.setData(data.get_mails)
             }
-            
+
+            if (data.inverntory) {
+                if (data.inverntory.material) {
+                    GoodsData.setAllGoods(data.inverntory.material)
+                }
+            }
+
             let min = Number(this._server_url.indexOf('//'))
             let max = this._server_url.lastIndexOf(':')
             let server = this._server_url.substring(min, max)

+ 1038 - 0
assets/script/game/config/MaterialConf.ts

@@ -0,0 +1,1038 @@
+export namespace MaterialConf {
+    export const data = {
+        "1": {
+                "Id": 1,
+                "Name": 4100001,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_3.png",
+                "Desc": 4200003,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "2;6;21;27"
+        },
+        "2": {
+                "Id": 2,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_3.png",
+                "Desc": 4200003,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "2;6;21;27"
+        },
+        "50": {
+                "Id": 50,
+                "Name": 4100043,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 4,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_40.png",
+                "Desc": 4200043,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "openxp",
+                "UseEffect": 10,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": 0
+        },
+        "51": {
+                "Id": 51,
+                "Name": 4100044,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 2,
+                "Color": 2,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_44.png",
+                "Desc": 4200044,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "opengold",
+                "UseEffect": 1,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": 0
+        },
+        "52": {
+                "Id": 52,
+                "Name": 4100006,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_6.png",
+                "Desc": 4200006,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "role",
+                "UseEffect": 4,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "11;8;6;4;5"
+        },
+        "53": {
+                "Id": 53,
+                "Name": 4100051,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_51.png",
+                "Desc": 4200051,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "role",
+                "UseEffect": 4,
+                "UseEffect2": 1,
+                "MergeNum": 50,
+                "Road": 0
+        },
+        "101": {
+                "Id": 101,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "102": {
+                "Id": 102,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "103": {
+                "Id": 103,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "104": {
+                "Id": 104,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "105": {
+                "Id": 105,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "106": {
+                "Id": 106,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "107": {
+                "Id": 107,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "108": {
+                "Id": 108,
+                "Name": 4100002,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 5,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_2.png",
+                "Desc": 4200002,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 0,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;9;22;19;4"
+        },
+        "111": {
+                "Id": 111,
+                "Name": 4100001,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_1.png",
+                "Desc": 4200001,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;10;4;6;2"
+        },
+        "112": {
+                "Id": 112,
+                "Name": 4100001,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_1.png",
+                "Desc": 4200001,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;10;4;6;2"
+        },
+        "113": {
+                "Id": 113,
+                "Name": 4100001,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_1.png",
+                "Desc": 4200001,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;10;4;6;2"
+        },
+        "114": {
+                "Id": 114,
+                "Name": 4100001,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_1.png",
+                "Desc": 4200001,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;10;4;6;2"
+        },
+        "121": {
+                "Id": 121,
+                "Name": 4100051,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 4,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_7.png",
+                "Desc": 4200007,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;19"
+        },
+        "122": {
+                "Id": 122,
+                "Name": 4100052,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 4,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_7.png",
+                "Desc": 4200007,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;19"
+        },
+        "123": {
+                "Id": 123,
+                "Name": 4100053,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 4,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_7.png",
+                "Desc": 4200007,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;19"
+        },
+        "124": {
+                "Id": 124,
+                "Name": 4100054,
+                "Type": 1,
+                "Category": "other",
+                "Quality": 3,
+                "Color": 4,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_7.png",
+                "Desc": 4200007,
+                "MaxStoreLimit": 0,
+                "Useable": 0,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": 0,
+                "UseEffect": 0,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": "11;19"
+        },
+        "2000": {
+                "Id": 2000,
+                "Name": 4102000,
+                "Type": 3,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 20,
+                "Buyable": 1,
+                "Url": "item/item_ssr.png",
+                "Desc": 4202000,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "boxchoice",
+                "UseEffect": 2000,
+                "UseEffect2": 0,
+                "MergeNum": 0,
+                "Road": 0
+        },
+        "5101": {
+                "Id": 5101,
+                "Name": 3111100,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 2,
+                "Color": 2,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_111.png",
+                "Desc": 4205111,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 111,
+                "UseEffect2": 0,
+                "MergeNum": 30,
+                "Road": "1;11"
+        },
+        "5102": {
+                "Id": 5102,
+                "Name": 3112000,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_120.png",
+                "Desc": 4205120,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 120,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5103": {
+                "Id": 5103,
+                "Name": 3112100,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_121.png",
+                "Desc": 4205121,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 121,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5104": {
+                "Id": 5104,
+                "Name": 3112200,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_122.png",
+                "Desc": 4205122,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 122,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5105": {
+                "Id": 5105,
+                "Name": 3112300,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_123.png",
+                "Desc": 4205123,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 123,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5106": {
+                "Id": 5106,
+                "Name": 3112400,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_124.png",
+                "Desc": 4205124,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 124,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5201": {
+                "Id": 5201,
+                "Name": 3112500,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_125.png",
+                "Desc": 4205125,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 125,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5202": {
+                "Id": 5202,
+                "Name": 3112600,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_126.png",
+                "Desc": 4205126,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 126,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5203": {
+                "Id": 5203,
+                "Name": 3112700,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_127.png",
+                "Desc": 4205127,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 127,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5204": {
+                "Id": 5204,
+                "Name": 3112800,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_128.png",
+                "Desc": 4205128,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 128,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5205": {
+                "Id": 5205,
+                "Name": 3112900,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_129.png",
+                "Desc": 4205129,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 129,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5206": {
+                "Id": 5206,
+                "Name": 3113000,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_130.png",
+                "Desc": 4205130,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 130,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5301": {
+                "Id": 5301,
+                "Name": 3113100,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_131.png",
+                "Desc": 4205131,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 131,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5302": {
+                "Id": 5302,
+                "Name": 3113200,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_132.png",
+                "Desc": 4205132,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 132,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5303": {
+                "Id": 5303,
+                "Name": 3122000,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_220.png",
+                "Desc": 4205220,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 220,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5304": {
+                "Id": 5304,
+                "Name": 3122100,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_221.png",
+                "Desc": 4205221,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 221,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5305": {
+                "Id": 5305,
+                "Name": 3122200,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_222.png",
+                "Desc": 4205222,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 222,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5306": {
+                "Id": 5306,
+                "Name": 3122300,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_223.png",
+                "Desc": 4205223,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 223,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5401": {
+                "Id": 5401,
+                "Name": 3122400,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_224.png",
+                "Desc": 4205224,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 224,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5402": {
+                "Id": 5402,
+                "Name": 3122500,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_225.png",
+                "Desc": 4205225,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 225,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5403": {
+                "Id": 5403,
+                "Name": 3122600,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_226.png",
+                "Desc": 4205226,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 226,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5404": {
+                "Id": 5404,
+                "Name": 3122700,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_227.png",
+                "Desc": 4205227,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 227,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5405": {
+                "Id": 5405,
+                "Name": 3122800,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_228.png",
+                "Desc": 4205228,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 228,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        },
+        "5406": {
+                "Id": 5406,
+                "Name": 3122900,
+                "Type": 2,
+                "Category": "other",
+                "Quality": 4,
+                "Color": 6,
+                "SellType": "gold",
+                "Sell": 10000,
+                "Buyable": 1,
+                "Url": "hero/head_229.png",
+                "Desc": 4205229,
+                "MaxStoreLimit": 0,
+                "Useable": 1,
+                "Sellable": 0,
+                "Showable": 1,
+                "UseType": "mergerole",
+                "UseEffect": 229,
+                "UseEffect2": 0,
+                "MergeNum": 50,
+                "Road": "1;11"
+        }
+    };
+}

+ 9 - 0
assets/script/game/config/MaterialConf.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "7b776eb3-3a7d-4097-9989-71dd9a5ec693",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 44 - 0
assets/script/game/config/UserConf.ts

@@ -0,0 +1,44 @@
+export namespace UserConf {
+    export const data = {
+        "gold": {
+                "Id": "gold",
+                "Name": 4100501,
+                "GmName": "金币",
+                "Quantity": 4,
+                "Desc": 4200501,
+                "Road": "11;2;6;7;19"
+        },
+        "cash": {
+                "Id": "cash",
+                "Name": 4100502,
+                "GmName": "钻石",
+                "Quantity": 4,
+                "Desc": 4200502,
+                "Road": "5;6;11;3;4;22;21;27"
+        },
+        "xp": {
+                "Id": "xp",
+                "Name": 4100508,
+                "GmName": "账号经验",
+                "Quantity": 4,
+                "Desc": 4200508,
+                "Road": "5;11;22"
+        },
+        "vip_xp": {
+                "Id": "vip_xp",
+                "Name": 4100509,
+                "GmName": "Vip经验",
+                "Quantity": 4,
+                "Desc": 4200509,
+                "Road": 0
+        },
+        "diamond": {
+                "Id": "diamond",
+                "Name": 4100511,
+                "GmName": "交易币",
+                "Quantity": 6,
+                "Desc": 4200511,
+                "Road": "26;27"
+        }
+    };
+}

+ 9 - 0
assets/script/game/config/UserConf.ts.meta

@@ -0,0 +1,9 @@
+{
+  "ver": "4.0.24",
+  "importer": "typescript",
+  "imported": true,
+  "uuid": "aa4a592a-93cb-4e68-b0b1-8a536bb3d9ea",
+  "files": [],
+  "subMetas": {},
+  "userData": {}
+}

+ 1 - 0
assets/script/game/data/GameEvent.ts

@@ -14,6 +14,7 @@ let event = {
 	MailUpdate: "MailUpdate",											//邮件操作更新
 
 	SelectServer: "SelectServer",										//服务器选择
+	MaterialChange: "MaterialChange",									//材料變化
 }
 
 export let GameEvent = event;

+ 89 - 10
assets/script/game/data/GoodsData.ts

@@ -1,9 +1,12 @@
+import { Framework } from "../../framework/Framework";
 import { ItemEnum } from "../common/InterfaceAddEnum";
+import { MaterialConf } from "../config/MaterialConf";
+import { GameEvent } from "./GameEvent";
 
 interface BaseItem {
     conf: {};
-    id: number;
-    count: string;
+    id: string;
+    count: number;
     type: ItemEnum;
 }
 
@@ -23,29 +26,105 @@ class Data {
         this.reset();
     }
 
-    setAllGoods() {
-
+    setAllGoods(data) {
+        this._goodsData = {};
+        let conf = MaterialConf.data;
+        for (const key in data) {
+            if (Object.prototype.hasOwnProperty.call(data, key)) {
+                const element = data[key];
+                let mConf = conf[key];
+                if (mConf) {
+                    let item = {
+                        id: key,
+                        count: Number(element),
+                        type: ItemEnum.material,
+                        conf: mConf,
+                    }
+                    this._goodsData[key] = item;
+                }
+            }
+        }
     }
 
     getAllGoods() {
-
+        return this._goodsData;
     }
 
     getBagGoods() {
-
+        let bagList = [];
+        for (const key in this._goodsData) {
+            if (Object.prototype.hasOwnProperty.call(this._goodsData, key)) {
+                const element = this._goodsData[key];
+                if (element.count > 0 && Number(element.conf['Showable'] == 1)) {
+                    bagList.push(element);
+                }
+            }
+        }
+        bagList.sort((a, b) => {
+            return Number(a.id) > Number(b.id) ? -1 : 1;
+        });
+        return bagList;
     }
 
     getGoodsById(id: string) {
-
+        if (this._goodsData[id]) {
+            return this._goodsData[id];
+        } else {
+            let mConf = MaterialConf.data[id];
+            if (mConf) {
+                let item = {
+                    id: id,
+                    count: 0,
+                    type: ItemEnum.material,
+                    conf: mConf,
+                }
+                return item;
+            }
+        }
+        return null;
     }
 
     addGoodsById(id: string, num: number) {
-
+        let mConf = MaterialConf.data[id];
+        if (mConf) {
+            if (this._goodsData[id]) {
+                let sumCount = this._goodsData[id].count + num;
+                if (mConf.MaxStoreLimit) {
+                    if (sumCount > mConf.MaxStoreLimit) {
+                        this._goodsData[id].count = mConf.MaxStoreLimit
+                    } else {
+                        this._goodsData[id].count = sumCount
+                    }
+                } else {
+                    this._goodsData[id].count = sumCount
+                }
+            } else {
+                let item = {
+                    id: id,
+                    count: num,
+                    type: ItemEnum.material,
+                    conf: mConf,
+                }
+                this._goodsData[id] = item;
+            }
+            Framework.event.fireEvent(GameEvent.MaterialChange, id);
+            //後期可能有紅點邏輯
+        }
     }
 
     getGoodsLocalInfo(id: string, num: number) {
-
+        let mConf = MaterialConf.data[id];
+        if (mConf) {
+            let item = {
+                id: id,
+                count: 0,
+                type: num,
+                conf: mConf,
+            }
+            return item;
+        }
+        return null;
     }
 }
 
-export let MailData = new Data;
+export let GoodsData = new Data;

+ 17 - 0
assets/script/game/ui/tower/TowerUI.ts

@@ -995,4 +995,21 @@ export class TowerUI extends BaseView {
 		let valueOld = this.damageCountData.get(typeID) || 0
 		this.damageCountData.set(typeID,value+valueOld)
 	}
+
+	private onTouchButton(event: Event, customStr) {
+		let target: any = event.target;
+		if (target.name == 'addHero-001') {
+			
+
+		}else if (target.name == 'addHero-002') {
+			
+
+		}else if (target.name == 'addHero-003') {
+			
+
+		}else if (target.name == 'addHero-004') {
+			
+
+		}
+	}
 }