Ver Fonte

修改bug

lzx há 1 dia atrás
pai
commit
4a26cfd935

+ 9 - 1
Assets/Scripts/GameUI/UI/DaoYouPanel/DaoYouInfoPanel.cs

@@ -134,14 +134,22 @@ namespace Fort23.Mono
                 {
                     PlayerManager.Instance.BagController.DeductItem(daoyouGiftConfig.ItemID, count);
 
+
                     emotionConfig emotionConfig = ConfigComponent.Instance.Get<emotionConfig>(daoYouData.emotion);
 
+                    if (_daoyouModelConfig.PreferGiftID.Contains(daoyouGiftConfig.ItemID) && !daoYouData.loveIds.Contains(daoyouGiftConfig.ItemID))
+                    {
+                        daoYouData.loveIds.Add(daoyouGiftConfig.ItemID);
+                    }
+                    //加经验
                     for (int i = 0; i < count; i++)
                     {
                         int bl = Random.Range(emotionConfig.hanganUpRate[0], emotionConfig.hanganUpRate[1] + 1);
                         daoYouData.exp += (int)(daoyouGiftConfig.emotionValue * bl * 0.001f);
                     }
 
+           
+
 
                     DaoyouLevelupConfig[] configs = ConfigComponent.Instance.GetAll<DaoyouLevelupConfig>();
 
@@ -171,7 +179,7 @@ namespace Fort23.Mono
                     int emotionId = 4 - (int)(daoYouData.emotionValue / (100 / (float)3));
                     if (emotionId > 3)
                         emotionId = 3;
-                   
+
                     daoYouData.emotion = emotionId;
                     emotionConfig emotionConfig = ConfigComponent.Instance.Get<emotionConfig>(daoYouData.emotion);
                     Text_message.text = LanguageManager.Instance.Text(emotionConfig.des);

BIN
Excel2Json/Excel/DaoyouConfig.xlsx