|
@@ -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);
|