Asgard.Core.Network.Packets.DataObjectPacket.UseBaseline C# (CSharp) Method

UseBaseline() private static method

private static UseBaseline ( DataSerializationProperty prop, NetworkObject owner, NetworkObject baseline ) : bool
prop DataSerializationProperty
owner NetworkObject
baseline NetworkObject
return bool
        private static bool UseBaseline(DataSerializationProperty prop, NetworkObject owner, NetworkObject baseline)
        {
            if (baseline == null) return false;
            switch (prop.Type)
            {
                case DataTypes.BOOL:
                    {
                        bool a = prop.Get<bool>(owner);
                        bool b = prop.Get<bool>(baseline);
                        return a == b;
                    }
                case DataTypes.BYTE:
                    {
                        sbyte a = prop.Get<sbyte>(owner);
                        sbyte b = prop.Get<sbyte>(baseline);
                        return a == b;
                    }
                case DataTypes.DOUBLE:
                    {
                        double a = prop.Get<double>(owner);
                        double b = prop.Get<double>(baseline);
                        return a == b;
                    }
                case DataTypes.FLOAT:
                    {
                        float a = prop.Get<float>(owner);
                        float b = prop.Get<float>(baseline);
                        return a == b;
                    }
                case DataTypes.INT:
                    {
                        int a = prop.Get<int>(owner);
                        int b = prop.Get<int>(baseline);
                        return a == b;
                    }
                case DataTypes.LONG:
                    {
                        long a = prop.Get<long>(owner);
                        long b = prop.Get<long>(baseline);
                        return a == b;
                    }
                case DataTypes.SHORT:
                    {
                        short a = prop.Get<short>(owner);
                        short b = prop.Get<short>(baseline);
                        return a == b;
                    }
                case DataTypes.UBYTE:
                    {
                        byte a = prop.Get<byte>(owner);
                        byte b = prop.Get<byte>(baseline);
                        return a == b;
                    }
                case DataTypes.UINT:
                    {
                        uint a = prop.Get<uint>(owner);
                        uint b = prop.Get<uint>(baseline);
                        return a == b;
                    }
                case DataTypes.ULONG:
                    {
                        ulong a = prop.Get<ulong>(owner);
                        ulong b = prop.Get<ulong>(baseline);
                        return a == b;
                    }
                case DataTypes.USHORT:
                    {
                        ushort a = prop.Get<ushort>(owner);
                        ushort b = prop.Get<ushort>(baseline);
                        return a == b;
                    }
                case DataTypes.VECTOR2:
                    {
                        Vector2 a = prop.Get<Vector2>(owner);
                        Vector2 b = prop.Get<Vector2>(baseline);
                        return a == b;
                    }
            }

            return false;
        }