Exemplo n.º 1
0
 protected override void setFieldWithElementValues()
 {
     if (element != null)
     {
         Item item = element.databaseModelToItem(resourcesList);
         databaseID       = item.databaseID;
         itemName         = item.name;
         itemIcon         = item.itemIcon;
         itemModel        = item.itemModel;
         isConsomable     = item.isConsomable;
         isStackable      = item.isStackable;
         canBeRecycle     = item.canBeRecycle;
         maxStackableSize = item.maxStackableSize;
         interactableType = item.interactibleType;
         itemType         = item.itemType;
         targetType       = item.targetType;
         numberOfEffect   = item.effects.Count;
         effects          = item.effects;
         effectsIndex.updateSize(effects.Count);
         for (int i = 0; i < effects.Count; i++)
         {
             effectsIndex[i] = EffectList.getIndexfor(effects[i].effect.getName());
         }
     }
 }