Ejemplo n.º 1
0
 private void delStorageProp(string type, ErlType data)
 {
     if (type == StorageFPort.GOODS)
     {
         PropStorageVersion++;
         int[] sidNum = ErlKit.ErlArray2Int(data as ErlArray);
         propStorage.reducePropBySid(sidNum [0], sidNum [1]);
     }
     else if (type == StorageFPort.CARD)
     {
         RoleStorageVersion++;
         if ((data as ErlArray) == null)
         {
             roleStorage.reducePropByUid(data.getValueString());
         }
         else
         {
             roleStorage.reducePropByUid(ErlKit.ErlArray2String(data as ErlArray));
         }
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_CARD);
     }
     else if (type == StorageFPort.EQUIPMENT || type == StorageFPort.EQUIPMENT1)
     {
         EquipStorageVersion++;
         if ((data as ErlArray) == null)
         {
             equipStorage.reducePropByUid(data.getValueString());
         }
         else
         {
             equipStorage.reducePropByUid(ErlKit.ErlArray2String(data as ErlArray));
         }
     }
     else if (type == StorageFPort.MOUNTS)
     {
         mountsStorageVersion++;
         if ((data as ErlArray) == null)
         {
             mountsStorage.reducePropByUid(data.getValueString());
         }
         else
         {
             mountsStorage.reducePropByUid(ErlKit.ErlArray2String(data as ErlArray));
         }
     }
     else if (type == StorageFPort.MAGIC_WEAPON)
     {
         magicWeaponVersion++;
         if ((data as ErlArray) == null)
         {
             magicWeaponStorage.reducePropByUid(data.getValueString());
         }
         else
         {
             magicWeaponStorage.reducePropByUid(ErlKit.ErlArray2String(data as ErlArray));
         }
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 扣除猎魂仓库中的星魂
 /// </summary>
 /// <param name="data">Data.</param>
 public void delHuntStarSoulStorage(ErlType data)
 {
     if ((data as ErlArray) == null)
     {
         huntStarSoulStorage.reducePropByUid(data.getValueString());
     }
     else
     {
         huntStarSoulStorage.reducePropByUid(ErlKit.ErlArray2String(data as ErlArray));
     }
 }