public void ServerCreateActiveRequirementStates(ICharacter character)
            {
                this.ServerResetActiveRequirements();
                if (this.IsCompleted)
                {
                    // the quest is finished - no active requirements required in that case
                    return;
                }

                var requirements = this.Quest.Requirements;

                this.serverActiveRequirements = new List <ServerCharacterActiveQuestRequirement>(requirements.Count);

                // refresh the requirement states
                for (byte index = 0; index < requirements.Count; index++)
                {
                    var requirement      = requirements[index];
                    var requirementState = this.RequirementStates[index];
                    requirement.ServerRefreshIsSatisfied(character, requirementState);

                    if (!requirementState.IsSatisfied ||
                        requirement.IsReversible)
                    {
                        // create active requirement entry
                        var questRequirement = new ServerCharacterActiveQuestRequirement(this, index, character);
                        this.serverActiveRequirements.Add(questRequirement);
                        questRequirement.IsActive = true;
                    }
                }

                this.ServerRefreshAllRequirementsSatisfied(character);
            }
            public void OnActiveRequirementSatisfiedStateChanged(
                ServerCharacterActiveQuestRequirement activeRequirement)
            {
                var isSatisfied = activeRequirement.QuestRequirementState.IsSatisfied;

                for (var index = 0; index < this.serverActiveRequirements.Count; index++)
                {
                    var entry = this.serverActiveRequirements[index];
                    if (entry != activeRequirement)
                    {
                        continue;
                    }

                    // found entry
                    if (isSatisfied &&
                        !activeRequirement.QuestRequirement.IsReversible)
                    {
                        // remove this active requirement entry as it's satisfied and cannot be reversed
                        activeRequirement.IsActive = false;
                        this.serverActiveRequirements.RemoveAt(index);
                    }

                    this.ServerRefreshAllRequirementsSatisfied(activeRequirement.Character);
                    return;
                }

                throw new Exception("Unknown requirement satisfied: " + activeRequirement);
            }