private void OnRoleChangeCareerNty(short state, RoleChangeCareerNty down = null) { if (state != 0) { StateManager.Instance.StateShow(state, 0); return; } if (down != null) { EntityWorld.Instance.EntSelf.TypeID = this.RoleChangeProfession; EventDispatcher.Broadcast("ChangeCareerManager.RoleSelfProfessionChange"); this.ChangeCareerSuccess(down); } }
private void ChangeCareerSuccess(RoleChangeCareerNty down) { List <LevelUpUnitData> list = new List <LevelUpUnitData>(); LevelUpUnitData levelUpUnitData = new LevelUpUnitData(); string beginStr = AttrUtility.GetAttrName(GameData.AttrType.Fighting) + ":"; levelUpUnitData.BeginStr = beginStr; levelUpUnitData.Begin = (float)down.oldFighting; levelUpUnitData.End = (float)down.newFighting; list.Add(levelUpUnitData); levelUpUnitData = new LevelUpUnitData(); beginStr = "生命:"; levelUpUnitData.BeginStr = beginStr; levelUpUnitData.Begin = (float)down.oldHp; levelUpUnitData.End = (float)down.newHp; list.Add(levelUpUnitData); levelUpUnitData = new LevelUpUnitData(); beginStr = "攻击:"; levelUpUnitData.BeginStr = beginStr; levelUpUnitData.Begin = (float)down.oldAttack; levelUpUnitData.End = (float)down.newAttack; list.Add(levelUpUnitData); levelUpUnitData = new LevelUpUnitData(); beginStr = "防御:"; levelUpUnitData.BeginStr = beginStr; levelUpUnitData.Begin = (float)down.oldDefence; levelUpUnitData.End = (float)down.newDefence; list.Add(levelUpUnitData); levelUpUnitData = new LevelUpUnitData(); beginStr = "格挡:"; levelUpUnitData.BeginStr = beginStr; levelUpUnitData.Begin = (float)down.oldParryRatio; levelUpUnitData.End = (float)down.newParryRatio; list.Add(levelUpUnitData); levelUpUnitData = new LevelUpUnitData(); beginStr = "暴击:"; levelUpUnitData.BeginStr = beginStr; levelUpUnitData.Begin = (float)down.oldCritRatio; levelUpUnitData.End = (float)down.newCritRatio; list.Add(levelUpUnitData); ChangeCareerSuccessUIViewModel.Instance.ShowChangeCareer(list, this.RoleChangeProfession); }