public void BattleResult(int dungeonId, int resultType, int first) { var e1 = new DungeonFightOver(); EventDispatcher.Instance.DispatchEvent(e1); var e = new Show_UI_Event(UIConfig.BattleResult, new BattleResultArguments { DungeonId = dungeonId, BattleResult = resultType, First = first }); EventDispatcher.Instance.DispatchEvent(e); }
public void BattleResult(int dungeonId, int resultType, int first) { var e1 = new DungeonFightOver(); EventDispatcher.Instance.DispatchEvent(e1); var e = new Show_UI_Event(UIConfig.BattleResult, new BattleResultArguments { DungeonId = dungeonId, BattleResult = resultType, First = first }); EventDispatcher.Instance.DispatchEvent(e); var player = ObjManager.Instance.MyPlayer; if (null == player) { Logger.Error("EnterScene null == player"); return; } player.LeaveAutoCombat(); }
public IEnumerator DungeonCompleteCoroutine(FubenResult result) { var e1 = new DungeonFightOver(); EventDispatcher.Instance.DispatchEvent(e1); EventDispatcher.Instance.DispatchEvent(new ActivityAndDungeonCombatResultEvent((eDungeonCompleteType)result.CompleteType)); if (result.FubenId == GameUtils.GetElfModelDisplayFubenId()) { // 特殊处理 yield return(new WaitForSeconds(0.8f)); UIManager.Instance.GetController(UIConfig.ElfUI).CallFromOtherClass("ElfDisplay", null); yield break; } var fubenId = result.FubenId; var tbFuben = Table.GetFuben(fubenId); var assistType = (eDungeonAssistType)tbFuben.AssistType; if (assistType == eDungeonAssistType.ClimbingTower) { yield return(new WaitForSeconds(0.5f)); } else { yield return(new WaitForSeconds(GameUtils.DungeonShowDelay / 1000.0f)); } var completeType = (eDungeonCompleteType)result.CompleteType; var useSec = result.UseSeconds; var args = result.Args; var drawResult = result.Draw; var eraId = result.EraId; var tbScene = Table.GetScene(GameLogic.Instance.Scene.SceneTypeId); if (tbScene != null && tbScene.FubenId != fubenId) { yield break; } if (completeType == eDungeonCompleteType.Success) { PlatformHelper.UMEvent("Fuben", "Complete", fubenId); } var e2 = new DungeonFightOverLater(); EventDispatcher.Instance.DispatchEvent(e2); switch (assistType) { case eDungeonAssistType.Story: //剧情副本 { if (completeType == eDungeonCompleteType.Success) { var e = new Show_UI_Event(UIConfig.DungeonResult, new DungeonResultArguments { FubenId = fubenId, Second = useSec, DrawId = drawResult.DrawId, DrawIndex = drawResult.SelectIndex, EraId = eraId }); EventDispatcher.Instance.DispatchEvent(e); } } break; case eDungeonAssistType.Team: //组队副本 { if (completeType == eDungeonCompleteType.Success) { { var e = new Show_UI_Event(UIConfig.DungeonRewardFrame, new DungeonRewardArguments { Seconds = useSec, FubenId = fubenId }); EventDispatcher.Instance.DispatchEvent(e); } { var e = new UIEvent_DungeonReward(result.Draw); EventDispatcher.Instance.DispatchEvent(e); } } } break; case eDungeonAssistType.DevilSquare: //恶魔广场 case eDungeonAssistType.BloodCastle: //血色城堡 { var e = new Show_UI_Event(UIConfig.ActivityRewardFrame, new ActivityRewardArguments { Seconds = useSec, CompleteType = completeType, PlayerLevel = args[0], FubenId = fubenId }); EventDispatcher.Instance.DispatchEvent(e); } break; case eDungeonAssistType.WorldBoss: //世界boss { var e = new Show_UI_Event(UIConfig.BossRewardFrame, new BossRewardArguments { Seconds = useSec, CompleteType = completeType, Items = drawResult.Items }); EventDispatcher.Instance.DispatchEvent(e); } break; case eDungeonAssistType.CityExpMulty: case eDungeonAssistType.CityGoldSingle: case eDungeonAssistType.CityExpSingle: case eDungeonAssistType.FrozenThrone: case eDungeonAssistType.OrganRoom: case eDungeonAssistType.CastleCraft1: case eDungeonAssistType.CastleCraft2: case eDungeonAssistType.CastleCraft3: case eDungeonAssistType.CastleCraft4: case eDungeonAssistType.CastleCraft5: case eDungeonAssistType.CastleCraft6: case eDungeonAssistType.AllianceWar: { if (args.Count > 0) { if (fubenId == 6100 || fubenId == 1019 || fubenId == 1050 || fubenId == 1020 || fubenId == 1021 || fubenId == 1022 || fubenId == 1023 || fubenId == 1030) { var e = new Show_UI_Event(UIConfig.DungeonResult, new DungeonResultArguments { FubenId = fubenId, Second = useSec, EraId = result.EraId }); EventDispatcher.Instance.DispatchEvent(e); var evn = new UIEvent_NewCityDungeonResult((int)completeType, result.SceneAddExp, fubenId, useSec, args); EventDispatcher.Instance.DispatchEvent(evn); } else { var e = new Show_UI_Event(UIConfig.DungeonResult, new DungeonResultArguments { FubenId = fubenId, Second = useSec, EraId = result.EraId }); EventDispatcher.Instance.DispatchEvent(e); var leaderName = ""; if (result.Strs.Count > 0) { leaderName = result.Strs[0]; } var evn = new UIEvent_CityDungeonResult(useSec, args, leaderName); EventDispatcher.Instance.DispatchEvent(evn); } } } break; case eDungeonAssistType.MieShiWar: { if (completeType == eDungeonCompleteType.Success) { if (args.Count > 0) { Show_UI_Event eventMonster = new Show_UI_Event(UIConfig.MishiResultUI, new DungeonResultArguments { FubenId = fubenId, Second = useSec, EraId = result.EraId }); EventDispatcher.Instance.DispatchEvent(eventMonster); } } else { if (args.Count > 0) { Show_UI_Event eventMonster = new Show_UI_Event(UIConfig.MishiResultUI, new DungeonResultArguments { FubenId = fubenId, Second = useSec, EraId = result.EraId }); EventDispatcher.Instance.DispatchEvent(eventMonster); } } var leaderName = ""; if (result.Strs.Count > 0) { leaderName = result.Strs[0]; } var evn = new UIEvent_CityDungeonResult(useSec, args, leaderName); EventDispatcher.Instance.DispatchEvent(evn); } break; case eDungeonAssistType.ClimbingTower: { var e = new Show_UI_Event(UIConfig.ClimbingTowerRewardUI, new TowerRewardUIArguments { Result = (int)completeType, FubenId = result.FubenId, IsFirst = args[0] }); EventDispatcher.Instance.DispatchEvent(e); } break; case eDungeonAssistType.Chiji: { var e = new Show_UI_Event(UIConfig.ChickenRewardUI, new ChickenRewardUIArgument { FubenId = result.FubenId, Rank = result.Args[0], Items = result.Draw.Items }); EventDispatcher.Instance.DispatchEvent(e); } break; default: break; } }
public IEnumerator DungeonCompleteCoroutine(FubenResult result) { var e1 = new DungeonFightOver(); EventDispatcher.Instance.DispatchEvent(e1); yield return(new WaitForSeconds(GameUtils.DungeonShowDelay / 1000.0f)); var fubenId = result.FubenId; var completeType = (eDungeonCompleteType)result.CompleteType; var useSec = result.UseSeconds; var args = result.Args; var drawResult = result.Draw; var tbScene = Table.GetScene(GameLogic.Instance.Scene.SceneTypeId); if (tbScene != null && tbScene.FubenId != fubenId) { yield break; } if (completeType == eDungeonCompleteType.Success) { PlatformHelper.UMEvent("Fuben", "Complete", fubenId); } var tbFuben = Table.GetFuben(fubenId); var assistType = (eDungeonAssistType)tbFuben.AssistType; switch (assistType) { case eDungeonAssistType.Story: //剧情副本 { if (completeType == eDungeonCompleteType.Success) { var e = new Show_UI_Event(UIConfig.DungeonResult, new DungeonResultArguments { FubenId = fubenId, Second = useSec, DrawId = drawResult.DrawId, DrawIndex = drawResult.SelectIndex }); EventDispatcher.Instance.DispatchEvent(e); } } break; case eDungeonAssistType.Team: //组队副本 { { var e = new Show_UI_Event(UIConfig.DungeonRewardFrame, new DungeonRewardArguments { Seconds = useSec, FubenId = fubenId }); EventDispatcher.Instance.DispatchEvent(e); } { var e = new UIEvent_DungeonReward(result.Draw); EventDispatcher.Instance.DispatchEvent(e); } } break; case eDungeonAssistType.DevilSquare: //恶魔广场 case eDungeonAssistType.BloodCastle: //血色城堡 { var e = new Show_UI_Event(UIConfig.ActivityRewardFrame, new ActivityRewardArguments { Seconds = useSec, CompleteType = completeType, PlayerLevel = args[0], FubenId = fubenId }); EventDispatcher.Instance.DispatchEvent(e); } break; case eDungeonAssistType.WorldBoss: //世界boss { var e = new Show_UI_Event(UIConfig.BossRewardFrame, new BossRewardArguments { Seconds = useSec, CompleteType = completeType, Items = drawResult.Items }); EventDispatcher.Instance.DispatchEvent(e); } break; case eDungeonAssistType.CityExpMulty: case eDungeonAssistType.CityGoldSingle: case eDungeonAssistType.CityExpSingle: case eDungeonAssistType.FrozenThrone: case eDungeonAssistType.OrganRoom: case eDungeonAssistType.CastleCraft1: case eDungeonAssistType.CastleCraft2: case eDungeonAssistType.CastleCraft3: case eDungeonAssistType.CastleCraft4: case eDungeonAssistType.CastleCraft5: case eDungeonAssistType.CastleCraft6: case eDungeonAssistType.AllianceWar: { if (args.Count > 0) { var e = new Show_UI_Event(UIConfig.DungeonResult, new DungeonResultArguments { FubenId = fubenId, Second = useSec }); EventDispatcher.Instance.DispatchEvent(e); var leaderName = ""; if (result.Strs.Count > 0) { leaderName = result.Strs[0]; } var evn = new UIEvent_CityDungeonResult(useSec, args, leaderName); EventDispatcher.Instance.DispatchEvent(evn); } } break; case eDungeonAssistType.MieShiWar: { if (completeType == eDungeonCompleteType.Success) { if (args.Count > 0) { Show_UI_Event eventMonster = new Show_UI_Event(UIConfig.MishiResultUI, new DungeonResultArguments { FubenId = fubenId, Second = useSec }); EventDispatcher.Instance.DispatchEvent(eventMonster); } } else { if (args.Count > 0) { Show_UI_Event eventMonster = new Show_UI_Event(UIConfig.MishiResultUI, new DungeonResultArguments { FubenId = fubenId, Second = useSec }); EventDispatcher.Instance.DispatchEvent(eventMonster); } } var leaderName = ""; if (result.Strs.Count > 0) { leaderName = result.Strs[0]; } var evn = new UIEvent_CityDungeonResult(useSec, args, leaderName); EventDispatcher.Instance.DispatchEvent(evn); } break; case eDungeonAssistType.ClimbingTower: { var e = new Show_UI_Event(UIConfig.ClimbingTowerRewardUI, new BlockLayerArguments { Type = (int)completeType }); EventDispatcher.Instance.DispatchEvent(e); } break; default: break; } }