Ejemplo n.º 1
0
 public ItemInstance(ItemInstance prototype)
 {
     this.ItemId      = string.Empty;
     this.Perks       = new PerkContainer();
     this.DropVersion = string.Empty;
     this.copyFrom(prototype);
 }
Ejemplo n.º 2
0
 public PerkContainer(PerkContainer another)
 {
     this.PerkInstances = new List <PerkInstance>();
     this.PerkInstances.Clear();
     for (int i = 0; i < another.PerkInstances.Count; i++)
     {
         this.PerkInstances.Add(new PerkInstance(another.PerkInstances[i]));
     }
 }
Ejemplo n.º 3
0
 public Item()
 {
     this.Id            = string.Empty;
     this.Name          = string.Empty;
     this.Accessories   = new OrderedDict <AccessoryType, string>();
     this.SpriteId      = string.Empty;
     this.BodyMaterials = new List <string>();
     this.Description   = string.Empty;
     this.FixedPerks    = new PerkContainer();
 }
Ejemplo n.º 4
0
 public void copyFrom(Item another)
 {
     this.Id            = another.Id;
     this.Name          = another.Name;
     this.Type          = another.Type;
     this.Accessories   = another.Accessories;
     this.Rarity        = another.Rarity;
     this.SpriteId      = another.SpriteId;
     this.BodyMaterials = another.BodyMaterials;
     this.Description   = another.Description;
     this.FixedPerks    = new PerkContainer(another.FixedPerks);
     this.FromChest     = another.FromChest;
 }
Ejemplo n.º 5
0
 public void copyFrom(ItemInstance another)
 {
     this.ItemId            = another.ItemId;
     this.Level             = another.Level;
     this.Rank              = another.Rank;
     this.UnlockFloor       = another.UnlockFloor;
     this.Unlocked          = another.Unlocked;
     this.InspectedByPlayer = another.InspectedByPlayer;
     this.DropVersion       = another.DropVersion;
     this.Perks             = new PerkContainer(another.Perks);
     this.Item              = another.Item;
     this.RerollCount       = another.RerollCount;
     this.EvolveRank        = another.EvolveRank;
 }
Ejemplo n.º 6
0
        public ItemInstance(string itemId, int level, int rank, int unlockFloor, Player player)
        {
            this.ItemId      = string.Empty;
            this.Perks       = new PerkContainer();
            this.DropVersion = string.Empty;
            this.ItemId      = itemId;
            this.Level       = level;
            this.Rank        = rank;
            this.UnlockFloor = unlockFloor;
            this.DropVersion = ConfigApp.BundleVersion;
            GameLogic.Item item     = GameLogic.Binder.ItemResources.getResource(this.ItemId);
            ItemType       itemType = item.Type;
            int            rarity   = item.Rarity;
            int            num2     = ConfigPerks.NUM_RANDOM_PERKS_PER_ITEM_RARITY[rarity];

            for (int i = 0; i < num2; i++)
            {
                this.Perks.PerkInstances.Add(ConfigPerks.RollNewRandomItemPerkInstance(itemType, this.Perks, player));
            }
            this.postDeserializeInitialization();
        }
Ejemplo n.º 7
0
 public ItemInstance()
 {
     this.ItemId      = string.Empty;
     this.Perks       = new PerkContainer();
     this.DropVersion = string.Empty;
 }