コード例 #1
0
 public EquipItemAbilityCollection(EquipItemAbility a, int equip_index, COLLECTION_TYPE type = COLLECTION_TYPE.NORMAL)
 {
     if (EQUIP_LENGTH == 0)
     {
         EQUIP_LENGTH = 3;
         EQUIPMENT_TYPE[] array = (EQUIPMENT_TYPE[])Enum.GetValues(typeof(EQUIPMENT_TYPE));
         int i = 0;
         for (int num = array.Length; i < num; i++)
         {
             int num2 = (int)array[i];
             if (num2 >= 100 && num2 <= 400)
             {
                 EQUIP_LENGTH++;
             }
         }
     }
     equip     = new int[EQUIP_LENGTH];
     swapValue = new int[EQUIP_LENGTH];
     if (type != 0)
     {
         swapValue[equip_index] += a.ap;
     }
     if (type != COLLECTION_TYPE.SWAP_OUT && equip_index < EQUIP_LENGTH && equip_index >= 0)
     {
         equip[equip_index] += a.ap;
         ability             = new EquipItemAbility(a.id, a.ap);
     }
     else
     {
         ability = new EquipItemAbility(a.id, 0);
     }
 }
コード例 #2
0
 public void Add(int ad_ap, int equip_index, COLLECTION_TYPE type = COLLECTION_TYPE.NORMAL)
 {
     if (type != 0)
     {
         swapValue[equip_index] += ad_ap;
     }
     if (type != COLLECTION_TYPE.SWAP_OUT)
     {
         ability.ap         += ad_ap;
         equip[equip_index] += ad_ap;
     }
 }