private void RefreshEquipTarget(ConceptCardEffectsParam equipParam) { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mGroupNameField, (UnityEngine.Object)null)) { return; } this.mGroupNameField.set_text(string.Empty); if (this.mIsBaseParam) { this.mGroupNameField.set_text(LocalizedText.Get("sys.CONCEPT_CARD_STATUS_DEFAULT_TITLE")); } else { if (equipParam == null || string.IsNullOrEmpty(equipParam.statusup_skill)) { return; } SkillParam skillParam = MonoSingleton <GameManager> .Instance.MasterParam.GetSkillParam(equipParam.statusup_skill); if (skillParam == null) { return; } this.mGroupNameField.set_text(skillParam.expr + LocalizedText.Get("sys.CONCEPT_CARD_STATUS_ADDPARAM_TITLE")); } }
private bool RefreshEquipParam(ConceptCardData conceptCardData, ConceptCardEffectsParam equipParam) { if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mStatusList, (UnityEngine.Object)null)) { return(false); } if (equipParam == null) { this.mStatusList.SetValues(new BaseStatus(), new BaseStatus(), false); return(false); } BaseStatus add1 = new BaseStatus(); BaseStatus add2 = new BaseStatus(); BaseStatus scale1 = new BaseStatus(); BaseStatus scale2 = new BaseStatus(); ConceptCardParam.GetSkillStatus(equipParam.statusup_skill, (int)conceptCardData.LvCap, (int)conceptCardData.Lv, ref add1, ref scale1); if (this.mIsEnhance) { int levelCap = Mathf.Min((int)conceptCardData.LvCap, (int)conceptCardData.CurrentLvCap + this.mAddAwakeLv); int totalExp = (int)conceptCardData.Exp + this.mAddExp; int lv = MonoSingleton <GameManager> .Instance.MasterParam.CalcConceptCardLevel((int)conceptCardData.Rarity, totalExp, levelCap); ConceptCardParam.GetSkillStatus(equipParam.statusup_skill, (int)conceptCardData.LvCap, lv, ref add2, ref scale2); this.mStatusList.SetValuesAfterOnly(add1, scale1, add2, scale2, false, true); } else { this.mStatusList.SetValues(add1, scale1, false); } return(this.IsValueEmpty(add1, scale1)); }
public void SetParam(ConceptCardData conceptCardData, ConceptCardEffectsParam conceptCardEffectsParam, int addExp, int addAwakeLv, bool isEnhance, bool isBaseParam) { this.mConceptCardData = conceptCardData; this.mConceptCardEffectsParam = conceptCardEffectsParam; this.mAddExp = addExp; this.mAddAwakeLv = addAwakeLv; this.mIsEnhance = isEnhance; this.mIsBaseParam = isBaseParam; }
public void Setup(ConceptCardEffectsParam param, int lv, int lvcap, int awake_count, int awake_count_cap) { this.mEffectParam = param; this.mConditionsIname = param.cnds_iname; this.is_levelmax = lv >= lvcap; if (!string.IsNullOrEmpty(param.card_skill)) { this.mCardSkill = new SkillData(); this.mCardSkill.Setup(param.card_skill, lv, lvcap, (MasterParam)null); } if (!string.IsNullOrEmpty(param.add_card_skill_buff_awake) && awake_count > 0) { BuffEffectParam buffEffectParam = MonoSingleton <GameManager> .Instance.MasterParam.GetBuffEffectParam(param.add_card_skill_buff_awake); if (buffEffectParam != null) { this.mAddCardSkillBuffEffectAwake = BuffEffect.CreateBuffEffect(buffEffectParam, awake_count, awake_count_cap); } } if (!string.IsNullOrEmpty(param.add_card_skill_buff_lvmax) && lv >= lvcap && awake_count > 0) { BuffEffectParam buffEffectParam = MonoSingleton <GameManager> .Instance.MasterParam.GetBuffEffectParam(param.add_card_skill_buff_lvmax); if (buffEffectParam != null) { this.mAddCardSkillBuffEffectLvMax = BuffEffect.CreateBuffEffect(buffEffectParam, 1, 1); } } if (!string.IsNullOrEmpty(param.statusup_skill)) { this.mEquipSkill = new SkillData(); this.mEquipSkill.Setup(param.statusup_skill, lv, lvcap, (MasterParam)null); } if (!string.IsNullOrEmpty(param.skin)) { this.mSkin = param.skin; } if (!string.IsNullOrEmpty(param.abil_iname) && MonoSingleton <GameManager> .Instance.GetAbilityParam(param.abil_iname) != null) { this.mAbilityDefault = new AbilityData(); this.mAbilityDefault.Setup((UnitData)null, 0L, param.abil_iname, lv - 1, lvcap); this.mAbilityDefault.IsNoneCategory = true; this.mAbilityDefault.IsHideList = false; } if (string.IsNullOrEmpty(param.abil_iname) || string.IsNullOrEmpty(param.abil_iname_lvmax) || MonoSingleton <GameManager> .Instance.GetAbilityParam(param.abil_iname_lvmax) == null) { return; } this.mAbilityLvMax = new AbilityData(); this.mAbilityLvMax.Setup((UnitData)null, 0L, param.abil_iname_lvmax, lv - 1, lvcap); this.mAbilityLvMax.IsNoneCategory = true; this.mAbilityLvMax.IsHideList = false; }
public bool Deserialize(JSON_ConceptCardParam json, MasterParam master = null) { this.iname = json.iname; this.name = json.name; this.expr = json.expr; this.type = (eCardType)json.type; this.icon = json.icon; this.rare = json.rare; this.sell = json.sell; this.en_cost = json.en_cost; this.en_exp = json.en_exp; this.en_trust = json.en_trust; this.trust_reward = json.trust_reward; this.first_get_unit = json.first_get_unit; this.is_override_lvcap = true; this.lvcap = json.lvcap; if (json.lvcap <= 0) { this.is_override_lvcap = false; RarityParam rarityParam = MonoSingleton <GameManager> .Instance.MasterParam.GetRarityParam(this.rare); if (rarityParam != null) { this.lvcap = (int)rarityParam.ConceptCardLvCap; } } if (json.effects != null) { this.effects = new ConceptCardEffectsParam[json.effects.Length]; for (int index = 0; index < json.effects.Length; ++index) { ConceptCardEffectsParam cardEffectsParam = new ConceptCardEffectsParam(); if (!cardEffectsParam.Deserialize(json.effects[index])) { return(false); } this.effects[index] = cardEffectsParam; } } this.not_sale = json.not_sale == 1; return(true); }
private ConceptCardEffectsParam GetBaseEffectParam() { ConceptCardEffectsParam[] effects = this.mConceptCardData.Param.effects; if (effects == null || 0 >= effects.Length) { return((ConceptCardEffectsParam)null); } ConceptCardEffectsParam cardEffectsParam1 = (ConceptCardEffectsParam)null; foreach (ConceptCardEffectsParam cardEffectsParam2 in effects) { if (cardEffectsParam2 != null && string.IsNullOrEmpty(cardEffectsParam2.cnds_iname) && !string.IsNullOrEmpty(cardEffectsParam2.statusup_skill)) { if (cardEffectsParam1 != null) { DebugUtility.LogError("基準パラメータが2つ以上設定されています"); } cardEffectsParam1 = cardEffectsParam2; } } return(cardEffectsParam1); }
private void RefreshResult(GachaDropData[] _drops, GameObject _block, int _block_type, bool _is_anim = false) { if (_drops == null || _drops.Length < 0 || UnityEngine.Object.op_Equality((UnityEngine.Object)_block, (UnityEngine.Object)null)) { return; } _block.SetActive(true); int length = _drops.Length; SerializeValueBehaviour component1 = (SerializeValueBehaviour)_block.GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null)) { GameObject gameObject1 = component1.list.GetGameObject("icon"); gameObject1.SetActive(false); for (int index1 = 0; index1 < length; ++index1) { GachaDropData drop = _drops[index1]; int num = index1; GachaResultThumbnailWindow.GachaResultType gachaResultType = GachaResultThumbnailWindow.GachaResultType.None; if (drop != null) { GameObject gameObject2 = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)gameObject1); gameObject2.get_transform().SetParent(gameObject1.get_transform().get_parent(), false); ((Behaviour)gameObject2.GetComponent <Animator>()).set_enabled(_is_anim); SerializeValueBehaviour component2 = (SerializeValueBehaviour)gameObject2.GetComponent <SerializeValueBehaviour>(); if (!UnityEngine.Object.op_Equality((UnityEngine.Object)component2, (UnityEngine.Object)null)) { GameObject gameObject3 = (GameObject)null; if (drop.type == GachaDropData.Type.Unit) { gameObject3 = component2.list.GetGameObject("unit"); DataSource.Bind <UnitData>(gameObject3, this.CreateUnitData(drop.unit)); gachaResultType = GachaResultThumbnailWindow.GachaResultType.Unit; } else if (drop.type == GachaDropData.Type.Item) { gameObject3 = component2.list.GetGameObject("item"); DataSource.Bind <ItemData>(gameObject3, this.CreateItemData(drop.item, drop.num)); ItemIcon component3 = (ItemIcon)gameObject3.GetComponent <ItemIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component3, (UnityEngine.Object)null)) { component3.UpdateValue(); } gachaResultType = !string.IsNullOrEmpty(drop.item.Flavor) ? GachaResultThumbnailWindow.GachaResultType.Item : GachaResultThumbnailWindow.GachaResultType.Piece; } else if (drop.type == GachaDropData.Type.Artifact) { gameObject3 = component2.list.GetGameObject("artifact"); DataSource.Bind <ArtifactData>(gameObject3, this.CreateArtifactData(drop.artifact, drop.Rare)); gachaResultType = GachaResultThumbnailWindow.GachaResultType.Artifact; } else if (drop.type == GachaDropData.Type.ConceptCard) { gameObject3 = component2.list.GetGameObject("conceptcard"); ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(drop.conceptcard.iname); ConceptCardIcon component3 = (ConceptCardIcon)gameObject3.GetComponent <ConceptCardIcon>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component3, (UnityEngine.Object)null)) { component3.Setup(cardDataForDisplay); SerializeValueBehaviour component4 = (SerializeValueBehaviour)gameObject3.GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component4, (UnityEngine.Object)null)) { GameObject gameObject4 = component4.list.GetGameObject("unit_icon"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject4, (UnityEngine.Object)null)) { UnitData data = (UnitData)null; if (drop.cardunit != null) { data = this.CreateUnitData(drop.cardunit); } DataSource.Bind <UnitData>(gameObject4, data); gameObject4.SetActive(drop.cardunit != null); } GameObject gameObject5 = component4.list.GetGameObject("skin"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject5, (UnityEngine.Object)null)) { bool flag = false; if (drop.conceptcard.effects != null && drop.conceptcard.effects.Length > 0) { for (int index2 = 0; index2 < drop.conceptcard.effects.Length; ++index2) { ConceptCardEffectsParam effect = drop.conceptcard.effects[index2]; if (effect != null && !string.IsNullOrEmpty(effect.skin)) { flag = true; break; } } } gameObject5.SetActive(flag); } } } gachaResultType = GachaResultThumbnailWindow.GachaResultType.ConceptCard; } if (UnityEngine.Object.op_Equality((UnityEngine.Object)gameObject3, (UnityEngine.Object)null)) { DebugUtility.LogError("アイコンオブジェクトがありません"); break; } SerializeValueBehaviour component5 = (SerializeValueBehaviour)gameObject3.GetComponent <SerializeValueBehaviour>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component5, (UnityEngine.Object)null)) { GameObject gameObject4 = component5.list.GetGameObject("new"); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component5, (UnityEngine.Object)null)) { gameObject4.SetActive(drop.isNew); } } ButtonEvent component6 = (ButtonEvent)gameObject3.GetComponent <ButtonEvent>(); if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component6, (UnityEngine.Object)null)) { ButtonEvent.Event @event = component6.GetEvent("CLICK_ICON"); if (@event != null) { @event.valueList.SetField("index", num); @event.valueList.SetField("type", (int)gachaResultType); @event.valueList.SetField("block", _block_type); if (gachaResultType == GachaResultThumbnailWindow.GachaResultType.ConceptCard) { @event.valueList.SetField("is_first_get_unit", drop.cardunit != null); } } } gameObject3.SetActive(true); this.m_ResultIconRootList.Add(gameObject2); if (_block_type == 0) { this.m_ResultIconRootList.Add(gameObject2); } } else { break; } } } } SerializeValueBehaviour component7 = (SerializeValueBehaviour)((Component)this).get_gameObject().GetComponent <SerializeValueBehaviour>(); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component7, (UnityEngine.Object)null)) { return; } GameObject gameObject = component7.list.GetGameObject("space"); if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null)) { return; } gameObject.get_transform().SetAsLastSibling(); gameObject.SetActive(length > GachaResultThumbnailWindow.VIEW_COUNT); }