From 22fcd0d263770c8371bd03ca53f097a6ec1678f7 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期四, 24 十二月 2020 12:06:26 +0800
Subject: [PATCH] 20201224-2

---
 HDL_ON/Entity/Function/Light.cs |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/Entity/Function/Light.cs b/HDL_ON/Entity/Function/Light.cs
index f9843cb..34d5363 100644
--- a/HDL_ON/Entity/Function/Light.cs
+++ b/HDL_ON/Entity/Function/Light.cs
@@ -176,10 +176,10 @@
                 }
                 if (trait_color.curValue.ToString() == "{}")
                     trait_color.curValue = "255,255,255";
-                int.TryParse(trait_color.curValue.ToString().Split(",")[0], out redColor);
-                int.TryParse(trait_color.curValue.ToString().Split(",")[1], out greenColor);
-                int.TryParse(trait_color.curValue.ToString().Split(",")[2], out blueColor);
             }
+            int.TryParse(trait_color.curValue.ToString().Split(",")[0], out redColor);
+            int.TryParse(trait_color.curValue.ToString().Split(",")[1], out greenColor);
+            int.TryParse(trait_color.curValue.ToString().Split(",")[2], out blueColor);
 
             int recolor = redColor * 256 * 256 + greenColor * 256 + blueColor;
 
@@ -202,6 +202,7 @@
             redColor = color[0];
             greenColor = color[1];
             blueColor = color[2];
+            trait_color.curValue = redColor + "," + greenColor + "," + blueColor;
         }
 
         [Newtonsoft.Json.JsonIgnore]

--
Gitblit v1.8.0