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


C# IXmlQuest.CheckAutoReward方法代码示例

本文整理汇总了C#中IXmlQuest.CheckAutoReward方法的典型用法代码示例。如果您正苦于以下问题:C# IXmlQuest.CheckAutoReward方法的具体用法?C# IXmlQuest.CheckAutoReward怎么用?C# IXmlQuest.CheckAutoReward使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IXmlQuest的用法示例。


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

示例1: ApplyGiven

		public static bool ApplyGiven(Mobile mob, Item target, IXmlQuest quest)
		{

			if (mob == null) return false;

			// check the quest objectives for special GIVE keywords
			string newstatestr;
			bool givestatus = false;
			bool found = false;

			if (!quest.Completed1 && CheckGiveObjective(quest, mob, target, quest.Objective1, quest.State1, out newstatestr, out givestatus))
			{
				quest.State1 = newstatestr;
				quest.Completed1 = givestatus;
				found = true;
			}
			else if (!quest.Completed2 && CheckGiveObjective(quest, mob, target, quest.Objective2, quest.State2, out newstatestr, out givestatus))
			{
				quest.State2 = newstatestr;
				quest.Completed2 = givestatus;
				found = true;
			}
			else if (!quest.Completed3 && CheckGiveObjective(quest, mob, target, quest.Objective3, quest.State3, out newstatestr, out givestatus))
			{
				quest.State3 = newstatestr;
				quest.Completed3 = givestatus;
				found = true;
			}
			else if (!quest.Completed4 && CheckGiveObjective(quest, mob, target, quest.Objective4, quest.State4, out newstatestr, out givestatus))
			{
				quest.State4 = newstatestr;
				quest.Completed4 = givestatus;
				found = true;
			}
			else if (!quest.Completed5 && CheckGiveObjective(quest, mob, target, quest.Objective5, quest.State5, out newstatestr, out givestatus))
			{
				quest.State5 = newstatestr;
				quest.Completed5 = givestatus;
				found = true;
			}

			/*
			if(found)
			{
				mob.Say("Thank you.");
			} else
			{
				mob.Say("I have no use for this.");
			}
			*/

			if (quest.Owner != null && found)
			{
				quest.Owner.SendMessage("Quest item accepted.");
			}

			if (!quest.Deleted && quest.Owner != null && givestatus)
			{
				quest.Owner.SendMessage("Quest objective completed.");
				// check to see if the quest has been completed and there is a reward to be automatically handed out
				quest.CheckAutoReward();
			}

			return found;
		}
开发者ID:jamison654321,项目名称:xmlspawner,代码行数:65,代码来源:XmlQuest.cs

示例2: ApplyKilled

		public static void ApplyKilled(Mobile m_killed, Mobile m_killer, IXmlQuest quest)
		{
			if (quest == null || !quest.IsValid) return;

			string newstatestr;
			bool killstatus = false;
			if (!quest.Completed1 && CheckKillObjective(quest, m_killed, m_killer, quest.Objective1, quest.State1, out newstatestr, out killstatus))
			{
				quest.State1 = newstatestr;
				quest.Completed1 = killstatus;
			}
			else if (!quest.Completed2 && CheckKillObjective(quest, m_killed, m_killer, quest.Objective2, quest.State2, out newstatestr, out killstatus))
			{
				quest.State2 = newstatestr;
				quest.Completed2 = killstatus;
			}
			else if (!quest.Completed3 && CheckKillObjective(quest, m_killed, m_killer, quest.Objective3, quest.State3, out newstatestr, out killstatus))
			{
				quest.State3 = newstatestr;
				quest.Completed3 = killstatus;
			}
			else if (!quest.Completed4 && CheckKillObjective(quest, m_killed, m_killer, quest.Objective4, quest.State4, out newstatestr, out killstatus))
			{
				quest.State4 = newstatestr;
				quest.Completed4 = killstatus;
			}
			else if (!quest.Completed5 && CheckKillObjective(quest, m_killed, m_killer, quest.Objective5, quest.State5, out newstatestr, out killstatus))
			{
				quest.State5 = newstatestr;
				quest.Completed5 = killstatus;
			}
			if (!quest.Deleted && quest.Owner != null && killstatus)
			{
				quest.Owner.SendMessage("Quest objective completed.");
				// check to see if the quest has been completed and there is a reward to be automatically handed out
				quest.CheckAutoReward();
			}
		}
开发者ID:jamison654321,项目名称:xmlspawner,代码行数:38,代码来源:XmlQuest.cs

示例3: ApplyCollected

		public static void ApplyCollected(Item target, IXmlQuest quest)
		{
			// check the quest objectives for special COLLECT keywords
			string newstatestr;
			bool collectstatus = false;

			if (!quest.Completed1 && CheckCollectObjective(quest, target, quest.Objective1, quest.State1, out newstatestr, out collectstatus))
			{
				quest.State1 = newstatestr;
				quest.Completed1 = collectstatus;
			}
			else if (!quest.Completed2 && CheckCollectObjective(quest, target, quest.Objective2, quest.State2, out newstatestr, out collectstatus))
			{
				quest.State2 = newstatestr;
				quest.Completed2 = collectstatus;
			}
			else if (!quest.Completed3 && CheckCollectObjective(quest, target, quest.Objective3, quest.State3, out newstatestr, out collectstatus))
			{
				quest.State3 = newstatestr;
				quest.Completed3 = collectstatus;
			}
			else if (!quest.Completed4 && CheckCollectObjective(quest, target, quest.Objective4, quest.State4, out newstatestr, out collectstatus))
			{
				quest.State4 = newstatestr;
				quest.Completed4 = collectstatus;
			}
			else if (!quest.Completed5 && CheckCollectObjective(quest, target, quest.Objective5, quest.State5, out newstatestr, out collectstatus))
			{
				quest.State5 = newstatestr;
				quest.Completed5 = collectstatus;

			}
			if (!quest.Deleted && quest.Owner != null && collectstatus)
			{
				quest.Owner.SendMessage("Quest objective completed.");

				// check to see if the quest has been completed and there is a reward to be automatically handed out
				quest.CheckAutoReward();

			}
		}
开发者ID:jamison654321,项目名称:xmlspawner,代码行数:41,代码来源:XmlQuest.cs


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