protected virtual void SetSelectedCharChg(MonsterData monsterData) { int[] chipIdList = monsterData.GetChipEquip().GetChipIdList(); GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Manage slotStatus = monsterData.GetChipEquip().GetSlotStatus(); int maxSlotNum = 0; if (slotStatus != null) { maxSlotNum = slotStatus.maxSlotNum + slotStatus.maxExtraSlotNum; } this.chipBaseSelect.SetSelectedCharChg(chipIdList, true, maxSlotNum); }
private void SetCacheChipIconResources() { string selectDeckNum = DataMng.Instance().RespDataMN_DeckList.selectDeckNum; GameWebAPI.RespDataMN_GetDeckList.DeckList deckList = null; GameWebAPI.RespDataMN_GetDeckList.DeckList[] deckList2 = DataMng.Instance().RespDataMN_DeckList.deckList; for (int i = 0; i < deckList2.Length; i++) { if (selectDeckNum == deckList2[i].deckNum) { deckList = deckList2[i]; break; } } int[] array = null; for (int j = 0; j < deckList.monsterList.Length; j++) { MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(deckList.monsterList[j].userMonsterId); MonsterChipEquipData chipEquip = userMonster.GetChipEquip(); array = chipEquip.GetChipIdList(); } for (int k = 0; k < array.Length; k++) { GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(array[k]); string iconPath = chipMainData.GetIconPath(); if (!AssetDataMng.Instance().IsAssetBundleData(iconPath)) { UnityEngine.Object resource = AssetDataMng.Instance().LoadObject(iconPath, null, true); AssetDataCacheMng.Instance().AddCache(iconPath, AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY, resource); } } }
public static GameWebAPI.ChipEquipLogic RequestAPIChipEquip(GameWebAPI.ReqDataCS_ChipEquipLogic equip, Action <int> callBack = null) { return(new GameWebAPI.ChipEquipLogic { SetSendData = delegate(GameWebAPI.ReqDataCS_ChipEquipLogic param) { param.act = equip.act; param.dispNum = equip.dispNum; param.type = equip.type; param.userChipId = equip.userChipId; param.userMonsterId = equip.userMonsterId; }, OnReceived = delegate(GameWebAPI.RespDataCS_ChipEquipLogic resData) { if (resData.resultCode == 1) { GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChip = ChipDataMng.GetUserChip(equip.userChipId); userChip.userChipId = equip.userChipId; userChip.userMonsterId = ((equip.GetActEnum() != GameWebAPI.ReqDataCS_ChipEquipLogic.ACT.ATTACH) ? 0 : equip.userMonsterId); MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(equip.userMonsterId.ToString()); userMonster.GetChipEquip().UpdateEquipList(equip); if (equip.GetActEnum() == GameWebAPI.ReqDataCS_ChipEquipLogic.ACT.REMOVE) { Singleton <UserDataMng> .Instance.UpdateUserItemNum(7, -1); } ClassSingleton <MonsterUserDataMng> .Instance.UpdateUserMonsterData(resData.userMonster); } if (callBack != null) { callBack(resData.resultCode); } } }); }
protected override void SetSelectedCharChg(MonsterData monsterData) { MonsterChipEquipData chipEquip = monsterData.GetChipEquip(); int[] chipIdList = chipEquip.GetChipIdList(); this.chipBaseSelect.SetSelectedCharChg(chipIdList, false, 0); }
public static bool IsExtraEffectMonster(MonsterData monsterData, GameWebAPI.RespDataMA_GetWorldDungeonExtraEffectM.WorldDungeonExtraEffectM[] effectArray) { if (MonsterGrowStepData.IsGardenDigimonScope(monsterData.monsterMG.growStep)) { return(false); } int areaId = ExtraEffectUtil.GetAreaId(); foreach (int num in monsterData.GetChipEquip().GetChipIdList()) { GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffectData = ChipDataMng.GetChipEffectData(num.ToString()); if (chipEffectData != null) { GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] invocationList = ChipEffectStatus.GetInvocationList(chipEffectData, EffectStatusBase.EffectTriggerType.Area, monsterData.monsterM.monsterGroupId.ToInt32(), null, areaId); if (invocationList.Length > 0) { return(true); } } } GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus[] eventPointBonuses = ExtraEffectUtil.GetEventPointBonuses(ExtraEffectUtil.GetDungeonId().ToString()); foreach (GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus eventPointBonus in eventPointBonuses) { bool flag = ExtraEffectUtil.CheckExtraParams(monsterData, eventPointBonus); if (flag) { return(true); } } return(ExtraEffectUtil.CheckExtraStageParams(monsterData, effectArray)); }
public void SetRemovePartnerEquipChip(MonsterData partnerMonsterData) { if (partnerMonsterData.GetChipEquip().IsAttachedChip()) { UILabel uilabel = this.messageLabel; uilabel.text = uilabel.text + "\n" + StringMaster.GetString("MedalInheritPrecautionChip"); this.AdjustSize(2); } }
public void SetAlertEquipChip(MonsterData baseMonsterData, MonsterData partnerMonsterData) { if (baseMonsterData.GetChipEquip().IsAttachedChip() || partnerMonsterData.GetChipEquip().IsAttachedChip()) { UILabel uilabel = this.messageLabel; uilabel.text = uilabel.text + "\n" + StringMaster.GetString("LaboratoryPrecautionChip"); base.GetComponent <UIWidget>().height += this.messageLabel.fontSize * 2 + this.messageLabel.spacingY; } }
public void SetSelectedCharChg(MonsterData monsterData) { GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Manage slotStatus = monsterData.GetChipEquip().GetSlotStatus(); int num = 0; if (slotStatus == null) { this.myMaxChipSlot = 0; this.SetNumber(0, this.myMaxChipSlot); if (this.chipCells != null) { for (int i = 0; i < this.chipCells.Length; i++) { NGUITools.SetActiveSelf(this.chipCells[i].gameObject, false); } } this.SetNoChipMessage(true); } else { this.myMaxChipSlot = slotStatus.maxSlotNum + slotStatus.maxExtraSlotNum; if (this.myMaxChipSlot != 5 && this.myMaxChipSlot != 10) { global::Debug.LogErrorFormat("スロット数がありえない. myMaxChipSlot:{0} [{1}, {2}]", new object[] { this.myMaxChipSlot, slotStatus.maxSlotNum, slotStatus.maxExtraSlotNum }); this.myMaxChipSlot = 10; } if (monsterData.GetSlotEquip() != null) { num = monsterData.GetSlotEquip().Length; } this.SetNoChipMessage(num == 0); this.SetupChipCells(monsterData.GetSlotEquip()); this.SetupChipSlotsAndCells(); this.SetNumber(num, this.myMaxChipSlot); this.SetupChipIcons(num, monsterData.GetChipEquip().GetSlotStatus()); } }
public void SetDescription(MonsterData monsterData) { if (monsterData.GetChipEquip().IsAttachedChip()) { this.messageLabel.text = StringMaster.GetString("VersionUpAlertInfo") + "\n" + StringMaster.GetString("VerUPPrecautionChip"); base.GetComponent <UIWidget>().height += this.messageLabel.fontSize * 2 + this.messageLabel.spacingY; } else { this.messageLabel.text = StringMaster.GetString("VersionUpAlertInfo"); } }
public void RefreshMonsterSlot(int[] userMonsterIdList) { if (userMonsterIdList == null) { return; } for (int i = 0; i < userMonsterIdList.Length; i++) { string text = userMonsterIdList[i].ToString(); MonsterData monsterUserData = this.GetMonsterUserData(text); if (monsterUserData != null) { MonsterChipEquipData chipEquip = monsterUserData.GetChipEquip(); if (chipEquip != null) { chipEquip.SetChipEquip(text); } } } }
public static List <string> GetActivateBonusChips(MonsterData monsterData, List <string> references) { List <string> list = new List <string>(); list = QuestBonus.GetActivateEquipChipIdList(references, monsterData.GetChipEquip().GetChipIdList()); List <int> chipList = MonsterAutoLoadChipData.GetChipList(monsterData.monsterM.monsterId); List <int> list2 = chipList; if (QuestBonusFilter.< > f__mg$cache0 == null) { QuestBonusFilter.< > f__mg$cache0 = new Comparison <int>(QuestBonus.SortAscValue); } list2.Sort(QuestBonusFilter.< > f__mg$cache0); for (int i = 0; i < chipList.Count; i++) { string item = chipList[i].ToString(); if (references.Contains(item) && !list.Contains(item)) { list.Add(item); } } return(list); }
private static bool CheckExtraParams(MonsterData monsterData, GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus eventPointBonus) { if (float.Parse(eventPointBonus.effectValue) < 0f) { return(false); } ExtraEffectUtil.EventPointBonusTargetSubType eventPointBonusTargetSubType = (ExtraEffectUtil.EventPointBonusTargetSubType) int.Parse(eventPointBonus.targetSubType); switch (eventPointBonusTargetSubType) { case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterTribe: if (monsterData.monsterMG.tribe.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterGroup: if (monsterData.monsterMG.monsterGroupId.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.GrowStep: if (monsterData.monsterMG.growStep.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.SkillId: if (monsterData.GetCommonSkill() != null && monsterData.GetCommonSkill().skillId.Equals(eventPointBonus.targetValue)) { return(true); } if (monsterData.GetLeaderSkill() != null && monsterData.GetLeaderSkill().skillId.Equals(eventPointBonus.targetValue)) { return(true); } break; case ExtraEffectUtil.EventPointBonusTargetSubType.ChipId: { MonsterChipEquipData chipEquip = monsterData.GetChipEquip(); int[] chipIdList = chipEquip.GetChipIdList(); if (chipIdList.Where((int item) => item == eventPointBonus.targetValue.ToInt32()).Any <int>()) { return(true); } break; } default: if (eventPointBonusTargetSubType == ExtraEffectUtil.EventPointBonusTargetSubType.MonsterIntegrationGroup) { GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] monsterIntegrationGroupM = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster.monsterIntegrationGroupM; for (int i = 0; i < monsterIntegrationGroupM.Length; i++) { if (eventPointBonus.targetValue.Equals(monsterIntegrationGroupM[i].monsterIntegrationId) && monsterIntegrationGroupM[i].monsterId.Equals(monsterData.monsterM.monsterId)) { return(true); } } } break; } return(false); }
private static int GetExtraChipValue(MonsterData monsterData, EffectStatusBase.ExtraEffectType effectType) { float num = 0f; int areaId = ExtraEffectUtil.GetAreaId(); GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(monsterData.monsterM.monsterGroupId).Group; foreach (int num2 in monsterData.GetChipEquip().GetChipIdList()) { GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffectData = ChipDataMng.GetChipEffectData(num2.ToString()); if (chipEffectData != null) { GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] invocationList = ChipEffectStatus.GetInvocationList(chipEffectData, EffectStatusBase.EffectTriggerType.Area, monsterData.monsterM.monsterGroupId.ToInt32(), null, areaId); int num3 = 0; EffectStatusBase.ExtraEffectType effectType2 = EffectStatusBase.ExtraEffectType.Non; switch (effectType) { case EffectStatusBase.ExtraEffectType.Atk: num3 = monsterData.userMonster.attack.ToInt32(); effectType2 = EffectStatusBase.ExtraEffectType.Atk; break; case EffectStatusBase.ExtraEffectType.Def: num3 = monsterData.userMonster.defense.ToInt32(); effectType2 = EffectStatusBase.ExtraEffectType.Def; break; case EffectStatusBase.ExtraEffectType.Hp: num3 = monsterData.userMonster.hp.ToInt32(); effectType2 = EffectStatusBase.ExtraEffectType.Hp; break; case EffectStatusBase.ExtraEffectType.Speed: num3 = monsterData.userMonster.speed.ToInt32(); effectType2 = EffectStatusBase.ExtraEffectType.Speed; break; case EffectStatusBase.ExtraEffectType.Satk: num3 = monsterData.userMonster.spAttack.ToInt32(); effectType2 = EffectStatusBase.ExtraEffectType.Satk; break; case EffectStatusBase.ExtraEffectType.Sdef: num3 = monsterData.userMonster.spDefense.ToInt32(); effectType2 = EffectStatusBase.ExtraEffectType.Sdef; break; default: if (effectType == EffectStatusBase.ExtraEffectType.SkillPower || effectType == EffectStatusBase.ExtraEffectType.SkillHit) { num3 = 0; effectType2 = EffectStatusBase.ExtraEffectType.Non; } break; } GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster responseMonsterIntegrationGroupMaster = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster; GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] source = responseMonsterIntegrationGroupMaster.monsterIntegrationGroupM.Where((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterId == monsterData.monsterM.monsterId).ToArray <GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup>(); string[] monsterIntegrationIds = source.Select((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterIntegrationId).ToArray <string>(); num += ChipEffectStatus.GetChipEffectValueToFloat(invocationList, (float)num3, false, monsterIntegrationIds, monsterData.monsterM.monsterGroupId, ExtraEffectUtil.ResistanceToTolerance(monsterData), group.tribe, MonsterGrowStepData.ToGrowStep(group.growStep), null, null, ChipEffectStatus.TargetType.Actor, effectType2, 0); } } return(Mathf.FloorToInt(num)); }
public static List <ExtraEffectStatus> CheckStageEffectInvalid(int areaId, List <ExtraEffectStatus> extraEffectStatusList, MonsterData[] chipPlayers, MonsterData[] chipEnemys, MonsterData chipTarget) { List <ExtraEffectStatus> list = new List <ExtraEffectStatus>(); bool flag = chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId).Any <MonsterData>(); GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(chipTarget.monsterM.monsterGroupId).Group; GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster responseMonsterIntegrationGroupMaster = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster; GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] source = responseMonsterIntegrationGroupMaster.monsterIntegrationGroupM.Where((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterId == chipTarget.monsterM.monsterId).ToArray <GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup>(); string[] monsterIntegrationIds = source.Select((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterIntegrationId).ToArray <string>(); GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM resistanceMaster = MonsterResistanceData.GetResistanceMaster(chipTarget.monsterM.resistanceId); List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(chipTarget.GetResistanceIdList()); GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM data = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList); Tolerance tolerance = ServerToBattleUtility.ResistanceToTolerance(data); GrowStep growStep = MonsterGrowStepData.ToGrowStep(group.growStep); foreach (ExtraEffectStatus extraEffectStatus in extraEffectStatusList) { bool flag2 = true; for (int i = 0; i < chipPlayers.Length; i++) { MonsterData chipActer = chipPlayers[i]; if (chipActer != null) { ChipEffectStatus.TargetType targetType; if (chipActer.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId) { targetType = ChipEffectStatus.TargetType.Actor; } else if (!chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipActer.userMonster.userMonsterId).Any <MonsterData>()) { if (!flag) { targetType = ChipEffectStatus.TargetType.Player; } else { targetType = ChipEffectStatus.TargetType.Enemy; } } else if (flag) { targetType = ChipEffectStatus.TargetType.Player; } else { targetType = ChipEffectStatus.TargetType.Enemy; } foreach (int num in chipActer.GetChipEquip().GetChipIdList()) { GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] array = ChipDataMng.GetChipEffectData(num.ToString()); array = ChipEffectStatus.GetStageEffectInvalidList(areaId, array, extraEffectStatus).ToArray(); if (array.Length > 0) { List <GameWebAPI.RespDataMA_ChipEffectM.ChipEffect> totalChipEffectStatusList = ChipEffectStatus.GetTotalChipEffectStatusList(array, flag, monsterIntegrationIds, chipTarget.monsterM.monsterGroupId, tolerance, group.tribe, growStep, null, null, targetType, EffectStatusBase.ExtraEffectType.StageEffextInvalid); if (totalChipEffectStatusList.Count > 0) { flag2 = false; break; } } } } } if (flag2) { list.Add(extraEffectStatus); } } return(list); }