wujia 6 月之前
父节点
当前提交
7f56c3ae49
共有 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

@@ -76,7 +76,7 @@ class Data {
         // return this._fightRole;
     }
 
-    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;
+    }
 }