Exemplo n.º 1
0
        void HandleAuctionListBidderItems(AuctionListBidderItems packet)
        {
            Creature creature = GetPlayer().GetNPCIfCanInteractWith(packet.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None);

            if (!creature)
            {
                Log.outDebug(LogFilter.Network, "WORLD: HandleAuctionListBidderItems - {0} not found or you can't interact with him.", packet.Auctioneer.ToString());
                return;
            }

            // remove fake death
            if (GetPlayer().HasUnitState(UnitState.Died))
            {
                GetPlayer().RemoveAurasByType(AuraType.FeignDeath);
            }

            AuctionHouseObject auctionHouse = Global.AuctionMgr.GetAuctionsMap(creature.GetFaction());

            AuctionListBidderItemsResult result = new AuctionListBidderItemsResult();

            Player player = GetPlayer();

            auctionHouse.BuildListBidderItems(result, player, ref result.TotalCount);
            result.DesiredDelay = 300;
            SendPacket(result);
        }
Exemplo n.º 2
0
 public void BuildListBidderItems(AuctionListBidderItemsResult packet, Player player, ref uint totalcount)
 {
     foreach (var Aentry in AuctionsMap.Values)
     {
         if (Aentry != null && Aentry.bidder == player.GetGUID().GetCounter())
         {
             Aentry.BuildAuctionInfo(packet.Items, false);
             ++totalcount;
         }
     }
 }