本文整理汇总了C#中Aura.Channel.World.Quests.Quest.GetResult方法的典型用法代码示例。如果您正苦于以下问题:C# Quest.GetResult方法的具体用法?C# Quest.GetResult怎么用?C# Quest.GetResult使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aura.Channel.World.Quests.Quest
的用法示例。
在下文中一共展示了Quest.GetResult方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EndQuest
/// <summary>
/// Completes and removes quest, if it exists, giving the rewards
/// in the process, if warranted.
/// </summary>
/// <param name="quest"></param>
/// <param name="rewardGroup">Reward group to use, set to -1 for no rewards.</param>
/// <param name="owl">Show owl delivering the rewards?</param>
/// <returns></returns>
private bool EndQuest(Quest quest, int rewardGroup, bool owl)
{
var result = quest.GetResult();
// Increase PTJ done/success
if (quest.Data.Type == QuestType.Deliver)
this.ModifyPtjTrackRecord(quest.Data.PtjType, +1, (result == QuestResult.Perfect ? +1 : 0));
// Rewards
if (rewardGroup != -1)
{
var rewards = quest.Data.GetRewards(rewardGroup, result);
if (rewards.Count == 0)
Log.Warning("CreatureQuests.EndQuest: No rewards for group '{0}' at result '{1}' in quest '{2}'.", rewardGroup, result, quest.Id);
else
this.GiveRewards(quest, rewards, owl);
}
// Remove from quest log.
Send.QuestClear(_creature, quest.UniqueId);
// Update PTJ stuff and stop clock
if (quest.Data.Type == QuestType.Deliver)
{
var record = this.GetPtjTrackRecord(quest.Data.PtjType);
Send.QuestUpdatePtj(_creature, quest.Data.PtjType, record.Done, record.Success);
Send.QuestEndPtj(_creature);
}
return true;
}