| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (FuncOpen.Instance.IsFuncOpen(126))
|
| | | {
|
| | | treasureId = GetTreasureSoulTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.TreasureSoul;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | |
|
| | | treasureId = GetNextChallengeTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | |
| | | displayState = DisplayState.WaitUnLock;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | treasureId = GetNextChallengeTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.WaitUnLock;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | |
|
| | | treasureId = GetTreasureSoulTreasure();
|
| | | if (treasureId != 0)
|
| | | {
|
| | | this.displayTreasureId = treasureId;
|
| | | displayState = DisplayState.TreasureSoul;
|
| | | effectState = 0;
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | |
|
| | | m_Description.text = Language.Get("FabaoState_Text_4", Mathf.RoundToInt(progress * 100f));
|
| | | break;
|
| | | case DisplayState.TreasureSoul:
|
| | | if (treasure != null)
|
| | | {
|
| | | var privilege = treasure.unLockPrivilege;
|
| | | if (privilege != 0)
|
| | | {
|
| | | var privilegeConfig = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(privilege);
|
| | | m_Description.text = Language.Get("FabaoState_Text_8", privilegeConfig.Name);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Description.text = Language.Get("FabaoState_Text_8", config.Name);
|
| | | }
|
| | | }
|
| | | break;
|
| | | case DisplayState.WaitUnLock:
|
| | | Achievement achievement = null;
|
| | |
| | | );
|
| | | }
|
| | |
|
| | | private int GetTreasureSoulTreasure()
|
| | | {
|
| | | return humanTreasures.Find((x) =>
|
| | | {
|
| | | Treasure treasure;
|
| | | if (model.TryGetTreasure(x, out treasure))
|
| | | {
|
| | | var humanTreasure = treasure as HumanTreasure;
|
| | | return humanTreasure != null && humanTreasure.humanState == HumanTreasureState.CastSoul;
|
| | | }
|
| | | else
|
| | | {
|
| | | return false;
|
| | | }
|
| | | }
|
| | | );
|
| | | }
|
| | |
|
| | | private int GetNextChallengeTreasure()
|
| | | {
|
| | | for (int i = 0; i < humanTreasures.Count; i++)
|
| | |
| | | AwakenAble,//可觉醒
|
| | | CollectSoul,//可集魂
|
| | | AwakenUnderway,//觉醒进行中
|
| | | TreasureSoul,//法宝魂觉醒中
|
| | | WaitUnLock,//等待解封
|
| | | PotentialUp,//潜力提升进行中
|
| | | PotentialUpAble,//潜力可提升
|