Beispiel #1
0
 public override void Initialize(IMainContext context, ComboProvider combo)
 {
     _ultMin       = context.GetRootMenu().SubMenu("Combo").Item("Combo.MinUltEnemies");
     _ultMinHealth = context.GetRootMenu().SubMenu("Combo").Item("Combo.MinUltHealth%");
     _ultSave      = context.GetRootMenu().SubMenu("Combo").Item("Combo.UltforSave");
     base.Initialize(context, combo);
 }
Beispiel #2
0
 public MoradorServicesTests(IocFixtureForTests iocFixture)
 {
     _iocFixture          = iocFixture;
     _moradorServices     = iocFixture.Container.Resolve <IMoradorServices>();
     _mainContext         = iocFixture.Container.Resolve <IMainContext>();
     _apartamentoServices = iocFixture.Container.Resolve <IApartamentoServices>();
 }
Beispiel #3
0
 public override void Initialize(IMainContext context, ComboProvider combo)
 {
     _ultMin = context.GetRootMenu().SubMenu("Combo").Item("Combo.MinUltEnemies");
     _ultMinHealth = context.GetRootMenu().SubMenu("Combo").Item("Combo.MinUltHealth%");
     _ultSave = context.GetRootMenu().SubMenu("Combo").Item("Combo.UltforSave");
     base.Initialize(context, combo);
 }
Beispiel #4
0
 public AllCRUDTests(IocFixtureForTests iocFixture)
 {
     _iocFixture            = iocFixture;
     _mainContext           = _iocFixture.Container.Resolve <IMainContext>();
     _apartamentoRepository = _iocFixture.Container.Resolve <IBaseRepository <Apartamento> >();
     _blocoRepository       = _iocFixture.Container.Resolve <IBaseRepository <Bloco> >();
     _moradorRepository     = _iocFixture.Container.Resolve <IBaseRepository <Morador> >();
 }
Beispiel #5
0
 public BasePlayContext(IScoreContext scoreContext, IMainContext mainContext,
                        IEventContext eventContext, IStudyContext studyContext)
 {
     Score  = scoreContext;
     Main   = mainContext;
     Events = eventContext;
     Study  = studyContext;
 }
Beispiel #6
0
 public override void Gapcloser(IMainContext context, ComboProvider combo, ActiveGapcloser gapcloser)
 {
     if (AntiGapcloser)
     {
         SafeCast(() => Spell.Cast(ObjectManager.Player.Position));
     }
     base.Gapcloser(context, combo, gapcloser);
 }
Beispiel #7
0
 /// <summary>
 /// Disposes all external resources.
 /// </summary>
 /// <param name="disposing">The dispose indicator.</param>
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this._context != null)
         {
             this._context.Dispose();
             this._context = null;
         }
     }
 }
Beispiel #8
0
 /// <summary>
 /// 获取主键
 /// </summary>
 /// <param name="context"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public static IProperty FindPrimaryKey(this IMainContext context, Type type)
 {
     //找模型实体中标记为主键的属性名
     foreach (IProperty property in context.GetProperties(type))
     {
         if (property.IsPrimaryKey())
         {
             return(property);
         }
     }
     //如果没有,则返回Id
     return(null);
 }
        /// <summary>
        /// Does it's checks and ignites if all conditions are met. Uses Menu settings
        /// </summary>
        /// <param name="context"></param>
        /// <param name="target"></param>
        /// <param name="otherDamage">Damage that will hit for sure in the near future, e.g. brand passive</param>
        /// <param name="otherDamageTime">How much time will pass till the otherDamage applies (checks on healthreg ...)</param>
        public static void Update(IMainContext context, Obj_AI_Hero target, float otherDamage = 0f, float otherDamageTime = 3f)
        {
            if (_ignite == null || !_igniteUsage.GetValue<bool>()) return;
            if (context.GetOrbwalker().ActiveMode != Orbwalking.OrbwalkingMode.Combo && _igniteOnlyCombo.GetValue<bool>()) return;

            if (_igniteKillsteal.GetValue<bool>())
            {
                foreach (var enemy in HeroManager.Enemies)
                    UpdateOnHero(enemy, otherDamage, otherDamageTime, _igniteKillsteal.GetValue<bool>());
            }
            else if (target != null)
                UpdateOnHero(target, otherDamage, otherDamageTime, _igniteKillsteal.GetValue<bool>());
        }
