Пример #1
0
 /// <summary>
 /// Помещает нарушителя за решетку
 /// </summary>
 public void PutPrisonerInJail(Client policeman, Client prisoner, bool copSuccess = true, Vector3 jailPosition = null)
 {
     _policeManager.DetachPrisoner(policeman, prisoner, true);
     SetPolicemanReward(policeman, prisoner, copSuccess);
     UpdatePrisonerInfo(prisoner);
     _playerInfoManager.ClearWanted(prisoner);
     SetInJail(prisoner, jailPosition);
 }
        /// <summary>
        /// Обработка смерти полицейского
        /// </summary>
        private void ProcessPoliceman(Client player)
        {
            if (!player.hasData(WorkData.IS_POLICEMAN))
            {
                return;
            }
            var prisoner = _policeManager.GetAttachedPlayer(player);

            if (prisoner != null)
            {
                _policeManager.DetachPrisoner(player, prisoner, true);
            }
        }