本文整理汇总了C#中WCell.RealmServer.Entities.NPC.CheckVendorInteraction方法的典型用法代码示例。如果您正苦于以下问题:C# NPC.CheckVendorInteraction方法的具体用法?C# NPC.CheckVendorInteraction怎么用?C# NPC.CheckVendorInteraction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WCell.RealmServer.Entities.NPC
的用法示例。
在下文中一共展示了NPC.CheckVendorInteraction方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TryBindTo
/// <summary>
/// Tries to bind this Character to the given NPC.
/// </summary>
/// <returns>whether the given NPC is an actual InnKeeper and this char could be bound to that Inn.</returns>
public bool TryBindTo(NPC innKeeper)
{
OnInteract(innKeeper);
if (innKeeper.BindPoint != NamedWorldZoneLocation.Zero && innKeeper.CheckVendorInteraction(this))
{
BindTo(innKeeper);
return true;
}
return false;
}
示例2: TryFly
/// <summary>
/// Sends the given Character on the given Path.
/// </summary>
/// <param name="chr">The Character to fly around.</param>
/// <param name="destinations">An array of destination TaxiNodes.</param>
/// <returns>Whether the client was sent on its way.</returns>
internal static bool TryFly(Character chr, NPC vendor, PathNode[] destinations)
{
var client = chr.Client;
if (vendor == null && chr.Role.IsStaff)
{
var dest = destinations.LastOrDefault();
if (dest != null)
{
chr.TeleportTo(dest);
return true;
}
return false;
}
if (vendor == null || !vendor.CheckVendorInteraction(chr))
{
TaxiHandler.SendActivateTaxiReply(client, TaxiActivateResponse.NotAvailable);
}
else if (PreFlightCheatChecks(client, destinations) &&
PreFlightValidPathCheck(client, destinations) &&
(client.ActiveCharacter.GodMode || PreFlightMoneyCheck(client)))
{
// All good, send an "All Good" reply to the client.
TaxiHandler.SendActivateTaxiReply(client, TaxiActivateResponse.Ok);
// PvP flag is auto-cleared when starting a taxi-flight
chr.UpdatePvPState(false, true);
FlyUnit(chr, true);
return true;
}
return false;
}
示例3: ArmorerCheatChecks
private static bool ArmorerCheatChecks(Character curChar, NPC armorer)
{
if (curChar == null)
return false;
if (armorer == null)
return false;
if (!armorer.CheckVendorInteraction(curChar))
return false;
// Remove Auras not compatible with NPC interaction
curChar.Auras.RemoveByFlag(AuraInterruptFlags.OnStartAttack);
return true;
}