Ejemplo n.º 1
0
    //获得下一级装备属性
    public AttrChange[] getNextAttrChanges()
    {
        List <AttrChange>    list          = new List <AttrChange>();
        MagicWeaponSample    ms            = MagicWeaponSampleManager.Instance.getMagicWeaponSampleBySid(sid);
        MagicWeaponAttribute nextAttrbutes = new MagicWeaponAttribute(ms.attributSid, strengLv + 1);//初始化模板属性
        int hp = nextAttrbutes.getMagicWeaponHp();

        if (hp != 0)
        {
            AttrChange attrHp = new AttrChange(AttrChangeType.HP, hp - magicWeaponAttrbutes.getMagicWeaponHp());
            list.Add(attrHp);
        }

        int attack = nextAttrbutes.getMagicWeaponAttack();

        if (attack != 0)
        {
            AttrChange attrAtt = new AttrChange(AttrChangeType.ATTACK, attack - magicWeaponAttrbutes.getMagicWeaponAttack());
            list.Add(attrAtt);
        }

        int agi = nextAttrbutes.getMagicWeaponAgile();

        if (agi != 0)
        {
            AttrChange attrAgi = new AttrChange(AttrChangeType.AGILE, agi - magicWeaponAttrbutes.getMagicWeaponAgile());
            list.Add(attrAgi);
        }

        int mag = nextAttrbutes.getMagicWeaponMagic();

        if (mag != 0)
        {
            AttrChange attrMag = new AttrChange(AttrChangeType.MAGIC, mag - magicWeaponAttrbutes.getMagicWeaponMagic());
            list.Add(attrMag);
        }

        int def = nextAttrbutes.getMagicWeaponDefecse();

        if (def != 0)
        {
            AttrChange attrDef = new AttrChange(AttrChangeType.DEFENSE, def - magicWeaponAttrbutes.getMagicWeaponDefecse());
            list.Add(attrDef);
        }
        return(list.ToArray());
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 更新这个石头的具体属性 目前是根据属性SID来的
    /// </summary>
    private void updateAttruibte()
    {
        MagicWeaponSample ms = MagicWeaponSampleManager.Instance.getMagicWeaponSampleBySid(sid);

        magicWeaponAttrbutes = new MagicWeaponAttribute(ms.attributSid, strengLv);//初始化模板属性
    }