public void StartFight() { int count = this.StaticActors.get_Count(); for (int i = 0; i < count; i++) { this.AddActor(this.StaticActors.get_Item(i)); } int count2 = this.DynamicActors.get_Count(); for (int j = 0; j < count2; j++) { this.AddActor(this.DynamicActors.get_Item(j)); } int count3 = this.GameActors.get_Count(); for (int k = 0; k < count3; k++) { this.GameActors.get_Item(k).get_handle().StartFight(); } if (Singleton <BattleLogic> .GetInstance().m_LevelContext.IsGameTypeBurning()) { int curSelected_BuffId = (int)Singleton <BurnExpeditionController> .GetInstance().model.Get_CurSelected_BuffId(); BurnExpeditionUT.ApplyBuff(this.DynamicActors, curSelected_BuffId); if (Singleton <CBattleSystem> .get_instance().FightForm != null) { Singleton <CBattleSystem> .get_instance().FightForm.GetBattleMisc().Show_BuffCD(0, BurnExpeditionUT.Get_Buff_CDTime(curSelected_BuffId)); } } this.StaticActors.Clear(); this.DynamicActors.Clear(); }
public static uint Get_BloodTH(ActorRoot actor) { if (actor == null || actor.ValueComponent == null) { return(0u); } return(BurnExpeditionUT.Get_BloodTH((uint)actor.ValueComponent.actorHp, (uint)actor.ValueComponent.actorHpTotal)); }
public static void Build_Burn_BattleParam(COMDT_SINGLE_GAME_PARAM param, bool bClickGameOver) { param.bGameType = 7; PlayerKDA hostKDA = Singleton <BattleStatistic> .GetInstance().m_playerKDAStat.GetHostKDA(); if (hostKDA == null) { DebugHelper.Assert(hostKDA != null, "Failed find player kda"); Singleton <BattleStatistic> .instance.m_playerKDAStat.DumpDebugInfo(); return; } ListView <HeroKDA> .Enumerator enumerator = hostKDA.GetEnumerator(); if (!bClickGameOver) { while (enumerator.MoveNext()) { int configId = enumerator.Current.actorHero.handle.TheActorMeta.ConfigId; Singleton <BurnExpeditionController> .GetInstance().model.SetHero_Hp((uint)configId, (int)BurnExpeditionUT.Get_BloodTH(enumerator.Current.actorHero.handle)); } } param.stGameDetail.stBurning = new COMDT_BURNING_ENEMY_HERO_DETAIL(); COMDT_BURNING_HERO_INFO[] astHeroList = param.stGameDetail.stBurning.astHeroList; List <PoolObjHandle <ActorRoot> > heroActors = Singleton <GameObjMgr> .GetInstance().HeroActors; int num = 0; for (int i = 0; i < heroActors.get_Count(); i++) { ActorRoot handle = heroActors.get_Item(i).handle; if (!handle.IsHostCamp()) { astHeroList[num].dwHeroID = (uint)handle.TheActorMeta.ConfigId; bool flag = handle.ValueComponent.actorHp == 0; uint num2; byte bIsDead; if (flag) { num2 = 0u; bIsDead = 1; } else { num2 = BurnExpeditionUT.Get_BloodTH(handle); bIsDead = 0; } astHeroList[num].dwBloodTTH = num2; astHeroList[num].bIsDead = bIsDead; if (!bClickGameOver) { BurnExpeditionUT.Record_EnemyHero_HPInfo(handle.TheActorMeta.ConfigId, num2); } num++; } } param.stGameDetail.stBurning.bHeroNum = (byte)num; }
public void Init() { this.map_fromScript = Singleton <CUIManager> .GetInstance().OpenForm(BurnExpeditionController.Map_FormPath, false, true); this.mapNode = Utility.FindChild(this.map_fromScript.gameObject, "mapNode/map"); this.animationScript = Utility.GetComponetInChild <CUIAnimatorScript>(this.mapNode, "Panel_Pointer"); for (int i = 0; i < this.mapNode.transform.childCount; i++) { if (this.mapNode.transform.GetChild(i).name.IndexOf("level") != -1) { this.levelNodeList.Add(null); } if (this.mapNode.transform.GetChild(i).name.IndexOf("box") != -1) { this.boxNodeList.Add(null); } } for (int j = 0; j < this.mapNode.transform.childCount; j++) { GameObject gameObject = this.mapNode.transform.GetChild(j).gameObject; if (gameObject.name.IndexOf("Panel") == -1) { gameObject.CustomSetActive(false); int index = BurnExpeditionUT.GetIndex(gameObject.name); if (gameObject.name.IndexOf("level") != -1) { this.levelNodeList.set_Item(index - 1, gameObject); } else if (gameObject.name.IndexOf("box") != -1) { this.boxNodeList.set_Item(index - 1, gameObject); } } } this.resetNumText = Utility.GetComponetInChild <Text>(this.map_fromScript.gameObject, "mapNode/toolbar/Info"); this.coinText = Utility.GetComponetInChild <Text>(this.map_fromScript.gameObject, "mapNode/toolbar/Coin/num"); this.enemyNode = Utility.FindChild(this.map_fromScript.gameObject, "enemyNode"); this.enemy_node_0 = Utility.FindChild(this.enemyNode, "Heros/hero_0"); this.enemy_node_1 = Utility.FindChild(this.enemyNode, "Heros/hero_1"); this.enemy_node_2 = Utility.FindChild(this.enemyNode, "Heros/hero_2"); this.buffNode = Utility.FindChild(this.map_fromScript.gameObject, "enemyNode/Buffs"); this.buff_node_0 = Utility.FindChild(this.buffNode, "buff_0"); this.buff_node_1 = Utility.FindChild(this.buffNode, "buff_1"); this.buff_node_2 = Utility.FindChild(this.buffNode, "buff_2"); this.nameText = Utility.GetComponetInChild <Text>(this.enemyNode, "PlayerIcon/Name"); this.levelText = Utility.GetComponetInChild <Text>(this.enemyNode, "PlayerIcon/level"); this.HttpImage = Utility.GetComponetInChild <CUIHttpImageScript>(this.enemyNode, "PlayerIcon/pnlSnsHead/HttpImage"); this.SymbolLevel = Utility.FindChild(this.enemyNode, "PlayerIcon/SymbolLevel"); this.mapNode.transform.parent.gameObject.CustomSetActive(true); this.SetEnemyNodeShow(false); this.Show_Line(0); }
private void On_Burn_LevelButton(CUIEvent uievent) { int levelNo = BurnExpeditionUT.GetIndex(uievent.m_srcWidget.name) - 1; if (this.model.Get_LevelStatus(levelNo) == COM_LEVEL_STATUS.COM_LEVEL_STATUS_UNLOCKED) { this.model.curSelect_LevelIndex = levelNo; if (this.view != null) { this.view.Show_ENEMY(this.model.curSelect_LevelIndex); } } }
private void On_Burn_BuffClick(CUIEvent uievent) { int index = BurnExpeditionUT.GetIndex(uievent.m_srcWidget.name); if (this.model.curSelect_BuffIndex != index) { this.model.curSelect_BuffIndex = index; if (this.view != null) { this.view._Show_Buff_Selected_Index(index); } } }
private void On_Burn_LevelButton(CUIEvent uievent) { int num = BurnExpeditionUT.GetIndex(uievent.m_srcWidget.name) - 1; if (this.model.Get_LevelStatus(num) != 1) { return; } this.model.curSelect_LevelIndex = num; if (this.view != null) { this.view.Show_ENEMY(this.model.curSelect_LevelIndex); } }
public static void Handle_Burn_Settle(ref SCPKG_SINGLEGAMEFINRSP rsp) { if (rsp.iErrCode == 0) { bool flag = rsp.stDetail.stGameInfo.bGameResult == 1; if (flag) { BurnExpeditionUT.Finish_Level(Singleton <BurnExpeditionController> .GetInstance().model.curSelect_LevelIndex); } } else { Singleton <CUIManager> .GetInstance().OpenMessageBox(string.Format(UT.GetText("Burn_Error_Settle_Failed"), rsp.iErrCode), false); } }
private void On_Burn_Challenge(CUIEvent uievent) { CSDT_SINGLE_GAME_OF_BURNING reportInfo = BurnExpeditionUT.Create_CSDT_SINGLE_GAME_OF_BURNING(this.model.curSelect_LevelIndex); ResLevelCfgInfo info = BurnExpeditionUT.Get_LevelConfigInfo(Singleton <BurnExpeditionController> .instance.model.curSelect_LevelIndex); DebugHelper.Assert(info != null); if (info != null) { byte iHeroNum = (byte)info.iHeroNum; uint dwBattleListID = info.dwBattleListID; Singleton <CHeroSelectBaseSystem> .instance.SetPVEDataWithBurnExpedition(dwBattleListID, reportInfo, StringHelper.UTF8BytesToString(ref info.szName)); Singleton <CHeroSelectBaseSystem> .instance.OpenForm(enSelectGameType.enBurning, iHeroNum, 0, 0, 0); } }
private void On_Burn_Challenge(CUIEvent uievent) { CSDT_SINGLE_GAME_OF_BURNING reportInfo = BurnExpeditionUT.Create_CSDT_SINGLE_GAME_OF_BURNING(this.model.curSelect_LevelIndex); ResLevelCfgInfo info = BurnExpeditionUT.Get_LevelConfigInfo(Singleton <BurnExpeditionController> .instance.model.curSelect_LevelIndex); DebugHelper.Assert(info != null); if (info != null) { byte iHeroNum = (byte)info.iHeroNum; uint dwBattleListID = info.dwBattleListID; Singleton <CHeroSelectSystem> .GetInstance().SetPVEDataWithBurnExpedition(iHeroNum, dwBattleListID, reportInfo, StringHelper.UTF8BytesToString(ref info.szName)); stUIEventParams par = new stUIEventParams { heroSelectGameType = enSelectHeroType.enBurning }; Singleton <CUIEventManager> .GetInstance().DispatchUIEvent(enUIEventID.HeroSelect_OpenForm, par); } }
public static void ApplyHP2Game(List <PoolObjHandle <ActorRoot> > actorList) { List <PoolObjHandle <ActorRoot> > .Enumerator enumerator = actorList.GetEnumerator(); while (enumerator.MoveNext()) { PoolObjHandle <ActorRoot> current = enumerator.get_Current(); current.handle.ActorControl.bForceNotRevive = true; IGameActorDataProvider actorDataProvider = Singleton <ActorDataCenter> .instance.GetActorDataProvider(GameActorDataProviderType.ServerDataProvider); ActorServerData actorServerData = default(ActorServerData); IGameActorDataProvider gameActorDataProvider = actorDataProvider; PoolObjHandle <ActorRoot> current2 = enumerator.get_Current(); gameActorDataProvider.GetActorServerData(ref current2.handle.TheActorMeta, ref actorServerData); PoolObjHandle <ActorRoot> current3 = enumerator.get_Current(); int actorHpTotal = current3.handle.ValueComponent.actorHpTotal; int actorHp = (int)BurnExpeditionUT.Convert_FactHP(actorServerData.TheBurnInfo.HeroRemainingHp, (uint)actorHpTotal); PoolObjHandle <ActorRoot> current4 = enumerator.get_Current(); current4.handle.ValueComponent.actorHp = actorHp; } }
private void On_Burn_BoxButton(CUIEvent uievent) { this.model.curSelect_BoxIndex = BurnExpeditionUT.GetIndex(uievent.m_srcWidget.name) - 1; byte levelNo = this.model.Get_LevelNo(this.model.curSelect_BoxIndex); int levelID = this.model.Get_LevelID(this.model.curSelect_BoxIndex); if (uievent.m_srcWidget.transform.FindChild("current_node").gameObject.activeSelf) { uint num3; uint num4; if (this.model.Get_Box_Info(Singleton <CRoleInfoManager> .instance.GetMasterRoleInfo().Level, this.model.curSelect_BoxIndex, out num3, out num4)) { this.view.Check_Box_Info(num3, num4); } } else if (this.model.Get_ChestRewardStatus(this.model.curSelect_BoxIndex) == COM_LEVEL_STATUS.COM_LEVEL_STATUS_UNLOCKED) { BurnExpeditionNetCore.Send_GET_BURNING_REWARD_REQ(levelNo, levelID); } }
public void PrepareFight() { int count = this.StaticActors.get_Count(); for (int i = 0; i < count; i++) { this.StaticActors.get_Item(i).get_handle().InitActor(); this.StaticActors.get_Item(i).get_handle().PrepareFight(); } int count2 = this.DynamicActors.get_Count(); for (int j = 0; j < count2; j++) { this.DynamicActors.get_Item(j).get_handle().InitActor(); this.DynamicActors.get_Item(j).get_handle().PrepareFight(); } if (Singleton <BattleLogic> .GetInstance().m_LevelContext.IsGameTypeBurning()) { BurnExpeditionUT.ApplyHP2Game(this.DynamicActors); } }
private void On_Burn_BoxButton(CUIEvent uievent) { this.model.curSelect_BoxIndex = BurnExpeditionUT.GetIndex(uievent.m_srcWidget.name) - 1; byte levelNo = this.model.Get_LevelNo(this.model.curSelect_BoxIndex); int levelID = this.model.Get_LevelID(this.model.curSelect_BoxIndex); bool activeSelf = uievent.m_srcWidget.transform.FindChild("current_node").gameObject.activeSelf; if (activeSelf) { uint goldNum; uint burn_num; bool flag = this.model.Get_Box_Info(Singleton <CRoleInfoManager> .get_instance().GetMasterRoleInfo().Level, this.model.curSelect_BoxIndex, out goldNum, out burn_num); if (flag) { this.view.Check_Box_Info(goldNum, burn_num); } } else if (this.model.Get_ChestRewardStatus(this.model.curSelect_BoxIndex) == 1) { BurnExpeditionNetCore.Send_GET_BURNING_REWARD_REQ(levelNo, levelID); } }
public void PrepareFight() { int count = this.StaticActors.get_Count(); for (int i = 0; i < count; i++) { this.StaticActors.get_Item(i).handle.InitActor(); this.StaticActors.get_Item(i).handle.PrepareFight(); } int count2 = this.DynamicActors.get_Count(); for (int j = 0; j < count2; j++) { this.DynamicActors.get_Item(j).handle.InitActor(); this.DynamicActors.get_Item(j).handle.PrepareFight(); } if (Singleton <BattleLogic> .GetInstance().m_LevelContext.IsGameTypeBurning()) { BurnExpeditionUT.ApplyHP2Game(this.DynamicActors); } if (Singleton <WatchController> .GetInstance().CanShowActorIRPosMap()) { if (this.PositionCamp1Records == null) { this.PositionCamp1Records = new List <Vector3>(); } if (this.PositionCamp2Records == null) { this.PositionCamp2Records = new List <Vector3>(); } if (this.PositionCampTotalRecords == null) { this.PositionCampTotalRecords = new List <Vector3>(); } this.PositionCamp1Records.Clear(); this.PositionCamp2Records.Clear(); this.PositionCampTotalRecords.Clear(); } }
public bool Get_Box_Info(uint playerLevel, int levelIndex, out uint goldNum, out uint burnNum) { burnNum = 0; object[] rawDatas = GameDataMgr.burnRewrad.RawDatas; int length = rawDatas.Length; for (int i = 0; i < length; i++) { ResBurningReward reward = rawDatas[i] as ResBurningReward; if (((reward != null) && (reward.dwAcntLevel == playerLevel)) && (reward.iLevelID == BurnExpeditionUT.GetLevelCFGID(levelIndex))) { goldNum = reward.dwRewardCoin; burnNum = reward.dwBurningCoin; return(true); } } goldNum = 0; burnNum = 0; return(false); }
public static uint Get_BloodTH(uint curHP, uint max) { return(BurnExpeditionUT.Convert_BloodTH(curHP, max)); }