public NetCache.CardValue GetCardValue(string cardID, TAG_PREMIUM premium) { NetCache.CardValue value2; NetCache.NetCacheCardValues netObject = NetCache.Get().GetNetObject <NetCache.NetCacheCardValues>(); NetCache.CardDefinition key = new NetCache.CardDefinition { Name = cardID, Premium = premium }; if (!netObject.Values.TryGetValue(key, out value2)) { return(null); } return(value2); }
private void MissingCardDisplay(Actor actor, string cardID, TAG_PREMIUM premium) { NetCache.CardValue value2; int buy = -1; NetCache.NetCacheCardValues netObject = NetCache.Get().GetNetObject <NetCache.NetCacheCardValues>(); NetCache.CardDefinition key = new NetCache.CardDefinition { Name = cardID, Premium = premium }; if (netObject.Values.TryGetValue(key, out value2)) { buy = value2.Buy; } long balance = NetCache.Get().GetNetObject <NetCache.NetCacheArcaneDustBalance>().Balance; if (((buy > 0) && (buy <= balance)) && FixedRewardsMgr.Get().CanCraftCard(cardID, premium)) { if (!actor.isGhostCard()) { actor.GhostCardEffect(true); } } else { CollectionManagerDisplay display = CollectionManagerDisplay.Get(); if (!actor.MissingCardEffect()) { if (premium == TAG_PREMIUM.GOLDEN) { actor.OverrideAllMeshMaterials(display.GetGoldenCardNotOwnedMeshMaterial()); } else { actor.OverrideAllMeshMaterials(display.GetCardNotOwnedMeshMaterial()); } } } }