public override void Update(TimeSpan time)
            {
                base.Update(time);

                _timer.Update(time);
                if (!_timer.Passed)
                {
                    return;
                }
                _timer.Reset();


                if (ReinforceHandler._nextReinforceCounterIncrease < DateTime.Now)
                {
                    ReinforceHandler.SetNextReinforceCounterIncreaseFromNow(REINFORCE_COUNTER_INCREASE_MINUTES);

                    var oldValue = ReinforceHandler.ReinforceCounter;
                    ReinforceHandler.IncreaseReinforceCounter();
                    var newValue = ReinforceHandler.ReinforceCounter;

                    if (oldValue != newValue)
                    {
                        WriteLog("reinforce counter increased. " + ReinforceHandler._pbsUnit.ED.Name + "  " + oldValue + "->" + newValue);
                    }
                }
            }
            public override void Exit()
            {
                ReinforceHandler._pbsUnit.OrphanedStateChanged -= OnOrphanedStateChanged;
                ReinforceHandler._pbsUnit.DynamicProperties.Update(k.isReinforced, 0);
                ReinforceHandler._pbsUnit.DynamicProperties.Update(k.reinforceEnd, default(DateTime));
                ReinforceHandler._pbsUnit.States.Reinforced = false;

                ReinforceHandler.StartAsyncLog(PBSLogType.reinforceEnd);
                ReinforceHandler.SetNextReinforceCounterIncreaseFromNow(VULNERABLE_LENGTH_MINUTES);

                if (PBSHelper.IsOfflineOnReinforce(ReinforceHandler._pbsUnit))
                {
                    //go online if the node is leaving reinforce
                    ReinforceHandler._pbsUnit.SetOnlineStatus(true, false, true);
                }

                base.Exit();
            }
            public override void Enter()
            {
                var pbsUnitObject = ReinforceHandler._pbsUnit;

                pbsUnitObject.DynamicProperties.Set(k.vulnerable, 1);

                //unless the init has already set it
                if (_vulnerableEnd.Equals(default(DateTime)))
                {
                    //we calculate a new end time
                    _vulnerableEnd = DateTime.Now.AddMinutes(VULNERABLE_LENGTH_MINUTES);
                    pbsUnitObject.DynamicProperties.Update(k.vulnerableEnd, _vulnerableEnd);
                    pbsUnitObject.ApplyPvPEffect(TimeSpan.FromMinutes(VULNERABLE_LENGTH_MINUTES));
                    ReinforceHandler.SetNextReinforceCounterIncreaseFromNow(VULNERABLE_LENGTH_MINUTES);

                    var zone = pbsUnitObject.Zone;
                    if (zone != null)
                    {
                        ReinforceHandler.LogWrite(PBSLogType.vulnerableStart);
                    }
                }
                else
                {
                    //server start, was init
                    Logger.Info("VULNERABLE STATE ENTER: skipping calculation, server start. " + pbsUnitObject.Eid + " " + pbsUnitObject.Name);

                    //somewhere in the future
                    if (DateTime.Now < _vulnerableEnd)
                    {
                        var pvpEffectTime = _vulnerableEnd.Subtract(DateTime.Now);
                        pbsUnitObject.ApplyPvPEffect(pvpEffectTime);
                    }
                }

                pbsUnitObject.States.Reinforced = false;



                base.Enter();
            }
            private void DoEnter()
            {
                var pbsUnitObject = ReinforceHandler._pbsUnit;

                var zone = pbsUnitObject.Zone;

                if (zone == null)
                {
                    return;
                }

                //ettol van rajta a grafikai effekt
                pbsUnitObject.States.Reinforced = true;

                pbsUnitObject.DynamicProperties.Set(k.isReinforced, 1);

                //if already set by the init, then we skip this part
                if (_reinforceEnd.Equals(default(DateTime)))
                {
                    Logger.Info(" fresh reinforce start for " + pbsUnitObject);

                    var killer = _reinforceStartedBy?.Id;

                    //sql log
                    PBSHelper.WritePBSLog(PBSLogType.reinforceStart, pbsUnitObject.Eid, pbsUnitObject.Definition, pbsUnitObject.Owner, zoneId: zone.Configuration.Id, killerCharacterId: killer);


                    var oldCounter = ReinforceHandler.ReinforceCounter;
                    //elveszunk egy lehetoseget
                    ReinforceHandler.DecreaseReinforceCounter();
                    var newCounter = ReinforceHandler.ReinforceCounter;

                    //kozoljuk, h mikor lesz a kovetkezo reinforce increase
                    ReinforceHandler.SetNextReinforceCounterIncreaseFromNow(VULNERABLE_LENGTH_MINUTES + REINFORCE_LENGTH_MINUTES);

                    Logger.Info("reinforce counter from:" + oldCounter + " to:" + newCounter + " " + pbsUnitObject.ED.Name);

                    var networkNodes = pbsUnitObject.ConnectionHandler.NetworkNodes.ToArray();

                    if (networkNodes.Length > 1)
                    {
                        //ez egy networkben levo node

                        //ez a bazis a networkben
                        var pbsDockingBase = networkNodes.FirstOrDefault(o => o is PBSDockingBase);

                        if (pbsDockingBase != null)
                        {
                            //van bazis a networkben
                            //abban van a napi offset beallitva

                            if (!pbsDockingBase.Equals(pbsUnitObject))
                            {
                                //not myself
                                ReinforceHandler._offsetHoursWithinDay = pbsDockingBase.ReinforceHandler.ReinforceOffsetHours; //transfer the daily offset from the base

                                Logger.Info("daily offset was transferred from base to:" + pbsUnitObject.ED.Name + " " + pbsUnitObject.Name);
                            }


                            //search for the first reinforced node
                            foreach (var networkNode in networkNodes)
                            {
                                if (networkNode.Equals(pbsUnitObject))
                                {
                                    continue;
                                }

                                if (!networkNode.ReinforceHandler.CurrentState.IsReinforced)
                                {
                                    continue;
                                }

                                //ebben a nodeban van, hogy mikor lesz vege a reinforcenak
                                var tmpEnd = networkNode.ReinforceHandler.GetReinforceDetails();


                                if (!tmpEnd.Equals(default(DateTime)) && DateTime.Now < tmpEnd)
                                {
                                    _reinforceEnd = tmpEnd;

                                    Logger.Info(" ");
                                    Logger.Info(" reinforceEnd:" + _reinforceEnd);
                                    Logger.Info("reinforce timer transferred to:" + pbsUnitObject);

                                    GoOfflineOnReinforce(pbsUnitObject);

                                    return;
                                }
                            }
                        }
                    }

                    //ez az ag amikor egyedul van a networkben a node amit megtamadtak
                    //vagy nem volt node ami meghatarozta volna az ertekeket


                    _reinforceEnd = CalculateReinforceEnd();

                    Logger.Info("reinforceEnd:" + _reinforceEnd);
                    Logger.Info("node switches to reinforced: " + pbsUnitObject.Name + " " + pbsUnitObject.Eid + " " + pbsUnitObject.ED.Name);
                }
                else
                {
                    Logger.Info("ACTIVE REINFORCE STATE: skipping inital round, this is a server restart " + pbsUnitObject.Eid + " " + pbsUnitObject.Name);
                }

                GoOfflineOnReinforce(pbsUnitObject);
            }