Пример #1
0
        public static void BuyList(ByteBuffer buffe)
        {
            /*07
            BA 25 3D 00 //Money
            00 00 00 00 //??
            7C 91 2E 00 //Buy list id

            2A 00 //Itemcount*/

            //buffe.ReadByte();
            buffe.ReadUInt32();
            buffe.ReadUInt32();
            Globals.gamedata.blistID = buffe.ReadUInt32();

            uint itemcnt = buffe.ReadUInt16(); //Number of objects in list
            //Globals.l2net_home.Add_Text("Buylist itemcnt:" + itemcnt, Globals.Red, TextType.BOT);
            Globals.BuyListLock.EnterWriteLock();
            try
            {
                Globals.gamedata.buylist.Clear(); //Need to clear this every time the user enters a shop

                for (uint i = 0; i < itemcnt; i++)
                {
                    BuyList b_list = new BuyList();
                    b_list.Load(buffe);
                    AddInfo.Add_Buylist(b_list);
                }
            }

            finally
            {
                Globals.BuyListLock.ExitWriteLock();
                if (Globals.OOG)
                {
                    BuyWindow bw = new BuyWindow();
                    bw.ShowDialog();
                }
            }
        }
Пример #2
0
 public static void Add_Buylist(BuyList b_list)
 {
     Globals.gamedata.buylist.Add(b_list.ItemID, b_list);
 }