Example #1
0
        /// <summary>
        /// Faster distance call than ACD.Distance due to being 2d and calling cached player position.
        /// </summary>
        internal static Vector3 GetPosition(TrinityObject o)
        {
            // Position/Distance only works for Ground Items if called on DiaItem
            if(o.ActorType == ActorType.Item)
                return o.GetDiaItemProperty(x => x.Position);

            return o.GetSourceProperty(x => x.Position);
        }