FSO.LotView.Components.ObjectComponent.GetSLOTPosition C# (CSharp) Method

GetSLOTPosition() public method

public GetSLOTPosition ( int slot ) : Vector3
slot int
return Vector3
        public override Vector3 GetSLOTPosition(int slot)
        {
            var item = (ContainerSlots != null && ContainerSlots.Count > slot) ? ContainerSlots[slot] : null;
            if (item != null)
            {
                var off = item.Offset;
                var centerRelative = new Vector3(off.X * (1 / 16.0f), off.Y * (1 / 16.0f), ((item.Height != 5) ? SLOT.HeightOffsets[item.Height - 1] : off.Z) * (1 / 5.0f));
                centerRelative = Vector3.Transform(centerRelative, Matrix.CreateRotationZ(RadianDirection));

                return this.Position + centerRelative;
            } else return this.Position;
        }