Ejemplo n.º 1
0
 public SocketGroup()
 {
     listOfGems = new List <Gem>();
     active     = null;
     //gems.add(GemHolder.getInstance().tossDummie());
     //active.add(GemHolder.getInstance().tossDummie());
     fromGroupLevel          = 2;
     untilGroupLevel         = 36;
     replaceGroup            = false;
     socketGroupReplace      = null;
     replacesGroup           = false;
     socketGroupThatReplaces = null;
     //indexOfReplaceGroup = -1;
     linkerToListIndex = new Dictionary <int, int>();
     socket_group_id   = -1;
     id_replacement    = -1;
     id_to_replace     = -1;
     active_id         = -1;
 }
Ejemplo n.º 2
0
        public SocketGroup Dupe(HashSet <int> socket_group_id, HashSet <int> gem_id)
        {
            SocketGroup duped      = new SocketGroup();
            Gem         old_active = this.active;

            duped.socket_group_id = Sign(socket_group_id);
            duped.SetFromGroupLevel(this.GetFromGroupLevel());
            duped.SetUntilGroupLevel(this.GetUntilGroupLevel());
            duped.SetNote(this.socketGroupNote);
            foreach (Gem g in listOfGems)
            {
                Gem duped_gem = g.DupeGem();
                g.SetLevelAdded(duped_gem.GetLevelAdded());
                duped_gem.SetGemID(Sign(gem_id));
                duped.GetGems().Add(duped_gem);
                if (g.Equals(old_active))
                {
                    duped.active    = duped_gem;
                    duped.active_id = duped_gem.GetGemID();
                }
            }
            return(duped);
        }