Exemplo n.º 1
0
    /// <summary>
    /// 设置数据
    /// </summary>
    //private void setSoldierHeroData(SoldierDataBase _heroSoldier)
    private void setSoldierData(SoldierDataBase heroSoldier)
    {
        // 相关的类型转换
        _monster = _isMe == true ? _monster : ((MonsterAgent)_monster);

        // 设置对应的数据
        _monster.setData(heroSoldier.Sid);

        // 设置英雄数据
        heroSoldier.Sid                          = _monster.getID() ;

        heroSoldier.Model                        = _monster.getModel();

        heroSoldier.HP                           =  _monster.getHP() ;

        // TODO
        if (heroSoldier.HP<=0)
        {
            int a=0;
        }

        heroSoldier.RoleID                       = _monster.getRoleID();

        heroSoldier.RoleName                     = _monster.getRoleName();

        heroSoldier.PhysicalStrength             =  _monster.getPhysicalStrength();

        heroSoldier.PhysicalNormal               =  _monster.getPhysicalNormal();

        heroSoldier.SpellIntensity               =  _monster.getSpellIntensity();

        heroSoldier.SpellOrdinary                =  _monster.getSpellOrdinary() ;

        heroSoldier.Crit                         =  _monster.getCrit();

        heroSoldier.CritCoefficient              =  _monster.getCritCoefficient();

        heroSoldier.Violence                     =  _monster.getViolence() ;

        heroSoldier.ViolenceCoefficient          =  _monster.getViolenceCoefficient();

        heroSoldier.PhysicalDefense              =  _monster.getPhysicalDefense();

        heroSoldier.Physical                     =  _monster.getPhysical();

        heroSoldier.Things                       =  _monster.getThings();

        heroSoldier.SpellDefense                 =  _monster.getSpellDefense();

        heroSoldier.Spell                        =  _monster.getSpell();

        heroSoldier.SpellCoefficient             =  _monster.getSpellCoefficient();

        heroSoldier.Dodge                        =  _monster.getDodge();

        heroSoldier.DodgeCoefficient             = _monster.getDodgeCoefficient();

        heroSoldier.Interval                     =  _monster.getInterval();

        heroSoldier.MoveSpeed                    =  _monster.getSpeed();

        heroSoldier.AttckDistance                =   _monster.getAttackDistance();

        heroSoldier.Skills                       = _monster.getSkills();

        heroSoldier.InitialMP                    = _monster.getInitialMP();

        // 目前没啥用  从 兵种结构那里可以获取
        heroSoldier.CarryMosterNumber            = _monster.getCarrayMosterNumber();  // 佣兵数量

        heroSoldier.HavaMosterID                 = _monster.getMercenary(); // 如果是英雄那么他将拥有兵种ID

        if (_isMe == true) // 自己的英雄数据
        {

            heroSoldier.WorldName      = _monster.getWorldName();

            heroSoldier.RoleType       = _monster.getRoleType();

            heroSoldier.RoleProduct    = _monster.getRoleProduct();

            heroSoldier.ProductParam   = _monster.getProductParam();

            heroSoldier.HPGrowth       = _monster.getHPGrowth();

            heroSoldier.PhysicalGrowth = _monster.getPhysicalGrowth();

            heroSoldier.SpellGrowth    = _monster.getSpellGrowth();

            heroSoldier.DefGrowth      = _monster.getDefGrowth();

            heroSoldier.SdefGrowth     = _monster.getSdefGrowth();

            heroSoldier.MPGrowth       = _monster.getMpGrowth();
        }
        else  // 敌方
        {
            heroSoldier.Level                 = ((MonsterAgent)_monster).getLevel();

            heroSoldier.DodgeIntensity        = ((MonsterAgent)_monster).getDodgeIntensity();

            heroSoldier.Bonus                 = ((MonsterAgent)_monster).getBonus();

            heroSoldier.Combat                = ((MonsterAgent)_monster).getCombat();

            heroSoldier.Drop                  = ((MonsterAgent)_monster).getDrop();

            heroSoldier.ViolenceIntensity     = ((MonsterAgent)_monster).getViolenceIntensity();

            heroSoldier.CritIntensity         = ((MonsterAgent)_monster).getCritIntensity();
        }

        heroSoldier.ATK = Formula.Formula.getNakedAttribute(heroSoldier.PhysicalStrength, _isMe == true ? heroSoldier.PhysicalGrowth : 0, 0);

        heroSoldier.SATK = Formula.Formula.getNakedAttribute(heroSoldier.SpellIntensity,  _isMe == true ? heroSoldier.SpellGrowth : 0, 0);
    }
