public void BuildListOwnerItems(AuctionListOwnerItemsResult packet, Player player, ref uint totalcount) { foreach (var Aentry in AuctionsMap.Values) { if (Aentry != null && Aentry.owner == player.GetGUID().GetCounter()) { Aentry.BuildAuctionInfo(packet.Items, false); ++totalcount; } } }
void HandleAuctionListOwnerItems(AuctionListOwnerItems packet) { Creature creature = GetPlayer().GetNPCIfCanInteractWith(packet.Auctioneer, NPCFlags.Auctioneer, NPCFlags2.None); if (!creature) { Log.outDebug(LogFilter.Network, "WORLD: HandleAuctionListOwnerItems - {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()); AuctionListOwnerItemsResult result = new AuctionListOwnerItemsResult(); auctionHouse.BuildListOwnerItems(result, GetPlayer(), ref result.TotalCount); result.DesiredDelay = 300; SendPacket(result); }