コード例 #1
0
        /// <summary>
        /// Opens the bookstore.
        /// </summary>
        /// <param name="character">Character to show the bookstore</param>
        /// <param name="basenpc">Npc providing the bookstore</param>
        public override void Open(Saga.PrimaryTypes.Character character, Saga.Templates.BaseNPC basenpc)
        {
            character.Tag = this;
            SMSG_SENDBOOKLIST spkt = new SMSG_SENDBOOKLIST();

            spkt.SessionId   = character.id;
            spkt.SourceActor = basenpc.id;
            spkt.Zeny        = basenpc.Zeny;
            foreach (BaseShopCollection.ShopPair c in this.list)
            {
                spkt.Add(c.item.info.item);
            }
            character.client.Send((byte[])spkt);
        }
コード例 #2
0
        /// <summary>
        /// Opens the shop
        /// </summary>
        /// <param name="character">Character to show the shop</param>
        /// <param name="basenpc">Npc providing the v</param>
        public override void Open(Saga.PrimaryTypes.Character character, Saga.Templates.BaseNPC basenpc)
        {
            character.Tag = this;
            SMSG_SHOPLIST spkt = new SMSG_SHOPLIST();

            spkt.SessionId   = character.id;
            spkt.SourceActor = basenpc.id;
            spkt.Zeny        = basenpc.Zeny;
            for (int i = 0; i < list.Count; i++)
            {
                ShopPair c = list[i];
                if (c.NoStock == true || c.item.count > 0)
                {
                    spkt.AddItem(c.item, c.NoStock, i);
                }
            }
            character.client.Send((byte[])spkt);
            CommonFunctions.SendRebuylist(character);
        }