コード例 #1
0
ファイル: Vendor.cs プロジェクト: klp2/ACE
        /// <summary>
        /// Sends the latest vendor inventory list to player,
        /// rotates vendor towards player, and performs the appropriate emote.
        /// </summary>
        /// <param name="action">The action performed by the player</param>
        private void ApproachVendor(Player player, VendorType action = VendorType.Undef)
        {
            // default inventory
            List <WorldObject> vendorlist = new List <WorldObject>();

            foreach (KeyValuePair <ObjectGuid, WorldObject> wo in defaultItemsForSale)
            {
                vendorlist.Add(wo.Value);
            }

            // unique inventory - items sold by other players
            foreach (KeyValuePair <ObjectGuid, WorldObject> wo in uniqueItemsForSale)
            {
                vendorlist.Add(wo.Value);
            }

            player.TrackInteractiveObjects(vendorlist);
            player.ApproachVendor(this, vendorlist);

            var rotateTime = Rotate(player); // vendor rotates to player

            if (action != VendorType.Undef)
            {
                DoVendorEmote(action, player);
            }
        }
コード例 #2
0
        /// <summary>
        /// Sends Vendor Inventory to player
        /// </summary>
        /// <param name="player"></param>
        private void ApproachVendor(Player player)
        {
            // default inventory
            List <WorldObject> vendorlist = new List <WorldObject>();

            foreach (KeyValuePair <ObjectGuid, WorldObject> wo in defaultItemsForSale)
            {
                vendorlist.Add(wo.Value);
            }

            // unique inventory - itmes sold by other players
            foreach (KeyValuePair <ObjectGuid, WorldObject> wo in uniqueItemsForSale)
            {
                vendorlist.Add(wo.Value);
            }

            player.TrackInteractiveObjects(vendorlist);
            player.ApproachVendor(this, vendorlist);
        }
コード例 #3
0
ファイル: Vendor.cs プロジェクト: Zegeger/ACE
        /// <summary>
        /// Sends Vendor Inventory to player
        /// </summary>
        /// <param name="player"></param>
        private void ApproachVendor(Player player)
        {
            // default inventory
            List <WorldObject> vendorlist = new List <WorldObject>();

            foreach (KeyValuePair <ObjectGuid, WorldObject> wo in defaultItemsForSale)
            {
                vendorlist.Add(wo.Value);
            }

            // unique inventory - itmes sold by other players
            foreach (KeyValuePair <ObjectGuid, WorldObject> wo in uniqueItemsForSale)
            {
                vendorlist.Add(wo.Value);
            }

            player.TrackInteractiveObjects(vendorlist);
            player.ApproachVendor(this, vendorlist);
            OnAutonomousMove(player.Location, Sequences, MovementTypes.TurnToObject, player.Guid);
            DoVendorEmote(VendorType.Open, player);
        }