Exemplo n.º 1
0
 public static void GoAchievement(EAchievementConditionType achievementConditionType)
 {
     switch (achievementConditionType)
     {
     case EAchievementConditionType.EACT_ChallengeScene:
     case EAchievementConditionType.EACT_MapStar:
     case EAchievementConditionType.EACT_SceneChapter:
         GUIWorldMap.difficulty = 0;
         GameUIManager.mInstance.uiState.ResetWMSceneInfo = true;
         GameUIManager.mInstance.ChangeSession<GUIWorldMap>(null, false, true);
         break;
     case EAchievementConditionType.EACT_ChallengeEliteScene:
     case EAchievementConditionType.EACT_EliteMapStar:
     case EAchievementConditionType.EACT_EliteSceneChapter:
         if (Globals.Instance.Player.GetSceneScore(GameConst.GetInt32(109)) <= 0)
         {
             GameUIManager.mInstance.ShowMessageTip(Singleton<StringManager>.Instance.GetString("WorldMap_3"), 0f, 0f);
         }
         else
         {
             GUIWorldMap.difficulty = 1;
             GameUIManager.mInstance.uiState.ResetWMSceneInfo = true;
             GameUIManager.mInstance.ChangeSession<GUIWorldMap>(null, false, true);
         }
         break;
     case EAchievementConditionType.EACT_Trial:
     case EAchievementConditionType.EACT_TrialWave:
     case EAchievementConditionType.EACT_EliteTrialWave:
         GUITrailTowerSceneV2.TryOpen();
         break;
     case EAchievementConditionType.EACT_Pvp:
     case EAchievementConditionType.EACT_PvpRank:
     case EAchievementConditionType.EACT_WinPvp:
         GUIPVP4ReadyScene.TryOpen();
         break;
     case EAchievementConditionType.EACT_TrinketCreate:
     case EAchievementConditionType.EACT_Pillage:
     case EAchievementConditionType.EACT_GainGoldTrinket:
         GUIPillageScene.TryOpen(false);
         break;
     case EAchievementConditionType.EACT_TrinketEnhance:
     case EAchievementConditionType.EACT_PetTrinketRefine:
     case EAchievementConditionType.EACT_OneTrinketRefine:
         GameUIManager.mInstance.ChangeSession<GUITrinketBagScene>(null, false, true);
         break;
     case EAchievementConditionType.EACT_EquipEnhance:
     case EAchievementConditionType.EACT_EquipRefine:
     case EAchievementConditionType.EACT_PetEquipEnhance:
     case EAchievementConditionType.EACT_PetEquipRefine:
     case EAchievementConditionType.EACT_OneEquipEnhance:
     case EAchievementConditionType.EACT_OneEquipRefine:
         GameUIManager.mInstance.ChangeSession<GUIEquipBagScene>(null, false, true);
         break;
     case EAchievementConditionType.EACT_CostumeParty:
     case EAchievementConditionType.EACT_PartyInteraction:
     case EAchievementConditionType.EACT_PartyTime:
         GUICostumePartyScene.TryOpen();
         break;
     case EAchievementConditionType.EACT_SummonPet:
     case EAchievementConditionType.EACT_SummonPet2:
     case EAchievementConditionType.EACT_ConsumeDiamond:
     case EAchievementConditionType.EACT_GainOrangePet:
         GameUIManager.mInstance.ChangeSession<GUIRollSceneV2>(null, false, true);
         break;
     case EAchievementConditionType.EACT_WorldBoss:
         GUIBossReadyScene.TryOpen();
         break;
     case EAchievementConditionType.EACT_BuyEnergyItem:
     case EAchievementConditionType.EACT_BuyStaminaItem:
         GUIShopScene.TryOpen(EShopType.EShop_Common);
         break;
     case EAchievementConditionType.EACT_KingReward:
     case EAchievementConditionType.EACT_KingReward5Star:
         GUIKingRewardScene.TryOpen();
         break;
     case EAchievementConditionType.EACT_Card:
     case EAchievementConditionType.EACT_SuperCard:
     case EAchievementConditionType.EACT_Pay:
     case EAchievementConditionType.EACT_OneOrderPay:
     case EAchievementConditionType.EACT_BuyDiamond:
         GameUIVip.OpenRecharge();
         break;
     case EAchievementConditionType.EACT_PlayerLevel:
         GameUIManager.mInstance.ChangeSession<GUIWorldMap>(null, false, true);
         break;
     case EAchievementConditionType.EACT_CombatValue:
     case EAchievementConditionType.EACT_PetLevel:
     case EAchievementConditionType.EACT_PetFurther:
     case EAchievementConditionType.EACT_PetSkill:
     case EAchievementConditionType.EACT_OnePetFurther:
     case EAchievementConditionType.EACT_OnePetSkill:
         GameUIManager.mInstance.ChangeSession<GUIPartnerManageScene>(null, false, true);
         break;
     case EAchievementConditionType.EACT_VipLevel:
         GameUIVip.OpenVIP(0);
         break;
     case EAchievementConditionType.EACT_LoginDay:
         break;
     case EAchievementConditionType.EACT_PetEquipQuality:
         GameUIManager.mInstance.ChangeSession<GUIWorldMap>(null, false, true);
         break;
     case EAchievementConditionType.EACT_AwakeMapStar:
     case EAchievementConditionType.EACT_AwakeSceneChapter:
     case EAchievementConditionType.EACT_ChallengeAwakeScene:
         GUIAwakeRoadSceneV2.TryOpen(null);
         break;
     case EAchievementConditionType.EACT_NightmareMapStar:
     case EAchievementConditionType.EACT_NightmareSceneChapter:
     case EAchievementConditionType.EACT_ChallengeNightmareScene:
         if (Globals.Instance.Player.GetSceneScore(GameConst.GetInt32(61)) <= 0)
         {
             GameUIManager.mInstance.ShowMessageTip(Singleton<StringManager>.Instance.GetString("WorldMap_6"), 0f, 0f);
         }
         else
         {
             GUIWorldMap.difficulty = 9;
             GameUIManager.mInstance.ChangeSession<GUIWorldMap>(null, false, true);
         }
         break;
     case EAchievementConditionType.EACT_OrePillage:
         GUIGuildMinesScene.Show(false);
         break;
     case EAchievementConditionType.EACT_GiveFriendEnergy:
         GUIFriendScene.TryOpen(EUITableLayers.ESL_Friend);
         break;
     case EAchievementConditionType.EACT_FriendCount:
         GUIFriendScene.TryOpen(EUITableLayers.ESL_FriendRecommend);
         break;
     case EAchievementConditionType.EACT_GainGoldEquip:
         GUIShopScene.TryOpen(EShopType.EShop_Trial);
         break;
     case EAchievementConditionType.EACT_GuildPvp:
         if (Globals.Instance.Player.GuildSystem.HasGuild())
         {
             GUIGuildManageScene.TryOpen();
         }
         else
         {
             GameUIManager.mInstance.ShowMessageTip(Singleton<StringManager>.Instance.GetString("guild38"), 0f, 0f);
         }
         break;
     case EAchievementConditionType.EACT_GainOrangeLopet:
         GUIShopScene.TryOpen(EShopType.EShop_Lopet);
         break;
     case EAchievementConditionType.EACT_LopetFurther:
     case EAchievementConditionType.EACT_LopetLevel:
         GUILopetBagScene.TryOpen();
         break;
     default:
         global::Debug.LogErrorFormat("has not implement", new object[0]);
         break;
     }
 }
Exemplo n.º 2
0
 public ShareAchievementDataEx GetShareAchievement(EAchievementConditionType conditionType)
 {
     for (int i = 0; i < this.ShareAchievements.Count; i++)
     {
         if (this.ShareAchievements[i].Info.ConditionType == (int)conditionType)
         {
             return this.ShareAchievements[i];
         }
     }
     return null;
 }