Beispiel #10
0
        public virtual void Update(Orbwalking.OrbwalkingMode mode, IMainContext context, ComboProvider combo, AIHeroClient target)
        {
            if (mode == Orbwalking.OrbwalkingMode.None)
            {
                return;
            }
            if (mode == Orbwalking.OrbwalkingMode.LaneClear && SwitchClearToHarassOnTarget && target != null && HarassEnabled)
            {
                mode = Orbwalking.OrbwalkingMode.Mixed;
            }
            if (UseManaManager && !ManaManager.CanUseMana(mode))
            {
                return;
            }
            switch (mode)
            {
            case Orbwalking.OrbwalkingMode.Combo:
                if (ComboEnabled)
                {
                    Combo(context, combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.LaneClear:
                if (LaneclearEnabled)
                {
                    LaneClear(context, combo, target);
                }
                break;

            case Orbwalking.OrbwalkingMode.Mixed:
                if (HarassEnabled)
                {
                    Harass(context, combo, target);
                }
                break;
            }
        }
Beispiel #11
0
        /// <summary>
        /// Does it's checks and ignites if all conditions are met. Uses Menu settings
        /// </summary>
        /// <param name="context"></param>
        /// <param name="target"></param>
        /// <param name="otherDamage">Damage that will hit for sure in the near future, e.g. brand passive</param>
        /// <param name="otherDamageTime">How much time will pass till the otherDamage applies (checks on healthreg ...)</param>
        public static void Update(IMainContext context, AIHeroClient target, float otherDamage = 0f, float otherDamageTime = 3f)
        {
            if (_ignite == null || !_igniteUsage.GetValue <bool>())
            {
                return;
            }
            if (context.GetOrbwalker().ActiveMode != Orbwalking.OrbwalkingMode.Combo && _igniteOnlyCombo.GetValue <bool>())
            {
                return;
            }

            if (_igniteKillsteal.GetValue <bool>())
            {
                foreach (var enemy in HeroManager.Enemies)
                {
                    UpdateOnHero(enemy, otherDamage, otherDamageTime, _igniteKillsteal.GetValue <bool>());
                }
            }
            else if (target != null)
            {
                UpdateOnHero(target, otherDamage, otherDamageTime, _igniteKillsteal.GetValue <bool>());
            }
        }
        /// <summary>
        /// override in sub class to add champion combo logic. for example Garen has a fixed combo, but wants to do W not in order, but when he gets damage.
        /// In this example you would override Update and have a seperate logic for W instead of adding it to the skill routines.
        /// </summary>
        /// <param name="context"></param>
        public virtual void Update(IMainContext context)
        {
            Target = TargetSelector.GetTarget(TargetRange, DamageType);
            IgniteManager.Update(context, Target);
            Skills.Sort(); //Todo: check if expensive. Will do that event-based otherwise

            if (_totalControl)
            {
                TotalControl.Update(_orbwalker.ActiveMode, context, this, Target);

                if (!TotalControl.NeedsControl())
                {
                    TotalControl.TryTerminate(_context);
                    _totalControl = false;
                    Update(context);
                    return;
                }

                // ReSharper disable once LoopCanBeConvertedToQuery
                foreach (var skill in Skills.Where(item => item.GetPriority() > TotalControl.GetPriority()))
                {
                    skill.Update(_orbwalker.ActiveMode, context, this, Target);
                }
            }
            else
            {
                foreach (var item in Skills)
                {
                    if (_cancelUpdate)
                    {
                        _cancelUpdate = false;
                        return;
                    }
                    item.Update(_orbwalker.ActiveMode, context, this, Target);
                }
            }
        }
Beispiel #13
0
 public AdminController(IMainContext context)
 {
     this.context = context;
 }
Beispiel #14
0
 public CidRepository(IMainContext context)
 {
     _context = context;
 }
Beispiel #15
0
 public DataRepositories(IMainContext context)
     : base(context)
 {
     this.Context = context;
 }
Beispiel #16
0
 public QueryRepository(IMainContext context)
 {
     db = context;
 }
Beispiel #17
0
 public EFUnitOfWork(IMainContext context)
 {
     db = context;
 }
 /// <summary>
 /// call to init all stuffs. Menu has to exist at that time
 /// </summary>
 /// <param name="context"></param>
 public virtual void Initialize(IMainContext context)
 {
     Skills.ForEach(skill => skill.Initialize(context, this));
     _context   = context;
     _orbwalker = context.GetOrbwalker();
 }
Beispiel #19
0
 /// <summary>
 /// 构造函数,注入需要的接口
 /// </summary>
 /// <param name="mainContext">数据</param>
 /// <param name="logger"></param>
 public EntityRepository(IMainContext mainContext, ILogger <TEntity> logger)
 {
     _context = mainContext;
     _logger  = logger;
 }
Beispiel #20
0
 public Worker(IMainContext context)
 {
     db = context;
 }
Beispiel #21
0
 /// <summary>
 /// Initializes a new instance of the UnitOfWork class.
 /// </summary>
 /// <param name="context">The object context</param>
 public UnitOfWork(IMainContext context)
 {
     this._context = context;
 }
Beispiel #22
0
 public OrderRepository(IMainContext context)
 {
     _context = context;
 }
 public ApartamentoServices(IBaseRepository <Apartamento> apartamentoRepository, IMainContext mainContext)
 {
     _apartamentoRepository = apartamentoRepository;
     _mainContext           = mainContext;
 }
Beispiel #24
0
 public CartItemRepository(IMainContext context)
 {
     _context = context;
 }
Beispiel #25
0
 public MoradorController(IMoradorServices moradorServices, IMainContext mainContext)
 {
     _moradorServices = moradorServices;
     _mainContext     = mainContext;
 }
Beispiel #26
0
 public BookRepository(IMainContext context)
 {
     db = context;
 }
Beispiel #27
0
 public OptionsWindow(IMainContext parentContext)
     : base(400, 300, 400, 300)
 {
     InitializeComponent();
     DataContext = new OptionsViewModel(parentContext);
 }
Beispiel #28
0
 public ProductRepository(IMainContext context)
 {
     _context = context;
 }
Beispiel #29
0
 public BlocoServicesTests(IocFixtureForTests iocFixture)
 {
     _iocFixture    = iocFixture;
     _blocoServices = _iocFixture.Container.Resolve <IBlocoServices>();
     _mainContext   = _iocFixture.Container.Resolve <IMainContext>();
 }
Beispiel #30
0
 public EntityRepository(IMainContext context)
 {
     _context = context;
 }
Beispiel #31
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MarbleDiagramModel"/> class.
        /// </summary>
        /// <param name="name">The name.</param>
        /// <param name="indexOrder">The index order.</param>
        /// <param name="mainContext">The main context.</param>
        public MarbleDiagramModel(string name, double indexOrder, IMainContext mainContext)
        {
            //RawItems = new MarbleCollection<MarbleItemViewModel>();
            RawItems = new MarbleCollection <MarbleItemViewModel>();
            //Items = (CollectionView)CollectionViewSource.GetDefaultView(RawItems);
            Name        = name;
            IndexOrder  = indexOrder;
            MainContext = mainContext;
            MainContext.PropertyChanged += RaiseDiagramWidthChanged;

            SolidColorBrush color = _colors.GetOrAdd(name, n => CreateColor());

            Color = color;
            PositioningStrategies = Enum.GetValues(typeof(MarblePositioningStrategy)) as MarblePositioningStrategy[];
            PositioningStrategy   = MarblePositioningStrategy.GlobalTime;
            Height = ITEM_SIZE + 5;

            #region Actions

            #region _refreshCommand = new Command(...)

            _refreshCommand = new Command(param =>
            {
                Items.Refresh();
                ActionBoardVisibility = Visibility.Collapsed;
            });

            #endregion _refreshCommand = new Command(...)

            #region _globalTimeCommand = new Command(...)

            _globalTimeCommand = new Command(param =>
            {
                PositioningStrategy   = MarblePositioningStrategy.GlobalTime;
                ActionBoardVisibility = Visibility.Collapsed;
            });

            #endregion _globalTimeCommand = new Command(...)

            #region _privateTimeCommand = new Command(...)

            _privateTimeCommand = new Command(param =>
            {
                PositioningStrategy   = MarblePositioningStrategy.PrivateTime;
                ActionBoardVisibility = Visibility.Collapsed;
            });

            #endregion _privateTimeCommand = new Command(...)

            #region _sequenceCommand = new Command(...)

            _sequenceCommand = new Command(param =>
            {
                PositioningStrategy   = MarblePositioningStrategy.Sequence;
                ActionBoardVisibility = Visibility.Collapsed;
            });

            #endregion _sequenceCommand = new Command(...)

            #region _showActions = new Command(...)

            _showActions = new Command(param =>
            {
                if (ActionBoardVisibility == Visibility.Visible)
                {
                    ActionBoardVisibility = Visibility.Collapsed;
                }
                else
                {
                    ActionBoardVisibility = Visibility.Visible;
                }
            });

            #endregion _showActions = new Command(...)

            #region _hideActions = new Command(...)

            _hideActions = new Command(param =>
            {
                ActionBoardVisibility = Visibility.Collapsed;
            });

            #endregion _hideActions = new Command(...)

            #endregion Actions
        }
Beispiel #32
0
 public UserRepository(IMainContext context)
 {
     db = context;
 }
Beispiel #33
0
 public override void Gapcloser(IMainContext context, ComboProvider combo, ActiveGapcloser gapcloser)
 {
     if (AntiGapcloser)
         SafeCast(() => Spell.Cast(ObjectManager.Player.Position));
     base.Gapcloser(context, combo, gapcloser);
 }
Beispiel #34
0
 public BlocoServices(IBaseRepository <Bloco> blocoRepository, IMainContext mainContext)
 {
     _blocoRepository = blocoRepository;
     _mainContext     = mainContext;
 }
Beispiel #35
0
 public HomeController(IMainContext context)
 {
     this.context = context;
 }
Beispiel #36
0
 /// <summary>
 /// RepositoryBaseDao
 /// </summary>
 /// <param name="contexto"></param>
 protected RepositoryBaseDao(IMainContext contexto)
 {
     RepositoryContext = contexto;
 }
Beispiel #37
0
 public BlocoController(IBlocoServices blocoServices, IMainContext mainContext)
 {
     _blocoServices = blocoServices;
     _mainContext   = mainContext;
 }