// Token: 0x06001403 RID: 5123 RVA: 0x00073BD0 File Offset: 0x00071DD0 public bool AddDefaultItem(BaseUberStrikeItemView itemView) { if (itemView != null) { if (itemView.ItemClass == UberstrikeItemClass.FunctionalGeneral) { IUnityItem unityItem; if (this._shopItemsById.TryGetValue(itemView.ID, out unityItem)) { ItemConfigurationUtil.CopyProperties <BaseUberStrikeItemView>(unityItem.View, itemView); } } else if (string.IsNullOrEmpty(itemView.PrefabName)) { Debug.LogWarning("Missing PrefabName for item: " + itemView.Name); } else { Debug.LogError(string.Concat(new string[] { "Missing UnityItem for: '", itemView.Name, "' with PrefabName: '", itemView.PrefabName, "'" })); } } return(false); }
// Token: 0x06000FE1 RID: 4065 RVA: 0x000658C8 File Offset: 0x00063AC8 public static void CopyCustomProperties(BaseUberStrikeItemView src, object dst) { foreach (FieldInfo fieldInfo in ItemConfigurationUtil.GetAllFields(dst.GetType())) { string customPropertyName = ItemConfigurationUtil.GetCustomPropertyName(fieldInfo); if (!string.IsNullOrEmpty(customPropertyName) && src.CustomProperties != null && src.CustomProperties.ContainsKey(customPropertyName)) { object value = ItemConfigurationUtil.Convert(src.CustomProperties[customPropertyName], fieldInfo.FieldType); fieldInfo.SetValue(dst, value); } } }
// Token: 0x06000FE0 RID: 4064 RVA: 0x0006580C File Offset: 0x00063A0C public static void CopyProperties <T>(T config, BaseUberStrikeItemView item) where T : BaseUberStrikeItemView { CloneUtil.CopyAllFields <BaseUberStrikeItemView>(config, item); foreach (FieldInfo fieldInfo in ItemConfigurationUtil.GetAllFields(config.GetType())) { string customPropertyName = ItemConfigurationUtil.GetCustomPropertyName(fieldInfo); if (!string.IsNullOrEmpty(customPropertyName) && item.CustomProperties != null && item.CustomProperties.ContainsKey(customPropertyName)) { fieldInfo.SetValue(config, ItemConfigurationUtil.Convert(item.CustomProperties[customPropertyName], fieldInfo.FieldType)); } } }
// Token: 0x060010B6 RID: 4278 RVA: 0x00067000 File Offset: 0x00065200 public DefaultItem(BaseUberStrikeItemView view) { this.View = view; switch (view.ItemType) { case UberstrikeItemType.Weapon: this._prefab = Singleton <ItemManager> .Instance.GetDefaultWeaponItem(view.ItemClass); break; case UberstrikeItemType.Gear: this._prefab = Singleton <ItemManager> .Instance.GetDefaultGearItem(view.ItemClass); break; } this._icon = UnityItemConfiguration.Instance.GetDefaultIcon(view.ItemClass); }
// Token: 0x060010C4 RID: 4292 RVA: 0x0006721C File Offset: 0x0006541C public ProxyItem(BaseUberStrikeItemView view) { this.View = view; if (UnityItemConfiguration.Instance.IsPrefabAvailable(this.View.PrefabName)) { string text = UnityItemConfiguration.Instance.GetPrefabPath(view.PrefabName); text += "-Icon"; this.m_Icon = Resources.Load <Texture2D>(text); } else if (this.View.ItemClass == UberstrikeItemClass.FunctionalGeneral) { this.m_Icon = UnityItemConfiguration.Instance.GetFunctionalItemIcon(this.View.ID); } else { this.m_Icon = UnityItemConfiguration.Instance.GetDefaultIcon(view.ItemClass); } }
// Token: 0x060010CE RID: 4302 RVA: 0x0000BAE2 File Offset: 0x00009CE2 public void UpdateProxyItem(BaseUberStrikeItemView view) { this.View = view; }
// Token: 0x06001014 RID: 4116 RVA: 0x0000B452 File Offset: 0x00009652 public FunctionalItem(BaseUberStrikeItemView view) { this.View = view; this._icon = UnityItemConfiguration.Instance.GetFunctionalItemIcon(view.ID); }