コード例 #1
0
ファイル: Thing.cs プロジェクト: thomotron/Phinix
        public override int GetHashCode()
        {
            int hash = 1;

            if (DefName.Length != 0)
            {
                hash ^= DefName.GetHashCode();
            }
            if (StackCount != 0)
            {
                hash ^= StackCount.GetHashCode();
            }
            if (StuffDefName.Length != 0)
            {
                hash ^= StuffDefName.GetHashCode();
            }
            if (Quality != 0)
            {
                hash ^= Quality.GetHashCode();
            }
            if (HitPoints != 0)
            {
                hash ^= HitPoints.GetHashCode();
            }
            if (innerProtoThing_ != null)
            {
                hash ^= InnerProtoThing.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
ファイル: Thing.cs プロジェクト: Maatss/Phinix
        public override int GetHashCode()
        {
            int hash = 1;

            if (DefName.Length != 0)
            {
                hash ^= DefName.GetHashCode();
            }
            if (StackCount != 0)
            {
                hash ^= StackCount.GetHashCode();
            }
            if (StuffDefName.Length != 0)
            {
                hash ^= StuffDefName.GetHashCode();
            }
            if (Quality != global::Trading.Quality.Awful)
            {
                hash ^= Quality.GetHashCode();
            }
            if (HitPoints != 0)
            {
                hash ^= HitPoints.GetHashCode();
            }
            if (innerProtoThing_ != null)
            {
                hash ^= InnerProtoThing.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }