kaka před 4 roky
rodič
revize
c6b4ecd36e
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      assets/script/game/data/module/WarnTipData.ts

+ 4 - 1
assets/script/game/data/module/WarnTipData.ts

@@ -13,7 +13,10 @@ export default class WarnTipData {
 
 
     setSolution(solution) {
     setSolution(solution) {
         if (this.curSolution != solution) {
         if (this.curSolution != solution) {
-            this.curSolution = solution;
+            //除了状态0,其他状态只有级别比当前状态高才会赋值,避免异步导致低级状态覆盖高级状态
+            if (solution == 0 || this.curSolution < solution) {
+                this.curSolution = solution;
+            }
             mk.storage.setStorage('solution', this.curSolution);
             mk.storage.setStorage('solution', this.curSolution);
         }
         }