/// /// 判定是否为第16关的boss 属性克制 /// bool isGuide16Floor(Item curItem, BanBattleManager battleMgr) { bool found = false; NewFloor floor = Core.Data.newDungeonsManager.curFightingFloor; if (floor != null && floor.config.ID == 60116) { BanBattleRole curBattleRole = battleMgr.GetBattleRole(curItem.defenseIndex); if (curBattleRole != null) { if (curBattleRole.isBoss == (short)1) { if (curItem.period == Period.AttributeConflict) { AccountConfigManager accMgr = Core.Data.AccountMgr; if (accMgr.UserConfig.ShengWuZhe == (short)0) { ConsoleEx.DebugLog("isGuide16Floor is going", ConsoleEx.RED); accMgr.UserConfig.ShengWuZhe = 1; accMgr.save(); found = true; } } } } } return(found); }
//读取资料(角色信息,玩家名称) public void ReadData(List <BanBattleRole> list, string playerName) { LeftIsAttOrDef(); ReadFirstRole(list[0]); ReadRoleNum(list.Count, list.Count); //Generate Team if (BanBattleManager.Instance.IsReplay) { foreach (BanBattleRoleIcon icon in list_Team) { GameObject.Destroy(icon.gameObject); } list_Team.Clear(); angrySlot.curAP = 0; } for (int i = 0; i < list.Count; i++) { BanBattleRole tempRole = list[i]; Vector3 pos = GetTeamIconPos(i); BanBattleRoleIcon tempRoleIcon = GenerateRoleIcon(pos, go_TeamStartPos.transform); tempRoleIcon.transform.localScale = new Vector3(0.7f, 0.7f, 0.7f); if (i == 0) { tempRoleIcon.ReadData(tempRole, true); } else { tempRoleIcon.ReadData(tempRole); } tempRoleIcon.go_RoleName.SetActive(false); if (!IsAttack) { tempRoleIcon.text_Level.gameObject.SetActive(false); } list_Team.Add(tempRoleIcon); } }
public void SetData(BanBattleRole roleInfo, bool showAttack) { AtlasMgr.mInstance.SetHeadSprite(_head, roleInfo.number.ToString()); _head.MakePixelPerfect(); _level.text = "Lv" + roleInfo.level; att.spriteName = BanTools.GetAttributeName(roleInfo.initAttri); border.spriteName = BanTools.GetAttributeBorderName(roleInfo.initAttri); _power.text = "" + (roleInfo.group == BanBattleRole.Group.Attack ? roleInfo.attackBP : roleInfo.defenseBP); _name.text = Core.Data.monManager.getMonsterByNum(roleInfo.number).name; if (showAttack) { _part.spriteName = "common-0008"; } else { _part.spriteName = "common-0010"; } }
public void ReadData(BanBattleRole aBanBattleRole, bool isCurrent = false) { AtlasMgr.mInstance.SetHeadSprite(sprite_Role, aBanBattleRole.number.ToString()); sprite_Attribute_Border.spriteName = BanTools.GetAttributeBorderName(aBanBattleRole.attribute); if (!isDie) { sprite_Attribute.spriteName = BanTools.GetAttributeName(aBanBattleRole.attribute); } else { sprite_Attribute.spriteName = BanTools.GetAttributeName(BanBattleRole.Attribute.Unknown); } text_Level.text = "Lv" + aBanBattleRole.level; if (Core.Data.monManager != null) { RoleName.text = Core.Data.monManager.getMonsterByNum(aBanBattleRole.number).name; } banBattleRole = aBanBattleRole; }
int GetSkillAction(int roleIndex, int skill) { BanBattleRole role = GetBattleRole(roleIndex); MonsterData mon = Core.Data.monManager.getMonsterByNum(role.number); if (mon == null || mon.skill == null) { return(-1); } for (int i = 0; i < mon.skill.Length; ++i) { if (skill == mon.skill [i]) { return(mon.anime3D [i]); } } return(-1); }
//读取第一个角色 public void ReadFirstRole(BanBattleRole firstRole) { SetBp(firstRole.finalBp, firstRole.finalBp); curRoleIcon.ReadData(firstRole); SkillObj aSk = null; if (firstRole.angSkObj != null) { aSk = firstRole.angSkObj.Value <SkillObj>(0); } ssMgr.Attend(firstRole.number, firstRole.level, aSk, firstRole.norSkObj); if (IsAttack) { MonsterManager monMgr = Core.Data.monManager; MonsterData md = monMgr.getMonsterByNum(firstRole.number); PlayerAngryBtn.skillId = md == null ? 0 : md.skill.Value <int>(2); PlayerAngryBtn.skillLv = aSk == null ? 1 : aSk.skillLevel; } }
private void WarBegin(CMsgHeader aHeader) { //战斗开始,读取队伍信息,怒气槽等信息 CMsgWarBegin aWarBegin = aHeader as CMsgWarBegin; foreach (AW.Battle.Monster aMonster in aWarBegin.attTeam.team) { BanBattleRole role = new BanBattleRole(aMonster.pveIndex, aMonster.num, BanTools.TransAttributeType(aMonster.myAttribute), aMonster.level, aMonster.curAtt, 0, BanBattleRole.Group.Attack, aMonster.curAtt, aMonster.AllFated); role.angSkObj = aMonster.aSkill; role.norSkObj = aMonster.nSkill; role.isBoss = aMonster.isBoss; list_BattleRole.Add(role); } foreach (AW.Battle.Monster aMonster in aWarBegin.defTeam.team) { BanBattleRole role = new BanBattleRole(aMonster.pveIndex, aMonster.num, BanTools.TransAttributeType(aMonster.myAttribute), aMonster.level, 0, aMonster.curAtt, BanBattleRole.Group.Defense, aMonster.curAtt, aMonster.AllFated); role.angSkObj = aMonster.aSkill; role.norSkObj = aMonster.nSkill; role.isBoss = aMonster.isBoss; list_BattleRole.Add(role); } //added by zq for atk and def icon attackSideInfo.IsAttack = (0 == aWarBegin.attTeam.type); defenseSideInfo.IsAttack = !attackSideInfo.IsAttack; //end if (aWarBegin.attAoYi != null) { foreach (int aoyi in aWarBegin.attAoYi) { list_AttAoYi.Add(aoyi); } } if (aWarBegin.defAoYi != null) { foreach (int aoyi in aWarBegin.defAoYi) { list_DefAoYi.Add(aoyi); } } if (Core.Data.guideManger.isGuiding) { side = 0; } else { if (attackSideInfo.IsAttack) { side = 0; } else { side = 1; } } }