Exemple #1
0
        public PlayerInventory(UInt32 TUID)
        {
            UID               = TUID;
            ItemCardEquip     = new CardEquipCollection((int)UID);
            ItemCharacter     = new CharacterCollection((int)UID);
            ItemMascot        = new MascotCollection((int)UID);
            ItemWarehouse     = new WarehouseCollection((int)UID);
            ItemCaddie        = new CaddieCollection((int)UID);
            ItemCard          = new CardCollection((int)UID);
            ItemTransaction   = new TransactionsCollection();
            ItemRoom          = new FurnitureCollection((int)UID);
            ItemSlot          = new ItemSlotData();
            ItemDecoration    = new ItemDecorationData();
            ItemTrophies      = new TrophyCollection();
            ItemTrophyGP      = new TrophyGPCollection();
            ItemTrophySpecial = new TrophySpecialCollection();
            ItemSlotData Items;
            var          _db = new PangyaEntities();

            foreach (var info in _db.ProcGetToolbar((int)UID))
            {
                Items = new ItemSlotData
                {
                    Slot1  = (uint)info.ITEM_SLOT_1,
                    Slot2  = (uint)info.ITEM_SLOT_2,
                    Slot3  = (uint)info.ITEM_SLOT_3,
                    Slot4  = (uint)info.ITEM_SLOT_4,
                    Slot5  = (uint)info.ITEM_SLOT_5,
                    Slot6  = (uint)info.ITEM_SLOT_6,
                    Slot7  = (uint)info.ITEM_SLOT_7,
                    Slot8  = (uint)info.ITEM_SLOT_8,
                    Slot9  = (uint)info.ITEM_SLOT_9,
                    Slot10 = (uint)info.ITEM_SLOT_10,
                };

                ItemSlot.SetItemSlot(Items);
                SetTitleIndex((uint)info.Skin_1);
                SetCharIndex((uint)info.CHARACTER_ID);
                SetCaddieIndex((uint)info.CADDIE);
                SetBallTypeID((uint)info.BALL_ID);
                SetClubSetIndex((uint)info.CLUB_ID);
                SetMascotIndex((uint)info.MASCOT_ID);
                SetPoster((uint)info.POSTER_1, (uint)info.POSTER_2);
            }

            ItemCharacter.Card = ItemCardEquip;
        }