本文整理匯總了C#中WCell.RealmServer.Entities.Character.OnInteract方法的典型用法代碼示例。如果您正苦於以下問題:C# Character.OnInteract方法的具體用法?C# Character.OnInteract怎麽用?C# Character.OnInteract使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類WCell.RealmServer.Entities.Character
的用法示例。
在下文中一共展示了Character.OnInteract方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: UseVendor
/// <summary>
/// Character starts a trade-session with this Vendor
/// </summary>
/// <param name="chr"></param>
public void UseVendor(Character chr)
{
if (!CheckVendorInteraction(chr))
return;
chr.OnInteract(NPC);
NPCHandler.SendVendorInventoryList(chr, NPC, ItemsForSale);
}
示例2: StartQuestDialog
public static void StartQuestDialog(this IQuestHolder qHolder, Character chr)
{
chr.OnInteract(qHolder as WorldObject);
var list = qHolder.QuestHolderInfo.GetAvailableQuests(chr);
if (list.Count > 0)
{
if (list.Count == 1 && !chr.QuestLog.HasActiveQuest(list[0].Id))
{
// start a single quest if there is only one and the user did not start it yet
var autoAccept = list[0].Flags.HasFlag(QuestFlags.AutoAccept);
QuestHandler.SendDetails(qHolder, list[0], chr, !autoAccept);
if (autoAccept)
{
chr.QuestLog.TryAddQuest(list[0], qHolder);
}
}
else
{
QuestHandler.SendQuestList(qHolder, list, chr);
}
}
}
示例3: TalkToBattlemaster
/// <summary>
///
/// </summary>
/// <param name="bm"></param>
/// <param name="chr"></param>
public static void TalkToBattlemaster(this NPC bm, Character chr)
{
chr.OnInteract(bm);
BattlegroundTemplate templ = bm.Entry.BattlegroundTemplate;
if (templ != null)
{
GlobalBattlegroundQueue queue = templ.GetQueue(chr.Level);
if (queue != null)
{
BattlegroundHandler.SendBattlefieldList(chr, queue);
}
}
}