当前位置: 首页>>代码示例>>C#>>正文


C# QuestID类代码示例

本文整理汇总了C#中QuestID的典型用法代码示例。如果您正苦于以下问题:C# QuestID类的具体用法?C# QuestID怎么用?C# QuestID使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


QuestID类属于命名空间,在下文中一共展示了QuestID类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetRequirementsStatus

 /// <summary>
 /// Sets whether or not we have the requirements for a quest.
 /// </summary>
 /// <param name="questID">The ID of the quest.</param>
 /// <param name="hasRequirements">True if we have the requirements for the quest; false if we do not.</param>
 public void SetRequirementsStatus(QuestID questID, bool hasRequirements)
 {
     if (!_statuses.ContainsKey(questID))
         _statuses.Add(questID, hasRequirements);
     else
         _statuses[questID] = hasRequirements;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:HasQuestRequirementsTracker.cs

示例2: AcceptOrTurnInQuest

 public static PacketWriter AcceptOrTurnInQuest(MapEntityIndex questProvider, QuestID questID)
 {
     var pw = GetWriter(ClientPacketID.AcceptOrTurnInQuest);
     pw.Write(questProvider);
     pw.Write(questID);
     return pw;
 }
开发者ID:Furt,项目名称:netgore,代码行数:7,代码来源:ClientPacket.cs

示例3: AcceptOrTurnInQuestReply

 public static PacketWriter AcceptOrTurnInQuestReply(QuestID questID, bool successful, bool accepted)
 {
     var pw = GetWriter(ServerPacketID.AcceptOrTurnInQuestReply);
     pw.Write(questID);
     pw.Write(successful);
     pw.Write(accepted);
     return pw;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:8,代码来源:ServerPacket.cs

示例4: Prepare

        /// <summary>
        /// Starts getting the status for the given <paramref name="quest"/> if the value is not already acquired.
        /// </summary>
        /// <param name="quest">The quest to get the status for.</param>
        public void Prepare(QuestID quest)
        {
            if (_statuses.ContainsKey(quest))
                return;

            _statuses.Add(quest, null);

            _sendRequest(quest);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:13,代码来源:HasQuestRequirementsTracker.cs

示例5: GetDrawString

        /// <summary>
        /// Gets the string to draw for a list item.
        /// </summary>
        /// <param name="x">The item to draw.</param>
        /// <returns>The string to draw for a list item.</returns>
        static string GetDrawString(QuestID x)
        {
            var qdc = QuestDescriptionCollection.Create(ContentPaths.Dev);
            var t = qdc[x];

            if (t == null)
                return x.ToString();
            else
                return t.QuestID + ". " + t.Name + " - " + t.Description;
        }
开发者ID:wtfcolt,项目名称:game,代码行数:15,代码来源:QuestIDListBox.cs

示例6: addQuestState

        /// <summary>
        /// Adds the given state(s) to the quest with the given ID (keeping any old states)
        /// </summary>
        /// <param name="id">The particular quest</param>
        /// <param name="state">The state(s) to add</param>
        public static void addQuestState(QuestID id, QuestState state)
        {
            nullCheck();
            triggers[(int)id] |= state;

            //push event
            QuestEventArgs args = new QuestEventArgs();
            args.questID = id;
            args.questStateChange = state;
            args.add = true;
            pushEvent(args);
        }
开发者ID:ErraticUnicorn,项目名称:MOSH,代码行数:17,代码来源:Quest.cs

示例7: HasRequirements

        /// <summary>
        /// Gets if the user has the requirements for the given quest.
        /// </summary>
        /// <param name="quest">The ID of the quest to check for the requirements of.</param>
        /// <returns>True if the user has the requirements for the given <paramref name="quest"/>, false if they
        /// do not have the requirements, or null if the status is currently unknown.</returns>
        public bool? HasRequirements(QuestID quest)
        {
            bool? value;

            // Try to get the cached value
            if (!_statuses.TryGetValue(quest, out value))
            {
                // Value was not in the cache, so make the request, and return null for now
                value = null;
                Prepare(quest);
            }

            return value;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:20,代码来源:HasQuestRequirementsTracker.cs

示例8: EditorQuest

        /// <summary>
        /// Initializes a new instance of the <see cref="EditorQuest"/> class.
        /// </summary>
        /// <param name="questID">The quest ID.</param>
        /// <param name="dbController">The <see cref="IDbController"/>.</param>
        /// <exception cref="ArgumentException">No quests for the given <paramref name="questID"/> exist.</exception>
        public EditorQuest(QuestID questID, IDbController dbController)
        {
            _id = questID;

            // Get the quest database table row
            var questTable = dbController.GetQuery<SelectQuestQuery>().Execute(questID);
            if (questTable == null)
            {
                const string errmsg = "Invalid QuestID ({0}) supplied - no quests with this ID exists.";
                throw new ArgumentException(string.Format(errmsg, questID), "questID");
            }

            Debug.Assert(questID == questTable.ID);

            // Get the quest description stuff from the client-side
            var qd = _questDescriptions[ID];
            if (qd != null)
            {
                Name = qd.Name;
                Description = qd.Description;
            }
            else
            {
                Name = string.Empty;
                Description = string.Empty;
            }

            // Get the quest details from the server side
            RewardExp = questTable.RewardExp;
            RewardCash = questTable.RewardCash;
            Repeatable = questTable.Repeatable;

            _startItems =
                dbController.GetQuery<SelectQuestRequireStartItemQuery>().Execute(questID).Select(
                    x => new MutablePair<ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList();
            _finishItems =
                dbController.GetQuery<SelectQuestRequireFinishItemQuery>().Execute(questID).Select(
                    x => new MutablePair<ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList();

            _startQuests = dbController.GetQuery<SelectQuestRequireStartCompleteQuestsQuery>().Execute(questID).ToList();
            _finishQuests = dbController.GetQuery<SelectQuestRequireFinishCompleteQuestsQuery>().Execute(questID).ToList();

            _rewardItems =
                dbController.GetQuery<SelectQuestRewardItemQuery>().Execute(questID).Select(
                    x => new MutablePair<ItemTemplateID, byte>(x.ItemTemplateID, x.Amount)).ToList();

            _kills =
                dbController.GetQuery<SelectQuestRequireKillQuery>().Execute(questID).Select(
                    x => new MutablePair<CharacterTemplateID, ushort>(x.CharacterTemplateID, x.Amount)).ToList();
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:56,代码来源:EditorQuest.cs

示例9: GetOrDefault

        /// <summary>
        /// Gets the <see cref="IQuestDescription"/> for a quest, or an empty description if the quest
        /// description could not be found for the specified <paramref name="questID"/>.
        /// </summary>
        /// <param name="questID">The ID of the quest to get the <see cref="IQuestDescription"/> for.</param>
        /// <returns>The <see cref="IQuestDescription"/> for a quest, or an empty description if the quest
        /// description could not be found for the specified <paramref name="questID"/>.</returns>
        public IQuestDescription GetOrDefault(QuestID questID)
        {
            var ret = this[questID];

            if (ret == null)
            {
                return new QuestDescription
                {
                    Name = "[Unknown Quest: " + questID + "]",
                    Description = "No description for this quest could be found.",
                    QuestID = questID
                };
            }
            else
                return ret;
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:23,代码来源:QuestDescriptionCollection.cs

示例10: CharacterQuestStatusKillsTable

 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterQuestStatusKillsTable"/> class.
 /// </summary>
 /// <param name="characterID">The initial value for the corresponding property.</param>
 /// <param name="characterTemplateID">The initial value for the corresponding property.</param>
 /// <param name="count">The initial value for the corresponding property.</param>
 /// <param name="questID">The initial value for the corresponding property.</param>
 public CharacterQuestStatusKillsTable(CharacterID @characterID, CharacterTemplateID @characterTemplateID, UInt16 @count,
                                       QuestID @questID)
 {
     CharacterID = @characterID;
     CharacterTemplateID = @characterTemplateID;
     Count = @count;
     QuestID = @questID;
 }
开发者ID:Vizzini,项目名称:netgore,代码行数:15,代码来源:CharacterQuestStatusKillsTable.cs

示例11: QuestRequireStartQuestTable

 /// <summary>
 /// Initializes a new instance of the <see cref="QuestRequireStartQuestTable"/> class.
 /// </summary>
 /// <param name="questID">The initial value for the corresponding property.</param>
 /// <param name="reqQuestID">The initial value for the corresponding property.</param>
 public QuestRequireStartQuestTable(QuestID @questID, QuestID @reqQuestID)
 {
     QuestID = @questID;
     ReqQuestID = @reqQuestID;
 }
开发者ID:Vizzini,项目名称:netgore,代码行数:10,代码来源:QuestRequireStartQuestTable.cs

示例12: EventCountersQuestTable

 /// <summary>
 /// Initializes a new instance of the <see cref="EventCountersQuestTable"/> class.
 /// </summary>
 /// <param name="counter">The initial value for the corresponding property.</param>
 /// <param name="questEventCounterId">The initial value for the corresponding property.</param>
 /// <param name="questID">The initial value for the corresponding property.</param>
 public EventCountersQuestTable(Int64 @counter, Byte @questEventCounterId, QuestID @questID)
 {
     Counter = @counter;
     QuestEventCounterId = @questEventCounterId;
     QuestID = @questID;
 }
开发者ID:Vizzini,项目名称:netgore,代码行数:12,代码来源:EventCountersQuestTable.cs

示例13: HasQuestStartRequirements

 public static PacketWriter HasQuestStartRequirements(QuestID questID, bool hasRequirements)
 {
     var ret = GetWriter(ServerPacketID.HasQuestStartRequirementsReply);
     ret.Write(questID);
     ret.Write(hasRequirements);
     return ret;
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:7,代码来源:ServerPacket.cs

示例14: OnCompletedQuestAdded

            /// <summary>
            /// When overridden in the derived class, allows for handling the
            /// <see cref="UserQuestInformation.CompletedQuestAdded"/> event.
            /// </summary>
            /// <param name="questID">The ID of the quest that was added.</param>
            protected override void OnCompletedQuestAdded(QuestID questID)
            {
                base.OnCompletedQuestAdded(questID);

                UserInfo.HasStartQuestRequirements.Update(questID);
                UserInfo.HasFinishQuestRequirements.SetRequirementsStatus(questID, false);
            }
开发者ID:mateuscezar,项目名称:netgore,代码行数:12,代码来源:UserInfo.cs

示例15: OnCompletedQuestAdded

 /// <summary>
 /// When overridden in the derived class, allows for handling the
 /// <see cref="UserQuestInformation.CompletedQuestAdded"/> event.
 /// </summary>
 /// <param name="questID">The ID of the quest that was added.</param>
 protected virtual void OnCompletedQuestAdded(QuestID questID)
 {
 }
开发者ID:Vizzini,项目名称:netgore,代码行数:8,代码来源:UserQuestInformation.cs


注:本文中的QuestID类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。