public void InitFightData() { List <FightHeroInfo> fightHeroInfoList = new List <FightHeroInfo>(); for (int i = 0, count = heros.Count; i < count; i++) { FirstFightCharacterData ffcd = heros[i]; if (ffcd.isRole) { PlayerInfo playerInfo = new PlayerInfo((uint)ffcd.id); playerInfo.advanceLevel = ffcd.starLevel; PlayerFightProtoData pfpd = new PlayerFightProtoData(); pfpd.posIndex = (int)ffcd.formationPosition; pfpd.attr = new HeroAttrProtoData(); pfpd.attr.hp = (int)ffcd.hp; pfpd.attr.hpUp = (int)ffcd.hp; FightPlayerInfo fightPlayerInfo = new FightPlayerInfo(playerInfo, pfpd); FightProxy.instance.SetFightPlayerInfo(fightPlayerInfo); } else { HeroInfo heroInfo = new HeroInfo(ffcd.id); heroInfo.advanceLevel = ffcd.starLevel; HeroFightProtoData hfpd = new HeroFightProtoData(); hfpd.posIndex = (int)ffcd.formationPosition; hfpd.attr = new HeroAttrProtoData(); hfpd.attr.hp = (int)ffcd.hp; hfpd.attr.hpUp = (int)ffcd.hp; FightHeroInfo fightHeroInfo = new FightHeroInfo(heroInfo, hfpd); fightHeroInfoList.Add(fightHeroInfo); } } FightProxy.instance.SetFightHeroInfoList(fightHeroInfoList); List <FightHeroInfo> enemyFightHeroInfoList = new List <FightHeroInfo>(); for (int i = 0, count = enemies.Count; i < count; i++) { FirstFightCharacterData ffcd = enemies[i]; HeroInfo heroInfo = new HeroInfo(ffcd.id); heroInfo.advanceLevel = ffcd.starLevel; HeroFightProtoData hfpd = new HeroFightProtoData(); hfpd.posIndex = (int)ffcd.formationPosition; hfpd.attr = new HeroAttrProtoData(); hfpd.attr.hp = (int)ffcd.hp; hfpd.attr.hpUp = (int)ffcd.hp; FightHeroInfo fightHeroInfo = new FightHeroInfo(heroInfo, hfpd); enemyFightHeroInfoList.Add(fightHeroInfo); } FightProxy.instance.SetEnemyFightHeroInfoList(enemyFightHeroInfoList); }
public void SetData(TeamFightProtoData myProtoData, TeamFightProtoData enemyProtoData, List <DropItem> dropItems = null) { //my if (myProtoData.player != null) { PlayerInfo playerInfo = GameProxy.instance.PlayerInfo; //new PlayerInfo((uint)myProtoData.player.id, (uint)myProtoData.player.modelId, (uint)myProtoData.player.hairCutId, (uint)myProtoData.player.hairColorId, (uint)myProtoData.player.faceId, myProtoData.player.skinId, string.Empty); fightPlayerInfo = new FightPlayerInfo(playerInfo, myProtoData.player); } fightHeroInfoList = new List <FightHeroInfo>(); HeroFightProtoData data; int count = myProtoData.heros.Count; for (int i = 0; i < count; i++) { data = myProtoData.heros[i]; HeroInfo heroInfo = HeroProxy.instance.GetHeroInfo((uint)data.id); fightHeroInfoList.Add(new FightHeroInfo(heroInfo, data)); } ourFormation = FormationProxy.instance.GetFormationInfo(myProtoData.lineup.no); //enemy PlayerFightProtoData opponentPlayerData = enemyProtoData.player; PlayerInfo enemyPlayer = opponentPlayerData == null ? null : new PlayerInfo((uint)opponentPlayerData.id, (uint)opponentPlayerData.modelId, (uint)opponentPlayerData.hairCutId, (uint)opponentPlayerData.hairColorId, (uint)opponentPlayerData.faceId, opponentPlayerData.skinId, string.Empty); if (enemyPlayer != null) { enemyPlayer.UpdateSkillTalentByProtocol(opponentPlayerData.talnets, opponentPlayerData.selectedTalnet); enemyFightPlayerInfo = new FightPlayerInfo(enemyPlayer, opponentPlayerData); } enemyFightHeroInfoList = new List <FightHeroInfo>(); count = enemyProtoData.heros.Count; for (int i = 0; i < count; i++) { data = enemyProtoData.heros[i]; HeroInfo enemyHero = new HeroInfo((uint)data.id, data.modelId, 1, 0, data.star, 1); enemyFightHeroInfoList.Add(new FightHeroInfo(enemyHero, data)); } enemyFormation = new FormationInfo(enemyProtoData.lineup.no, enemyProtoData.lineup.lv); enemyFormation.isActiveAdditionAttr = enemyProtoData.lineup.attrIsActive; //drop if (dropItems != null) { this.dropItems = new List <DropItem>(dropItems); } Logic.UI.FightResult.Model.FightResultProxy.instance.SaveLastTeamData(); }
public void ClickSkillDisplayHandler() { // Logic.UI.Tips.View.CommonAutoDestroyTipsView.Open("暂未开放"); // return; Dictionary <RoleAttributeType, RoleAttribute> attrDic = RoleUtil.CalcRoleAttributesDic(_roleInfo); if (_roleInfo is PlayerInfo) { PlayerFightProtoData pfpd = new PlayerFightProtoData(); pfpd.posIndex = 5; pfpd.attr = new HeroAttrProtoData(); pfpd.attr.hpUp = pfpd.attr.hp = (int)attrDic.GetValue(RoleAttributeType.HP).value; pfpd.attr.magic_atk = (int)attrDic.GetValue(RoleAttributeType.MagicAtk).value; pfpd.attr.normal_atk = (int)attrDic.GetValue(RoleAttributeType.NormalAtk).value; pfpd.attr.normal_def = pfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.Normal_Def).value; //pfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.m).value; pfpd.attr.speed = (int)attrDic.GetValue(RoleAttributeType.Speed).value; pfpd.attr.hit = (int)attrDic.GetValue(RoleAttributeType.Hit).value; pfpd.attr.dodge = (int)attrDic.GetValue(RoleAttributeType.Dodge).value; pfpd.attr.crit = (int)attrDic.GetValue(RoleAttributeType.Crit).value; pfpd.attr.anti_crit = (int)attrDic.GetValue(RoleAttributeType.AntiCrit).value; pfpd.attr.block = (int)attrDic.GetValue(RoleAttributeType.Block).value; pfpd.attr.anti_block = (int)attrDic.GetValue(RoleAttributeType.AntiBlock).value; pfpd.attr.counter_atk = (int)attrDic.GetValue(RoleAttributeType.CounterAtk).value; pfpd.attr.crit_hurt_add = (int)attrDic.GetValue(RoleAttributeType.CritHurtAdd).value; pfpd.attr.crit_hurt_dec = (int)attrDic.GetValue(RoleAttributeType.CritHurtDec).value; pfpd.attr.armor = (int)attrDic.GetValue(RoleAttributeType.Armor).value; pfpd.attr.damage_add = (int)attrDic.GetValue(RoleAttributeType.DamageAdd).value; pfpd.attr.damage_dec = (int)attrDic.GetValue(RoleAttributeType.DamageDec).value; //pfpd.attr.hit = 100; FightPlayerInfo fightPlayerInfo = new FightPlayerInfo(_roleInfo as PlayerInfo, pfpd); FightProxy.instance.SetFightPlayerInfo(fightPlayerInfo); FightProxy.instance.SetFightHeroInfoList(new List <FightHeroInfo>()); } else { HeroFightProtoData hfpd = new HeroFightProtoData(); hfpd.posIndex = 5; hfpd.attr = new HeroAttrProtoData(); hfpd.attr.hp = hfpd.attr.hpUp = (int)attrDic.GetValue(RoleAttributeType.HP).value; hfpd.attr.magic_atk = (int)attrDic.GetValue(RoleAttributeType.MagicAtk).value; hfpd.attr.normal_atk = (int)attrDic.GetValue(RoleAttributeType.NormalAtk).value; hfpd.attr.normal_def = hfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.Normal_Def).value; //pfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.m).value; hfpd.attr.speed = (int)attrDic.GetValue(RoleAttributeType.Speed).value; hfpd.attr.hit = (int)attrDic.GetValue(RoleAttributeType.Hit).value; hfpd.attr.dodge = (int)attrDic.GetValue(RoleAttributeType.Dodge).value; hfpd.attr.crit = (int)attrDic.GetValue(RoleAttributeType.Crit).value; hfpd.attr.anti_crit = (int)attrDic.GetValue(RoleAttributeType.AntiCrit).value; hfpd.attr.block = (int)attrDic.GetValue(RoleAttributeType.Block).value; hfpd.attr.anti_block = (int)attrDic.GetValue(RoleAttributeType.AntiBlock).value; hfpd.attr.counter_atk = (int)attrDic.GetValue(RoleAttributeType.CounterAtk).value; hfpd.attr.crit_hurt_add = (int)attrDic.GetValue(RoleAttributeType.CritHurtAdd).value; hfpd.attr.crit_hurt_dec = (int)attrDic.GetValue(RoleAttributeType.CritHurtDec).value; hfpd.attr.armor = (int)attrDic.GetValue(RoleAttributeType.Armor).value; hfpd.attr.damage_add = (int)attrDic.GetValue(RoleAttributeType.DamageAdd).value; hfpd.attr.damage_dec = (int)attrDic.GetValue(RoleAttributeType.DamageDec).value; //hfpd.attr.hit = 100; FightHeroInfo fightHeroInfo = new FightHeroInfo(_roleInfo as HeroInfo, hfpd); List <FightHeroInfo> heroInfoList = new List <FightHeroInfo>(); heroInfoList.Add(fightHeroInfo); FightProxy.instance.SetFightHeroInfoList(heroInfoList); } //enemy HeroInfo enemyHero = new HeroInfo(HeroData.HeroDataDictionary.First().Key); HeroFightProtoData ehfpd = new HeroFightProtoData(); ehfpd.posIndex = 5; ehfpd.attr = new HeroAttrProtoData(); ehfpd.attr.hp = ehfpd.attr.hpUp = 100000; // ehfpd.attr.magic_atk = 1; // ehfpd.attr.normal_atk = 1; ehfpd.attr.speed = 25; FightHeroInfo efightHeroInfo = new FightHeroInfo(enemyHero, ehfpd); List <FightHeroInfo> eheroInfoList = new List <FightHeroInfo>(); eheroInfoList.Add(efightHeroInfo); FightProxy.instance.SetEnemyFightHeroInfoList(eheroInfoList); UI.UIMgr.instance.Close(Logic.UI.EUISortingLayer.MainUI); FightController.instance.fightType = Logic.Enums.FightType.SkillDisplay; Logic.UI.LoadGame.Controller.LoadGameController.instance.SetDelayTime(0.5f, LoadFinishedCallback); }
public FightPlayerInfo(PlayerInfo playerInfo, PlayerFightProtoData pvePlayerData) { this.playerInfo = playerInfo; this.pvePlayerProtoData = pvePlayerData; }
public static void ClickIllustrationSkillDisplayHandler(LuaTable roleInfoLuaTable, bool isPlayer) { RoleInfo _roleInfo = null; if (isPlayer) { _roleInfo = new PlayerInfo(roleInfoLuaTable); } else { _roleInfo = new HeroInfo(roleInfoLuaTable); } Dictionary <RoleAttributeType, RoleAttribute> attrDic = RoleUtil.CalcRoleAttributesDic(_roleInfo); if (_roleInfo is PlayerInfo) { PlayerFightProtoData pfpd = new PlayerFightProtoData(); pfpd.posIndex = 5; pfpd.attr = new HeroAttrProtoData(); pfpd.attr.hpUp = pfpd.attr.hp = (int)attrDic.GetValue(RoleAttributeType.HP).value; pfpd.attr.magic_atk = (int)attrDic.GetValue(RoleAttributeType.MagicAtk).value; pfpd.attr.normal_atk = (int)attrDic.GetValue(RoleAttributeType.NormalAtk).value; pfpd.attr.normal_def = pfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.Normal_Def).value; //pfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.m).value; pfpd.attr.speed = (int)attrDic.GetValue(RoleAttributeType.Speed).value; pfpd.attr.hit = (int)attrDic.GetValue(RoleAttributeType.Hit).value; pfpd.attr.dodge = (int)attrDic.GetValue(RoleAttributeType.Dodge).value; pfpd.attr.crit = (int)attrDic.GetValue(RoleAttributeType.Crit).value; pfpd.attr.anti_crit = (int)attrDic.GetValue(RoleAttributeType.AntiCrit).value; pfpd.attr.block = (int)attrDic.GetValue(RoleAttributeType.Block).value; pfpd.attr.anti_block = (int)attrDic.GetValue(RoleAttributeType.AntiBlock).value; pfpd.attr.counter_atk = (int)attrDic.GetValue(RoleAttributeType.CounterAtk).value; pfpd.attr.crit_hurt_add = (int)attrDic.GetValue(RoleAttributeType.CritHurtAdd).value; pfpd.attr.crit_hurt_dec = (int)attrDic.GetValue(RoleAttributeType.CritHurtDec).value; pfpd.attr.armor = (int)attrDic.GetValue(RoleAttributeType.Armor).value; pfpd.attr.damage_add = (int)attrDic.GetValue(RoleAttributeType.DamageAdd).value; pfpd.attr.damage_dec = (int)attrDic.GetValue(RoleAttributeType.DamageDec).value; //pfpd.attr.hit = 100; FightPlayerInfo fightPlayerInfo = new FightPlayerInfo(_roleInfo as PlayerInfo, pfpd); FightProxy.instance.SetFightPlayerInfo(fightPlayerInfo); FightProxy.instance.SetFightHeroInfoList(new List <FightHeroInfo>()); } else { HeroFightProtoData hfpd = new HeroFightProtoData(); hfpd.posIndex = 5; hfpd.attr = new HeroAttrProtoData(); hfpd.attr.hp = hfpd.attr.hpUp = (int)attrDic.GetValue(RoleAttributeType.HP).value; hfpd.attr.magic_atk = (int)attrDic.GetValue(RoleAttributeType.MagicAtk).value; hfpd.attr.normal_atk = (int)attrDic.GetValue(RoleAttributeType.NormalAtk).value; hfpd.attr.normal_def = hfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.Normal_Def).value; //pfpd.attr.magic_def = (int)attrDic.GetValue(RoleAttributeType.m).value; hfpd.attr.speed = (int)attrDic.GetValue(RoleAttributeType.Speed).value; hfpd.attr.hit = (int)attrDic.GetValue(RoleAttributeType.Hit).value; hfpd.attr.dodge = (int)attrDic.GetValue(RoleAttributeType.Dodge).value; hfpd.attr.crit = (int)attrDic.GetValue(RoleAttributeType.Crit).value; hfpd.attr.anti_crit = (int)attrDic.GetValue(RoleAttributeType.AntiCrit).value; hfpd.attr.block = (int)attrDic.GetValue(RoleAttributeType.Block).value; hfpd.attr.anti_block = (int)attrDic.GetValue(RoleAttributeType.AntiBlock).value; hfpd.attr.counter_atk = (int)attrDic.GetValue(RoleAttributeType.CounterAtk).value; hfpd.attr.crit_hurt_add = (int)attrDic.GetValue(RoleAttributeType.CritHurtAdd).value; hfpd.attr.crit_hurt_dec = (int)attrDic.GetValue(RoleAttributeType.CritHurtDec).value; hfpd.attr.armor = (int)attrDic.GetValue(RoleAttributeType.Armor).value; hfpd.attr.damage_add = (int)attrDic.GetValue(RoleAttributeType.DamageAdd).value; hfpd.attr.damage_dec = (int)attrDic.GetValue(RoleAttributeType.DamageDec).value; //hfpd.attr.hit = 100; FightHeroInfo fightHeroInfo = new FightHeroInfo(_roleInfo as HeroInfo, hfpd); List <FightHeroInfo> heroInfoList = new List <FightHeroInfo>(); heroInfoList.Add(fightHeroInfo); FightProxy.instance.SetFightHeroInfoList(heroInfoList); } //enemy HeroInfo enemyHero = new HeroInfo(HeroData.HeroDataDictionary.First().Key); HeroFightProtoData ehfpd = new HeroFightProtoData(); ehfpd.posIndex = 5; ehfpd.attr = new HeroAttrProtoData(); ehfpd.attr.hp = ehfpd.attr.hpUp = 100000; // ehfpd.attr.magic_atk = 1; // ehfpd.attr.normal_atk = 1; ehfpd.attr.speed = 25; FightHeroInfo efightHeroInfo = new FightHeroInfo(enemyHero, ehfpd); List <FightHeroInfo> eheroInfoList = new List <FightHeroInfo>(); eheroInfoList.Add(efightHeroInfo); FightProxy.instance.SetEnemyFightHeroInfoList(eheroInfoList); UIMgr.instance.CloseLayerBelow(Logic.UI.EUISortingLayer.FlyWord); FightController.instance.fightType = Logic.Enums.FightType.SkillDisplay; Logic.UI.LoadGame.Controller.LoadGameController.instance.SetDelayTime(0.5f, () => { FightController.instance.ReadyFight(); }); }