Exemplo n.º 1
0
        /// <summary>
        /// Get visible equipped items excluding weapons (slots 2-4 and 6-12).
        /// </summary>
        public IEnumerable <uint> GetVisibleItemDisplayIds()
        {
            Container container = GetContainer(ContainerType.Equipped);

            for (ContainerEquippedSlot i = ContainerEquippedSlot.Head; i <= ContainerEquippedSlot.LeftRing; i++)
            {
                if (i != ContainerEquippedSlot.Waist)
                {
                    yield return((uint)(((Equipment)container.GetItem((ushort)i)?.Entry)?.PrimaryModelKey.ToInt64() ?? 0));
                }
            }
        }
Exemplo n.º 2
0
        private void SendActorAppearanceUpdate(ContainerEquippedSlot slot)
        {
            // waist items don't update visual appearance
            if (!owner.InWorld || slot == ContainerEquippedSlot.Waist)
            {
                return;
            }

            (ulong MainHand, ulong OffHand)weaponDisplayId = owner.Inventory.GetWeaponDisplayIds();
            owner.SendMessageToVisible(new ServerActorAppearanceUpdate
            {
                MainHandDisplayId     = weaponDisplayId.MainHand,
                OffHandDisplayId      = weaponDisplayId.OffHand,
                VisibleItemDisplayIds = GetVisibleItemDisplayIds()
            });
        }