예제 #1
0
        void CanPick(IPlayer player, Action <bool> continuation)
        {
            var skill = player.Effective.Skills.LockPicking;

            if (skill == 0)
            {
                continuation(false);
                return;
            }

            // TODO: Determine the actual probabilities the game uses.
            var baseChance = (100.0f - _lockEvent.PickDifficulty) / 100.0f;
            var adjusted   = baseChance * skill;

            RaiseAsync(QueryEvent.RandomChance((ushort)adjusted), continuation);
        }