/// <summary> BaseNpcRole TO Role </summary> /// <param name="model"></param> /// <param name="id">指定武将的主Id</param> private Role ConvertRole(BaseNpcRole model, Int64 id) { if (model == null) { return(null); } return(new Role { id = id, damage = 0, lv = model.lv, IgnoreDuck = 0, angerCount = 0, hp = model.life, baseId = model.id, attack = model.attack, defense = model.defense, buffVos = new List <Buff>(), buffVos2 = new List <Buff>(), hurtReduce = model.hurtReduce, foreverBuffVos = new List <Buff>(), hurtIncrease = model.hurtIncrease, critAddition = model.critAddition, critProbability = model.critProbability, monsterType = (int)FightRivalType.MONSTER, dodgeProbability = model.dodgeProbability, mystery = BuildSkill(model.pmystery, id), cheatCode = BuildSkill(model.pcheatCode, id), mystery_probability = model.mysteryProbability, user_id = 0, }); }
/// <summary> BaseNpcRole 转换 RoleFight </summary> private FightRole ConvertNpcRoleFight(BaseNpcRole model) { return(new FightRole { id = model.id, damage = 0, lv = model.lv, angerCount = 0, hp = model.life, //user_id = 10000, baseId = model.id, attack = model.attack, defense = model.defense, hurtReduce = model.hurtReduce, hurtIncrease = model.hurtIncrease, critAddition = model.critAddition, critProbability = model.critProbability, dodgeProbability = model.dodgeProbability, mystery = BuildNpcSkillVo(model.pmystery), cheatCode = BuildNpcSkillVo(model.pcheatCode), mystery_probability = model.mysteryProbability, buffVos = new List <BuffVo>(), }); }