using System; using System.Collections.Generic; using System.Linq; using System.Text; /// /// 英雄实例数据 /// public class Vhero { /// /// 实例id /// public int iid { get; set; } /// /// 模板id /// public int tid { get { return ctx.id; } } /// /// 模板数据 /// public VheroMo ctx { get; set; } /// /// 等级 /// public int lv { get; set; } /// /// 星级 /// public int star { get; set; } ///// ///// 星级模板数据 ///// //public VherostarMo starCtx //{ // get // { // return VherostarMo.GetVherostarMo(this.star); // } //} /// /// 当前血量 /// public double hp { get; set; } /// /// 最大血量 /// public double maxhp { get { return 1000; } } /// /// 力量 /// public double s { get { return 100; } } /// /// 敏捷 /// public double a { get { return 100; } } /// /// 智力 /// public double i { get { return 100; } } /// /// 物理攻击 /// public double phyatk { get { return 100; } } /// /// 魔法攻击 /// public double magatk { get { return 100; } } /// /// 物理防御 /// public double phydef { get { return 100; } } /// /// 魔法防御 /// public double magdef { get { return 100; } } /// /// 物理暴击率 /// public double phycrit { get { return 100; } } /// /// 流水单号 /// private static int _startIndex = 10000; /// /// 生成英雄实例 /// /// /// /// /// public static Vhero CreateHero(int id, int lv, int star) { Vhero hero = new Vhero(); hero.ctx = VheroMo.GetVheroMo(id);// ConstProxy.GetVheroMoConst(id); hero.ctx.res = "10001"; hero.lv = lv; hero.star = star; hero.hp = hero.maxhp; // 满血 hero.iid = ++_startIndex; return hero; } }