コード例 #1
0
 //初始化仓库数据
 public void updateStorageInfo(string type, ErlArray arr)
 {
     if (type == StorageFPort.GOODS)
     {
         PropStorageVersion += 1;
         propStorage         = new PropStorage();
         propStorage.parse(arr);
     }
     else if (type == StorageFPort.CARD)
     {
         RoleStorageVersion += 1;
         roleStorage         = new RoleStorage();
         roleStorage.parse(arr);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_CARD);
     }
     else if (type == StorageFPort.BEAST)
     {
         beastStorageVersion += 1;
         beastStorage         = new BeastStorage();
         beastStorage.parse(arr);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_BEAST);
     }
     else if (type == StorageFPort.EQUIPMENT)
     {
         EquipStorageVersion += 1;
         equipStorage         = new EquipStorage();
         equipStorage.parse(arr);
     }
     else if (type == StorageFPort.TEMP)
     {
         tmpStorageVersion += 1;
         tempStorage        = new TemporaryStorage();
         tempStorage.parse(arr);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_CARD);
         IncreaseManagerment.Instance.clearData(IncreaseManagerment.TYPE_BEAST);
     }
     else if (type == StorageFPort.STAR_SOUL_STORAGE)
     {
         starSoulStorageVersion += 1;
         starSoulStorage         = new StarSoulStorage();
         starSoulStorage.parse(arr);
     }
     else if (type == StorageFPort.STAR_SOUL_DRAW_STORAGE)
     {
         huntStarSoulStorageVersion += 1;
         huntStarSoulStorage         = new StarSoulStorage();
         huntStarSoulStorage.parse(arr);
     }
     else if (type == StorageFPort.MOUNTS)
     {
         mountsStorageVersion += 1;
         mountsStorage         = new MountsStorage();
         mountsStorage.parse(arr);
     }
     else if (type == StorageFPort.MAGIC_WEAPON)
     {
         magicWeaponVersion += 1;
         magicWeaponStorage  = new MagicWeaponStore();
         magicWeaponStorage.parse(arr);
     }
 }