功能批量实现 优化 服务端 新浮动小游戏框架 新界面UI
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using UnityEngine;
|
||||
|
||||
public sealed class ExpBottleLedger : MonoBehaviour
|
||||
@@ -219,8 +218,6 @@ public sealed class ExpBottleLedger : MonoBehaviour
|
||||
|
||||
InitializeIfNeeded();
|
||||
bool changed = false;
|
||||
var flags = BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public;
|
||||
var type = typeof(Player_SO);
|
||||
|
||||
for (int i = 0; i < ExpBottleCatalog.All.Count; i++)
|
||||
{
|
||||
@@ -229,14 +226,7 @@ public sealed class ExpBottleLedger : MonoBehaviour
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var field = type.GetField(descriptor.LegacyPlayerFieldName, flags);
|
||||
if (field == null || field.FieldType != typeof(int))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var legacyValue = Mathf.Max(0, (int)field.GetValue(playerData));
|
||||
var legacyValue = Mathf.Max(0, playerData.GetLegacyExpBottleCount(descriptor.LegacyPlayerFieldName));
|
||||
var currentValue = GetCountByKey(descriptor.Key);
|
||||
if (!overwriteExistingCounts && currentValue > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user