2 次代碼提交 0a0b2ee58f ... b553227b83

作者 SHA1 備註 提交日期
  wujia b553227b83 Merge branch 'master' of http://118.178.135.110:3000/fish/tower_client 6 月之前
  wujia 7f56c3ae49 ## 6 月之前
共有 2 個文件被更改,包括 16 次插入1 次删除
  1. 1 1
      assets/script/game/data/RoleData.ts
  2. 15 0
      assets/script/game/manager/RoleManager.ts

+ 1 - 1
assets/script/game/data/RoleData.ts

@@ -77,7 +77,7 @@ class Data {
 
     }
 
-    set fate(data: { [key: string]: number }) {
+    set fate(data: { [key: string]: {} }) {
 
     }
 

+ 15 - 0
assets/script/game/manager/RoleManager.ts

@@ -1,5 +1,7 @@
 import { Framework } from "../../framework/Framework";
 import { LoginMgr } from "../common/LoginManager";
+import { FateattridConf } from "../config/FateattridConf";
+import { FateConf } from "../config/FateConf";
 import { RoleData } from "../data/RoleData";
 import { RoleConf } from "../ui/tower/conf/RoleConf";
 import { GoodsManager } from "./GoodsManager";
@@ -62,4 +64,17 @@ export class RoleManager {
         }
         return roles;
     }
+
+    static setFateData(data: { [key: string]: number }) {
+        let fateData = {};
+        let conf = FateConf.data;
+        let atteConf = FateattridConf.data;
+        for (const key in data) {
+            if (Object.prototype.hasOwnProperty.call(data, key)) {
+                const element = data[key];
+                fateData[key] = element;
+            }
+        }
+        RoleData.fate = fateData;
+    }
 }