private List <GameWebAPI.RespDataMA_ChipEffectM.ChipEffect> GetAddChipParamEffects(GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipInvocationEffects) { List <GameWebAPI.RespDataMA_ChipEffectM.ChipEffect> list = new List <GameWebAPI.RespDataMA_ChipEffectM.ChipEffect>(); foreach (GameWebAPI.RespDataMA_ChipEffectM.ChipEffect chipEffect in chipInvocationEffects) { int num = chipEffect.chipEffectId.ToInt32(); bool flag = true; if (!this.potencyChipIdList.ContainsKey(num)) { if (this.chipEffectCount.ContainsKey(num)) { if (this.chipEffectCount[num] <= 0) { goto IL_3A8; } Dictionary <int, int> dictionary; int key; (dictionary = this.chipEffectCount)[key = num] = dictionary[key] - 1; } if (chipEffect.effectType.ToInt32() == 57) { int value; if (chipEffect.effectSubType.ToInt32() == 1) { value = chipEffect.effectValue.ToInt32(); } else if (chipEffect.effectSubType.ToInt32() == 2) { value = chipEffect.effectValue.ToInt32(); } else if (chipEffect.effectSubType.ToInt32() == 3) { value = (int)((float)this.characterStateControl.extraMaxHp * chipEffect.effectValue.ToFloat()); } else { value = chipEffect.effectValue.ToInt32(); } int hp = Mathf.Clamp(value, 1, this.characterStateControl.extraMaxHp); this.gutsData = new CharacterStateControlChip.GutsData(chipEffect.chipId, chipEffect.chipEffectId, hp); flag = false; } if (chipEffect.effectType.ToInt32() == 61) { bool flag2 = false; if (chipEffect.effectTrigger.ToInt32() == 31 || chipEffect.effectTrigger.ToInt32() == 32 || chipEffect.effectTrigger.ToInt32() == 33 || chipEffect.effectTrigger.ToInt32() == 34 || chipEffect.effectTrigger.ToInt32() == 35 || chipEffect.effectTrigger.ToInt32() == 36) { flag2 = true; } BattleServerControl serverControl = BattleStateManager.current.serverControl; List <AffectEffectProperty> affectEffectPropertyList = serverControl.GetAffectEffectPropertyList(chipEffect.effectValue); if (affectEffectPropertyList != null) { foreach (AffectEffectProperty affectEffectProperty in affectEffectPropertyList) { if (flag2) { EffectStatusBase.EffectTriggerType key2 = (EffectStatusBase.EffectTriggerType)chipEffect.effectTrigger.ToInt32(); if (!this.characterStateControl.everySkillList.ContainsKey(key2)) { this.characterStateControl.everySkillList.Add(key2, new List <AffectEffectProperty>()); } this.characterStateControl.everySkillList[key2].Add(affectEffectProperty); } else { this.characterStateControl.currentSkillStatus.AddAffectEffect(affectEffectProperty); } } } flag = false; } if (chipEffect.effectType.ToInt32() == 70 || chipEffect.effectType.ToInt32() == 72 || chipEffect.effectType.ToInt32() == 71 || chipEffect.effectType.ToInt32() == 73 || chipEffect.effectType.ToInt32() == 74) { this.isServerAddValue = true; } list.Add(chipEffect); if (chipEffect.effectType.ToInt32() != 57 && chipEffect.effectType.ToInt32() != 60 && chipEffect.effectType.ToInt32() != 61 && chipEffect.effectType.ToInt32() != 56 && !this.potencyChipIdList.ContainsKey(num)) { this.potencyChipIdList.Add(num, chipEffect.targetType.ToInt32()); } if (flag && !this.stagingChipIdList.ContainsKey(num)) { this.stagingChipIdList.Add(num, chipEffect.chipId.ToInt32()); } } IL_3A8 :; } return(list); }
public static void GetExtraEffectFluctuationValue(out int result, out int change, MonsterData monsterData, GameWebAPI.RespDataMA_GetWorldDungeonExtraEffectM.WorldDungeonExtraEffectM[] effectArray, EffectStatusBase.ExtraEffectType extraEffectType, int skillType = 0, bool isChipValue = true) { int num = (int)ExtraEffectUtil.GetStatusValue(extraEffectType, monsterData, skillType); int num2 = 0; if (isChipValue) { num2 = ExtraEffectUtil.GetExtraChipValue(monsterData, extraEffectType); } MonsterData[] party = new MonsterData[] { monsterData }; if (CMD_PartyEdit.instance != null) { MonsterData[] array = CMD_PartyEdit.instance.GetSelectedMD().ToArray(); bool flag = array.Where((MonsterData item) => item.userMonster.userMonsterId == monsterData.userMonster.userMonsterId).Any <MonsterData>(); if (flag) { party = array; } else { GameWebAPI.RespDataMN_GetDeckList.DeckList[] deckList = DataMng.Instance().RespDataMN_DeckList.deckList; string deckNoText = DataMng.Instance().RespDataMN_DeckList.selectDeckNum; GameWebAPI.RespDataMN_GetDeckList.DeckList deckList2 = deckList.Where((GameWebAPI.RespDataMN_GetDeckList.DeckList item) => item.deckNum == deckNoText.ToString()).SingleOrDefault <GameWebAPI.RespDataMN_GetDeckList.DeckList>(); bool flag2 = deckList2.monsterList.Where((GameWebAPI.RespDataMN_GetDeckList.MonsterList item) => item.userMonsterId == monsterData.userMonster.userMonsterId).Any <GameWebAPI.RespDataMN_GetDeckList.MonsterList>(); if (flag2) { List <MonsterData> list = new List <MonsterData>(); foreach (GameWebAPI.RespDataMN_GetDeckList.MonsterList monsterList2 in deckList2.monsterList) { MonsterData monsterDataByUserMonsterID = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(monsterList2.userMonsterId, false); list.Add(monsterDataByUserMonsterID); } party = list.ToArray(); } } } int num3 = 0; AffectEffectProperty affectEffectProperty = null; if (extraEffectType == EffectStatusBase.ExtraEffectType.SkillPower) { List <AffectEffectProperty> affectEffectPropertyListForUtil = BattleServerControl.GetAffectEffectPropertyListForUtil(num.ToString()); if (affectEffectPropertyListForUtil != null && affectEffectPropertyListForUtil.Count <AffectEffectProperty>() > 0) { affectEffectProperty = affectEffectPropertyListForUtil[0]; num = affectEffectProperty.GetPower(null); num3 = ExtraEffectUtil.GetExtraStageValue(num, monsterData, party, effectArray, affectEffectProperty, extraEffectType); } else { num = num3; } } else if (extraEffectType == EffectStatusBase.ExtraEffectType.SkillHit) { List <AffectEffectProperty> affectEffectPropertyListForUtil2 = BattleServerControl.GetAffectEffectPropertyListForUtil(num.ToString()); if (affectEffectPropertyListForUtil2 != null && affectEffectPropertyListForUtil2.Count <AffectEffectProperty>() > 0) { affectEffectProperty = affectEffectPropertyListForUtil2[0]; num = (int)(affectEffectProperty.hitRate * 100f); num3 = ExtraEffectUtil.GetExtraStageValue(num, monsterData, party, effectArray, affectEffectProperty, extraEffectType); } else { num = num3; } } else { num3 = ExtraEffectUtil.GetExtraStageValue(num, monsterData, party, effectArray, affectEffectProperty, extraEffectType); } result = num3 + num2; change = 0; if (num2 > 0 || num < num3) { change = 1; } else if (num2 < 0 || num > num3) { change = -1; } }