Exemple #1
0
        public int CompareTo(BLeaderSupportPower other)
        {
            if (IconLocation != other.IconLocation)
            {
                IconLocation.CompareTo(other.IconLocation);
            }

            if (TechPrereqID != other.TechPrereqID)
            {
                TechPrereqID.CompareTo(other.TechPrereqID);
            }

            if (SupportPowerIDs.Count != other.SupportPowerIDs.Count)
            {
                SupportPowerIDs.Count.CompareTo(other.SupportPowerIDs.Count);
            }

            int a_hash = PhxUtil.CalculateHashCodeForDBIDs(SupportPowerIDs);
            int b_hash = PhxUtil.CalculateHashCodeForDBIDs(other.SupportPowerIDs);

            return(a_hash.CompareTo(b_hash));
        }