コード例 #1
0
ファイル: DefenceObj.cs プロジェクト: fengmin0722/qiangzhan
    override public bool BuildProperty(PropertyOperation operation)
    {
        DefenceTableItem itemdefence = GetDeRes();

        operation.AddPro((int)PropertyTypeEnum.PropertyTypeMaxHP, prolifestren == -1 ? 0 : prolifestren + itemdefence.basePropertyLife);
        operation.AddPro((int)PropertyTypeEnum.PropertyTypeMaxHP, prolifestars == -1 ? 0 : prolifestars);

        operation.AddPro((int)PropertyTypeEnum.PropertyTypeDamage, prodamagestren == -1 ? 0 : prodamagestren + itemdefence.basePropertyDamage);
        operation.AddPro((int)PropertyTypeEnum.PropertyTypeDamage, prodamagestars == -1 ? 0 : prodamagestars);

        operation.AddPro((int)PropertyTypeEnum.PropertyTypeCrticalLV, procritstren == -1 ? 0 : procritstren + itemdefence.basePropertyCrit);
        operation.AddPro((int)PropertyTypeEnum.PropertyTypeCrticalLV, procritstars == -1 ? 0 : procritstars);

        operation.AddPro((int)PropertyTypeEnum.PropertyTypeDefance, prodefencestren == -1 ? 0 : prodefencestren + itemdefence.basePropertyDefence);
        operation.AddPro((int)PropertyTypeEnum.PropertyTypeDefance, prodefencestars == -1 ? 0 : prodefencestars);

        for (int i = 0; i < stoneinfo.Count; ++i)
        {
            StoneTableItem item = DataManager.StoneTable[stoneinfo[i].stoneid] as StoneTableItem;
            if (null == item)
            {
                continue;
            }
            operation.AddPro(item.proid, item.provalue);
        }
        return(false);
    }
コード例 #2
0
 //翅膀属性
 public static void BuildWingProperty(PlayerData mainData, PropertyOperation operation)
 {
     operation.Clear();
     for (int i = 0; i < mainData.mWingData.wingItems.Count; ++i)
     {
         operation.AddPro((int)PropertyTypeEnum.PropertyTypeMaxHP, mainData.mWingData.wingItems[i].life);
         operation.AddPro((int)PropertyTypeEnum.PropertyTypeDamage, mainData.mWingData.wingItems[i].attack);
         operation.AddPro((int)PropertyTypeEnum.PropertyTypeDefance, mainData.mWingData.wingItems[i].defence);
         operation.AddPro((int)PropertyTypeEnum.PropertyTypeCrticalLV, mainData.mWingData.wingItems[i].critical);
         operation.AddPro((int)PropertyTypeEnum.PropertyTypeMaxMana, mainData.mWingData.wingItems[i].power);
     }
 }
コード例 #3
0
    //时装属性
    public static void BuildFashionProperty(PlayerData mainData, PropertyOperation operation)
    {
        operation.Clear();
        for (int i = 0; i < mainData.mFashion.unlock_count; ++i)
        {
            FashionTableItem res = DataManager.FashionTable[mainData.mFashion.items[i].id] as FashionTableItem;
            if (res == null)
            {
                return;
            }
            var pro_res = DataManager.FashionPropTable[mainData.mFashion.items[i].starnum + res.propid] as FashionPropTableItem;
            if (pro_res == null)
            {
                return;
            }

            operation.AddPro((int)PropertyTypeEnum.PropertyTypeMaxHP, (pro_res.life > 0) ? pro_res.life: 0);
            operation.AddPro((int)PropertyTypeEnum.PropertyTypeDamage, (pro_res.fight > 0) ? pro_res.fight : 0);
            operation.AddPro((int)PropertyTypeEnum.PropertyTypeDefance, (pro_res.defence > 0) ? pro_res.defence : 0);
            operation.AddPro((int)PropertyTypeEnum.PropertyTypeCrticalLV, (pro_res.critical > 0) ? pro_res.critical : 0);
            operation.AddPro((int)PropertyTypeEnum.PropertyTypeMaxMana, (pro_res.power > 0) ? pro_res.power : 0);
        }
    }