public EquipItemExceedData GetEquipItemExceedData(RARITY_TYPE rarity, GET_TYPE getType, int eventId = 0) { if (tableData == null) { return(null); } if (getType != GET_TYPE.EVENT) { eventId = 0; } UIntKeyTable <EquipItemExceedData> uIntKeyTable = tableData.Get((uint)rarity); if (uIntKeyTable == null) { Log.Error("EquipItemExceedTable is NULL :: rarity = {0}( {1} )", rarity, (uint)rarity); return(null); } EquipItemExceedData equipItemExceedData = uIntKeyTable.Find((EquipItemExceedData data) => data.getType == getType && data.eventId == eventId); if (equipItemExceedData == null) { if (getType == GET_TYPE.EVENT) { equipItemExceedData = uIntKeyTable.Find((EquipItemExceedData data) => data.getType == GET_TYPE.FREE && data.eventId == 0); } else { Log.Warning("EquipItemExceedTable is NULL :: getType = {0}, eventId = {1}", getType, eventId); } } return(equipItemExceedData); }
protected void ShowRarity(RARITY_TYPE rarity) { if (!AnimationDirector.I.IsSkip()) { SetActive((Enum)UI.OBJ_RARITY_ROOT, true); UI uI = rarityAnimRoot[(int)rarity]; int i = 0; for (int num = rarityAnimRoot.Length; i < num; i++) { SetActive((Enum)rarityAnimRoot[i], rarityAnimRoot[i] == uI); } ResetTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, 0); ResetTween((Enum)rarityAnimRoot[(int)rarity], 0); if (rarity <= RARITY_TYPE.C) { ResetTween((Enum)UI.OBJ_RARITY_LIGHT, 0); PlayTween((Enum)UI.OBJ_RARITY_LIGHT, true, (EventDelegate.Callback)null, false, 0); } PlayTween((Enum)rarityAnimRoot[(int)rarity], true, (EventDelegate.Callback)null, false, 0); PlayTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, true, (EventDelegate.Callback)null, false, 0); if (AnimationDirector.I is QuestGachaDirectorBase) { (AnimationDirector.I as QuestGachaDirectorBase).PlayUIRarityEffect(rarity, GetCtrl(UI.OBJ_RARITY_ROOT), GetCtrl(uI)); } else if (AnimationDirector.I is SkillGachaDirector) { (AnimationDirector.I as SkillGachaDirector).PlayUIRarityEffect(rarity, GetCtrl(UI.OBJ_RARITY_ROOT), GetCtrl(uI)); } } }
public void PlayRarityAudio(RARITY_TYPE rarity_type) { int num = 4; int num2 = -1; num2 = (((int)rarity_type < num) ? 40000126 : 40000127); SoundManager.PlayOneShotUISE(num2); }
public void LoadFromBinary(BinaryTableReader reader, ref uint key) { questID = key; questType = (QUEST_TYPE)reader.ReadInt32(0); questStyle = (QUEST_STYLE)reader.ReadInt32(0); rarity = (RARITY_TYPE)reader.ReadInt32(0); getType = (GET_TYPE)reader.ReadInt32(0); eventId = reader.ReadInt32(0); grade = reader.ReadInt32(0); difficulty = (DIFFICULTY_TYPE)reader.ReadInt32(0); sortPriority = reader.ReadInt32(0); locationNumber = reader.ReadString(string.Empty); questNumber = reader.ReadString(string.Empty); questText = reader.ReadString(string.Empty); appearQuestId = reader.ReadUInt32(0u); appearDeliveryId = reader.ReadUInt32(0u); rushId = reader.ReadUInt32(0u); mapId = reader.ReadUInt32(0u); for (int i = 0; i < 1; i++) { stageName[i] = reader.ReadString(string.Empty); } for (int j = 0; j < 1; j++) { enemyID[j] = reader.ReadInt32(0); enemyLv[j] = reader.ReadInt32(0); } for (int k = 0; k < 1; k++) { bgmID[k] = reader.ReadInt32(0); } limitTime = reader.ReadSingle(0f); missionID[0] = reader.ReadUInt32(0u); missionID[1] = reader.ReadUInt32(0u); missionID[2] = reader.ReadUInt32(0u); cantSale = reader.ReadBoolean(false); forceDefeat = reader.ReadBoolean(false); storyId = reader.ReadInt32(0); if (sortPriority == 0) { sortPriority = (int)key; } if (string.IsNullOrEmpty(locationNumber)) { locationNumber = (questID / 100u % 1000u).ToString(); } if (string.IsNullOrEmpty(questNumber)) { questNumber = (questID % 100u).ToString(); } seriesNum = 0; for (int l = 0; l < 1 && enemyID[l] != 0; l++) { seriesNum++; } }
public int GetNeedExceedExp(RARITY_TYPE rarity, int exceedCnt) { float num = 0f; for (int i = 1; i < exceedCnt + 1 && i <= GetMaxExceedCount(); i++) { int exceedRarityBasePoint = GetExceedRarityBasePoint(rarity); float exceedRate = GetExceedRate(i); num += (float)exceedRarityBasePoint * exceedRate; } return((int)num); }
private void Drop() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) sectionCommandReceiver.OnHideRarity(); int i = 0; for (int count = managedEffects.Count; i < count; i++) { if (managedEffects[i] != null) { Object.Destroy(managedEffects[i].get_gameObject()); } } managedEffects.Clear(); rarity = RARITY_TYPE.D; reward = null; if (MonoBehaviourSingleton <GachaManager> .IsValid() && MonoBehaviourSingleton <GachaManager> .I.gachaResult != null && dropCount < MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.Count) { reward = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[dropCount]; SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)reward.itemId); if (skillItemData != null) { rarity = skillItemData.rarity; } } if (reward == null) { reward = new GachaResult.GachaReward(); } rarityIndex = rarity.ToRarityExpressionID(); if (mainBall != null) { Object.Destroy(mainBall.get_gameObject()); } mainBall = CreateBall(ballSocket, rarityIndex, Vector3.get_zero(), true); string text; if (dropCount != 0) { text = ((dropCount >= 10) ? "SKILL_GACHA_REAM_DROP_2" : "SKILL_GACHA_REAM_DROP_1"); } else { text = ((!IsSingleGacha) ? "SKILL_GACHA_REAM" : "SKILL_GACHA_SINGLE"); Play(text, null, 0f); } npcAnimator.Play(text, 0, 0f); gachaAnimator.Play(text, 0, 0f); cameraAnimator.Play(text, 0, 0f); }
private int GetExceedRarityBasePoint(RARITY_TYPE type) { if (basePoints == null) { SetConst(); } if ((int)type > basePoints.Length - 1) { Debug.LogError((object)"not define \"basePoints\" in ExceedSkillItemTable"); return(0); } return(basePoints[(int)type]); }
public static int ToRarityExpressionID(this RARITY_TYPE type) { switch (type) { default: return(0); case RARITY_TYPE.A: return(1); case RARITY_TYPE.S: case RARITY_TYPE.SS: case RARITY_TYPE.SSS: return(2); } }
public override void UpdateUI() { //IL_003e: Unknown result type (might be due to invalid IL or missing references) base.UpdateUI(); SetActive((Enum)UI.BTN_PARTY, false); SetActive((Enum)UI.TWN_DIFFICULT_STAR, false); GetCtrl(UI.BTN_GUILD_REQUEST).set_localPosition(new Vector3(0f, 0f, 0f)); SetLabelText((Enum)UI.LBL_LIMIT_TIME, "--:--"); RARITY_TYPE rarity = questInfo.questData.tableData.rarity; SetActive((Enum)UI.LBL_GUILD_REQUEST_NEED_POINT, true); string format = StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 6u); string text = string.Format(format, MonoBehaviourSingleton <GuildRequestManager> .I.GetNeedPoint(rarity), MonoBehaviourSingleton <GuildRequestManager> .I.GetNeedTimeWithFormat(rarity)); SetLabelText((Enum)UI.LBL_GUILD_REQUEST_NEED_POINT, text); }
private void TEST_PLAY(RARITY_TYPE rarity, DIFFICULTY_TYPE difficulty) { if (rarity <= RARITY_TYPE.C) { PlayTween((Enum)UI.OBJ_RARITY_LIGHT, true, (EventDelegate.Callback)null, false, 0); } PlayTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, true, (EventDelegate.Callback)null, false, 0); PlayTween((Enum)rarityAnimRoot[(int)rarity], true, (EventDelegate.Callback) delegate { PlayTween((Enum)UI.OBJ_DIFFICULTY_ROOT, true, (EventDelegate.Callback)null, false, 0); }, false, 0); if (AnimationDirector.I is QuestGachaDirectorBase) { (AnimationDirector.I as QuestGachaDirectorBase).PlayUIRarityEffect(rarity, GetCtrl(UI.OBJ_RARITY_ROOT), GetCtrl(rarityAnimRoot[(int)rarity])); } }
public void PlayRarityAudio(RARITY_TYPE rarity_type, bool ignore_skip_check = false) { AUDIO audio = AUDIO.RARITY_LOW; switch (rarity_type) { case RARITY_TYPE.A: audio = AUDIO.RARITY_MID; break; case RARITY_TYPE.S: case RARITY_TYPE.SS: case RARITY_TYPE.SSS: audio = AUDIO.RARITY_HIGH_0; break; } PlayAudio(audio, ignore_skip_check); }
private void TEST_RESET(RARITY_TYPE rarity, DIFFICULTY_TYPE difficulty) { RARITY_TYPE[] array = (RARITY_TYPE[])Enum.GetValues(typeof(RARITY_TYPE)); int star_num = (int)(difficulty + 1); int i = 0; for (int num = array.Length; i < num; i++) { SetActive((Enum)rarityAnimRoot[i], rarity == array[i]); } SetGachaQuestDifficulty(UI.OBJ_DIFFICULTY_ROOT, star_num); ResetTween((Enum)UI.OBJ_DIFFICULTY_ROOT, 0); ResetTween((Enum)rarityAnimRoot[(int)rarity], 0); ResetTween((Enum)UI.OBJ_RARITY_TEXT_ROOT, 0); if (rarity <= RARITY_TYPE.C) { ResetTween((Enum)UI.OBJ_RARITY_LIGHT, 0); } }
public void PlayUIRarityEffect(RARITY_TYPE rarity, Transform effect_parent_ui, Transform effect_target_ui) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) GameObject val = null; int num = rarity.ToRarityExpressionID2(); if (num > 0) { val = uiRarityEffectPrefabs[num - 1]; } if (!(val == null)) { UIWidget componentInChildren = effect_target_ui.GetComponentInChildren <UIWidget>(); Transform val2 = ResourceUtility.Realizes(val, effect_parent_ui, 5); val2.set_position(effect_parent_ui.get_position()); EffectManager.SetUIEffectDepth(val2, effect_parent_ui, -0.001f, 10, componentInChildren); PlayRarityAudio(rarity); } }
public RARITY_TYPE GetMaxRarity() { RARITY_TYPE rARITY_TYPE = RARITY_TYPE.D; if (gachaResult != null && gachaResult.reward != null) { int i = 0; for (int count = gachaResult.reward.Count; i < count; i++) { GachaResult.GachaReward gachaReward = gachaResult.reward[i]; RARITY_TYPE rARITY_TYPE2 = RARITY_TYPE.D; switch (selectGachaType) { case GACHA_TYPE.QUEST: { QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)gachaReward.itemId); if (questData != null) { rARITY_TYPE2 = questData.rarity; } break; } case GACHA_TYPE.SKILL: { SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)gachaReward.itemId); if (skillItemData != null) { rARITY_TYPE2 = skillItemData.rarity; } break; } } if (rARITY_TYPE < rARITY_TYPE2) { rARITY_TYPE = rARITY_TYPE2; } } } return(rARITY_TYPE); }
public bool IsFreeLapis(RARITY_TYPE rarity, uint lapis_item_id, int eventId = 0) { if (tableData == null) { return(true); } UIntKeyTable <EquipItemExceedData> uIntKeyTable = tableData.Get((uint)rarity); if (uIntKeyTable == null) { return(true); } EquipItemExceedData equipItemExceedData = uIntKeyTable.Find((EquipItemExceedData data) => data.exchangeItemId == lapis_item_id && data.eventId == eventId); if (equipItemExceedData == null) { return(true); } return(equipItemExceedData.getType != GET_TYPE.PAY); }
private int CalcNumRarityData(RARITY_TYPE targetRarityType, bool isCheckOnlyLast = false, bool isCheck10 = false) { int num = 0; if (!MonoBehaviourSingleton <GachaManager> .IsValid()) { Log.Error("Invalid GachaManager!!"); return(num); } GachaResult gachaResult = MonoBehaviourSingleton <GachaManager> .I.gachaResult; if (gachaResult == null) { Log.Error("gachaResult is null!!"); return(num); } int num2 = gachaResult.reward.Count; List <GachaResult.GachaReward> list = gachaResult.reward; if (isCheckOnlyLast) { SkillItemTable.SkillItemData skillItemData = Singleton <SkillItemTable> .I.GetSkillItemData((uint)list[num2 - 1].itemId); return((skillItemData.rarity == targetRarityType) ? 1 : 0); } if (isCheck10 && isReam) { num2--; } for (int i = 0; i < num2; i++) { SkillItemTable.SkillItemData skillItemData2 = Singleton <SkillItemTable> .I.GetSkillItemData((uint)list[i].itemId); if (skillItemData2 != null && skillItemData2.rarity == targetRarityType) { num++; } } return(num); }
public int GetNeedPoint(RARITY_TYPE rarity) { ServerConstDefine constDefine = MonoBehaviourSingleton <UserInfoManager> .I.userInfo.constDefine; switch (rarity) { case RARITY_TYPE.B: return(constDefine.GUILD_REQUEST_NEED_POINT_B); case RARITY_TYPE.A: return(constDefine.GUILD_REQUEST_NEED_POINT_A); case RARITY_TYPE.S: return(constDefine.GUILD_REQUEST_NEED_POINT_S); case RARITY_TYPE.SS: return(constDefine.GUILD_REQUEST_NEED_POINT_SS); default: return(constDefine.GUILD_REQUEST_NEED_POINT_SS); } }
private bool CheckContainRarityLast(RARITY_TYPE targetRarityType) { return(CalcNumRarityData(targetRarityType, true, false) > 0); }
private int GetNumRarityData10(RARITY_TYPE targetRarityType) { return(CalcNumRarityData(targetRarityType, false, true)); }
void SkillGachaDirector.ISectionCommand.OnShowRarity(RARITY_TYPE rarity) { ShowRarity(rarity); }
protected void PlayAppearAudio(RARITY_TYPE rarity_type, bool is_short) { AUDIO audio = (!is_short) ? AUDIO.APEAR_LONG : AUDIO.APEAR_SHORT; PlayAudio(audio); }
public string GetNeedTimeWithFormat(RARITY_TYPE rarity) { TimeSpan needTime = GetNeedTime(rarity); return(new DateTime(0L).Add(needTime).ToString("H:mm:ss")); }
void QuestGachaDirectorBase.ISectionCommand.OnShowRarity(RARITY_TYPE rarity) { SetActive((Enum)UI.BTN_SKIPALL, false); ShowRarity(rarity); }
public TimeSpan GetNeedTime(RARITY_TYPE rarity) { int needPoint = GetNeedPoint(rarity); return(CalcTimeSpanFromPoint(needPoint)); }
public RarityCheckFilter(UI ui, RARITY_TYPE r) : base(ui) { rarity = r; }
private IEnumerator DoQuestGacha() { Init(); int display_rarity = 0; SetLinkCamera(true); int enemy_id = 0; EnemyTable.EnemyData enemy_data = null; if (MonoBehaviourSingleton <GachaManager> .I.gachaResult != null) { GachaResult.GachaReward reward = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[0]; uint reward_quest_id = (uint)reward.itemId; QuestTable.QuestTableData quest_data = Singleton <QuestTable> .I.GetQuestData(reward_quest_id); if (quest_data != null) { enemy_data = Singleton <EnemyTable> .I.GetEnemyData((uint)quest_data.GetMainEnemyID()); } } if (enemy_data == null) { if (enemy_id == 0) { enemy_id = 1101001; } enemy_data = Singleton <EnemyTable> .I.GetEnemyData((uint)enemy_id); } NPCLoader npc_loader = LoadNPC(); EnemyLoader enemy_loader = null; if (enemy_data != null) { int displayAnimID = enemy_data.animId; OutGameSettingsManager.EnemyDisplayInfo displayInfo = MonoBehaviourSingleton <OutGameSettingsManager> .I.SearchEnemyDisplayInfoForGacha(enemy_data); int modelID = enemy_data.modelId; float displayScale = enemy_data.modelScale; if (displayInfo != null) { displayAnimID = displayInfo.animID; displayScale = displayInfo.gachaScale; } enemy_loader = LoadEnemy(enemyPosition, modelID, displayAnimID, displayScale, enemy_data.baseEffectName, enemy_data.baseEffectNode); while (enemy_loader.isLoading) { yield return((object)null); } enemy_loader.ApplyGachaDisplayScaleToParentNode(); CheckAndReplaceShader(enemy_loader); enemy_loader.get_gameObject().SetActive(false); } while (npc_loader.isLoading) { yield return((object)null); } LoadingQueue lo_queue = new LoadingQueue(this); CacheAudio(lo_queue); if (enemy_data != null) { CacheEnemyAudio(enemy_data, lo_queue); } while (lo_queue.IsLoading()) { yield return((object)null); } PlayerAnimCtrl npc_anim = PlayerAnimCtrl.Get(npc_loader.animator, PLCA.IDLE_01, null, null, null); CreateNPCEffect(npc_loader.model); yield return((object)null); stageAnimator.set_cullingMode(0); stageAnimator.Rebind(); targetRarity = MonoBehaviourSingleton <GachaManager> .I.GetMaxRarity().ToRarityExpressionID() + 1; if (targetRarity > 4) { targetRarity = 4; } stageAnimator.Play("StageAnim_Main"); Play("MainAnim_Start", null, 0f); PlayEffect(startEffectPrefabs[0]); npc_anim.Play(PLCA.QUEST_GACHA, true); bool rankup3 = UpdateDisplayRarity(ref display_rarity); PlayAudio(AUDIO.OPENING_01); while (Step(0.5f)) { yield return((object)null); } PlayAudio(AUDIO.OPENING_02); PlayAudio(AUDIO.OPENING_03); while (Step(1.4f)) { yield return((object)null); } PlayAudio(AUDIO.OPENING_04); while (Step(2.6f)) { yield return((object)null); } PlayAudio(AUDIO.DOOR_01); while (Step(3.2f)) { yield return((object)null); } PlayAudio(AUDIO.DOOR_02); while (Step(3.38f)) { yield return((object)null); } PlayAudio(AUDIO.MAGI_INTRO_01); while (Step(6.5f)) { yield return((object)null); } npc_loader.get_gameObject().SetActive(false); PlayMeteorEffect(display_rarity); PlayAudio(AUDIO.METEOR_01); while (Step(7.5f)) { yield return((object)null); } PlayMagicEffect(display_rarity, rankup3); PlayMagicAudio(display_rarity); rankup3 = UpdateDisplayRarity(ref display_rarity); PlayMeteorEffect(display_rarity); while (Step(8.5f)) { yield return((object)null); } PlayMagicEffect(display_rarity, rankup3); PlayMagicAudio(display_rarity); rankup3 = UpdateDisplayRarity(ref display_rarity); PlayMeteorEffect(display_rarity); PlayAudio(AUDIO.METEOR_02); while (Step(9.5f)) { yield return((object)null); } PlayMagicEffect(display_rarity, rankup3); PlayMagicAudio(display_rarity); while (Step(10.5f)) { yield return((object)null); } if (enemy_loader != null) { enemy_loader.get_gameObject().SetActive(true); } if (!skip) { PlayEnemyAnimation(enemy_loader, "Base Layer.GACHA_SINGLE"); } Play("MainAnim_End", null, 0f); UpdateDisplayRarity(ref display_rarity); PlayEndEffect(display_rarity); RARITY_TYPE rarity = MonoBehaviourSingleton <GachaManager> .I.GetMaxRarity(); PlayAppearAudio(rarity, false); if (enemy_data != null) { PlayEnemyAudio(enemy_data, false); } while (Step(11.5f)) { yield return((object)null); } while (Step(13f)) { yield return((object)null); } if (skip) { while (MonoBehaviourSingleton <TransitionManager> .I.isChanging) { yield return((object)null); } PlayEnemyAnimation(enemy_loader, "Base Layer.IDLE"); Time.set_timeScale(1f); if (MonoBehaviourSingleton <TransitionManager> .I.isTransing) { yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In()); } } else { skip = true; } Time.set_timeScale(1f); sectionCommandReceiver.OnEnd(); }
public static bool IsRareLithograph(RARITY_TYPE rarity) { return(rarity >= RARITY_TYPE.SS); }
public static bool IsRare(RARITY_TYPE rarity) { return(rarity >= RARITY_TYPE.B); }