Пример #1
0
            internal CEntity(CharacterModel model, ItemContext context, BinTables tables)
            {
                Id          = model.Id;
                Name        = model.Name;
                Photo       = model.Photo;
                Place       = new(model.Place);
                Slot        = model.Slot;
                Advancement = model.Advancement;
                Hero        = model.Hero;
                Level       = model.Level;
                Appearance  = new()
                {
                    EquippedEyesColor = model.Appearance.EquippedEyeColor,
                    EquippedHair      = new()
                    {
                        Color = model.Appearance.EquippedHair.Color,
                        Style = model.Appearance.EquippedHair.Style,
                    },
                    Hair = new()
                    {
                        Style = model.Appearance.Hair.Style,
                        Color = model.Appearance.Hair.Color,
                    },
                    EquippedSkinColor = model.Appearance.EquippedSkinColor,
                    EyesColor         = model.Appearance.EyeColor,
                    SkinColor         = model.Appearance.SkinColor,
                };

                Storages = new(model, context);
            }
Пример #2
0
 public ServiceHandler(Instance gate, RGClient relay, BinTables tables, IDbContextFactory <ItemContext> itemFactory, IDbContextFactory <AccountContext> accountFactory, IDbContextFactory <CharacterContext> characterFactory)
 {
     _gate             = gate;
     _relay            = relay;
     _tables           = tables;
     _itemFactory      = itemFactory;
     _accountFactory   = accountFactory;
     _characterFactory = characterFactory;
 }
Пример #3
0
 public GestureHandler(BinTables tables, IDbContextFactory <CharacterContext> characterRepository) =>
 (_tables, _characterRepository) = (tables, characterRepository);
Пример #4
0
        private static IEnumerable <StorageItem?> GetItems(IEnumerable <ItemModel> models, BinTables tables, ushort maxCapacity)
        {
            StorageItem?[] items = Enumerable.Repeat((StorageItem?)null, maxCapacity).ToArray();

            foreach (ItemModel model in models)
            {
                items[model.Slot] = new StorageItem(model, tables.Item[model.PrototypeId]);
            }

            return(items);
        }
Пример #5
0
 internal BaseStorage(IEnumerable <ItemModel> models, BinTables tables, ushort maxCapacity) : base(GetItems(models, tables, maxCapacity))
 {
 }
Пример #6
0
 public DayEventBoosterRepository(Instance zone, BinTables tables) : base(GetItems(zone, tables))
 {
 }
Пример #7
0
 public BoosterRepository(BinTables tables, IConfiguration configuration) : base(GetItems(tables, configuration))
 {
 }
 public EquipableBattleFashionStorage(IEnumerable <ItemModel> values, BinTables tables) : base(values, tables, Defines.EquipableFashionStorageMaxCapacity)
 {
 }
Пример #9
0
 internal EquipableGearStorage(IEnumerable <ItemModel> values, BinTables tables) : base(values, tables, Defines.EquipableFashionStorageMaxCapacity)
 {
 }
                internal CEStoragesInfos(CharacterModel model, ItemContext context, CharacterInfoTableEntity characterInfo, BinTables tables)
                {
                    EquippedBattleFashion = new(Enumerable.Empty <ItemModel>());
                    EquippedViewFashion   = new(Enumerable.Empty <ItemModel>());
                    EquippedGearWeapon    = CESIEquipableGearStorageItem.Empty;

                    //ItemTableEntity weaponItem = tables.Item[characterInfo.DefaultWeaponId];
                    //ItemClassifyTableEntity weaponClassify = tables.ItemClassify[weaponItem.ClassifyId];
                    //if (weaponClassify.SocketId != 0)
                    //{
                    //    if (weaponClassify.UseType == 1)
                    //    {
                    //    }
                    //}

                    //EquippedGearWeapon = CESIEquipableGearStorageItem.Empty;
                }