Exemplo n.º 2
0
    /// <summary>
    /// 设置数据
    /// </summary>
    //private void setSoldierHeroData(SoldierDataBase _heroSoldier)
    private void setSoldierData(SoldierDataBase heroSoldier)

    {
        // 相关的类型转换
        _monster = _isMe == true ? _monster : ((MonsterAgent)_monster);

        // 设置对应的数据
        _monster.setData(heroSoldier.Sid);

        // 设置英雄数据
        heroSoldier.Sid = _monster.getID();

        heroSoldier.Model = _monster.getModel();

        heroSoldier.HP = _monster.getHP();

        // TODO
        if (heroSoldier.HP <= 0)
        {
            int a = 0;
        }

        heroSoldier.RoleID = _monster.getRoleID();

        heroSoldier.RoleName = _monster.getRoleName();

        heroSoldier.PhysicalStrength = _monster.getPhysicalStrength();

        heroSoldier.PhysicalNormal = _monster.getPhysicalNormal();

        heroSoldier.SpellIntensity = _monster.getSpellIntensity();

        heroSoldier.SpellOrdinary = _monster.getSpellOrdinary();

        heroSoldier.Crit = _monster.getCrit();

        heroSoldier.CritCoefficient = _monster.getCritCoefficient();

        heroSoldier.Violence = _monster.getViolence();

        heroSoldier.ViolenceCoefficient = _monster.getViolenceCoefficient();

        heroSoldier.PhysicalDefense = _monster.getPhysicalDefense();

        heroSoldier.Physical = _monster.getPhysical();

        heroSoldier.Things = _monster.getThings();

        heroSoldier.SpellDefense = _monster.getSpellDefense();

        heroSoldier.Spell = _monster.getSpell();

        heroSoldier.SpellCoefficient = _monster.getSpellCoefficient();

        heroSoldier.Dodge = _monster.getDodge();

        heroSoldier.DodgeCoefficient = _monster.getDodgeCoefficient();

        heroSoldier.Interval = _monster.getInterval();

        heroSoldier.MoveSpeed = _monster.getSpeed();

        heroSoldier.AttckDistance = _monster.getAttackDistance();

        heroSoldier.Skills = _monster.getSkills();

        heroSoldier.InitialMP = _monster.getInitialMP();

        // 目前没啥用  从 兵种结构那里可以获取
        heroSoldier.CarryMosterNumber = _monster.getCarrayMosterNumber();   // 佣兵数量

        heroSoldier.HavaMosterID = _monster.getMercenary();                 // 如果是英雄那么他将拥有兵种ID


        if (_isMe == true) // 自己的英雄数据
        {
            heroSoldier.WorldName = _monster.getWorldName();

            heroSoldier.RoleType = _monster.getRoleType();

            heroSoldier.RoleProduct = _monster.getRoleProduct();

            heroSoldier.ProductParam = _monster.getProductParam();

            heroSoldier.HPGrowth = _monster.getHPGrowth();

            heroSoldier.PhysicalGrowth = _monster.getPhysicalGrowth();

            heroSoldier.SpellGrowth = _monster.getSpellGrowth();

            heroSoldier.DefGrowth = _monster.getDefGrowth();

            heroSoldier.SdefGrowth = _monster.getSdefGrowth();

            heroSoldier.MPGrowth = _monster.getMpGrowth();
        }
        else  // 敌方
        {
            heroSoldier.Level = ((MonsterAgent)_monster).getLevel();

            heroSoldier.DodgeIntensity = ((MonsterAgent)_monster).getDodgeIntensity();

            heroSoldier.Bonus = ((MonsterAgent)_monster).getBonus();

            heroSoldier.Combat = ((MonsterAgent)_monster).getCombat();

            heroSoldier.Drop = ((MonsterAgent)_monster).getDrop();

            heroSoldier.ViolenceIntensity = ((MonsterAgent)_monster).getViolenceIntensity();

            heroSoldier.CritIntensity = ((MonsterAgent)_monster).getCritIntensity();
        }


        heroSoldier.ATK = Formula.Formula.getNakedAttribute(heroSoldier.PhysicalStrength, _isMe == true ? heroSoldier.PhysicalGrowth : 0, 0);

        heroSoldier.SATK = Formula.Formula.getNakedAttribute(heroSoldier.SpellIntensity, _isMe == true ? heroSoldier.SpellGrowth : 0, 0);
    }