本文整理汇总了C#中WoWUnit.Interact方法的典型用法代码示例。如果您正苦于以下问题:C# WoWUnit.Interact方法的具体用法?C# WoWUnit.Interact怎么用?C# WoWUnit.Interact使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WoWUnit
的用法示例。
在下文中一共展示了WoWUnit.Interact方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LootNPC
void LootNPC(WoWUnit lootableUnit)
{
if (lootableUnit.WithinInteractRange)
{
if (LootFrame.Instance != null && LootFrame.Instance.IsVisible)
{
// record all loot info..
for (int i = 0; i < LootFrame.Instance.LootItems; i++)
{
var lootInfo = LootFrame.Instance.LootInfo(i);
if (AutoAngler.FishCaught.ContainsKey(lootInfo.LootName))
AutoAngler.FishCaught[lootInfo.LootName] += (uint)lootInfo.LootQuantity;
else
AutoAngler.FishCaught.Add(lootInfo.LootName, (uint)lootInfo.LootQuantity);
}
LootFrame.Instance.LootAll();
}
else
lootableUnit.Interact();
}
else
Navigator.MoveTo(lootableUnit.Location);
}
示例2: FindMerchant
private bool FindMerchant() {
ObjectManager.Update();
WoWUnit merchant = ObjectManager.GetObjectsOfType<WoWUnit>()
.FirstOrDefault(u => u.Entry == LovelyMerchantId);
if (null == merchant) {
BuyLoveTokens = false;
return true;
// return false;
}
LoveTokenBuyBot.merchant = merchant;
if (merchant.Distance > MerchantInteractDistance) {
Navigator.MoveTo(merchant.Location);
}
merchant.Interact();
BuyLoveTokens = true;
return true;
}
示例3: DoQuest
public static void DoQuest(WoWUnit Target)
{
Logging.Write("Doing Quest at NPC " + Target.Name);
Target.Interact();
Thread.Sleep(600);
Lua.DoString("SelectGossipAvailableQuest(1)");
Thread.Sleep(600);
Styx.Logic.Inventory.Frames.Quest.QuestFrame.Instance.CompleteQuest();
}
示例4: Routine
//.........这里部分代码省略.........
MoveToNode(_unit, 3);
TreeRoot.StatusText = "CritterKillSquad: Cast " + KStoß.Name + " ...";
BotCKS.slog("Cast " + KStoß.Name);
if (!StyxWoW.Me.GotTarget || !StyxWoW.Me.CurrentTarget.IsAlive || StyxWoW.Me.CurrentTarget != _unit)
{
TreeRoot.StatusText = "CritterKillSquad: face " + _unit.Name + " ...";
_unit.Target();
_unit.Face();
Thread.Sleep(BotCKS.ran.Next(200, 500));
}
KStoß.Cast();
Thread.Sleep(BotCKS.ran.Next(950, 1200));
StyxWoW.Me.ClearTarget();
}
else if (SpellManager.HasSpell(Richturteil.Id) && !Styx.StyxWoW.GlobalCooldown && !Richturteil.Cooldown && StyxWoW.Me.HasAura(SiegelDW.Name))
{
TreeRoot.StatusText = "CritterKillSquad: Cast " + Richturteil.Name + " ...";
BotCKS.slog("Cast " + Richturteil.Name);
_unit.Target();
Richturteil.Cast();
Thread.Sleep(BotCKS.ran.Next(950, 1200));
}
else if(_unit.IsAlive)
{
if (_unit.Distance >= 3)
{
BotCKS.StuckDetector();
MoveToNode(_unit, 3);
}
TreeRoot.StatusText = "CritterKillSquad: no Cast ready! Interact with " + _unit.Name;
BotCKS.slog("no Cast ready! Interact with " + _unit.Name);
_unit.Target(); _unit.Interact();
Thread.Sleep(BotCKS.ran.Next(200, 500));
}
}
#endregion
else
#region SHAMAN
if (StyxWoW.Me.Class == WoWClass.Shaman)
{
TreeRoot.StatusText = "CritterKillSquad: slay node ...";
bool canErdbeben = true;
WoWUnit AOEunit = BotCKS.getNode(_unit, 11, 3); //AOEunit = null;
WoWSpell erdbeben = WoWSpell.FromId(61882);
WoWSpell gewitter = WoWSpell.FromId(51490);
WoWSpell blitzschlag = WoWSpell.FromId(403);
if (AOEunit != null && AOEunit.IsAlive && !Styx.StyxWoW.GlobalCooldown && ((SpellManager.HasSpell(gewitter) && !gewitter.Cooldown) || (SpellManager.HasSpell(erdbeben) && !erdbeben.Cooldown)))
{
if (SpellManager.HasSpell(erdbeben) && !erdbeben.Cooldown && AOEunit != null && canErdbeben && StyxWoW.Me.ManaPercent > 35)
{
if (AOEunit != null && (AOEunit.Distance >= CharacterSettings.Instance.PullDistance || (AOEunit.Distance <= CharacterSettings.Instance.PullDistance && !_unit.InLineOfSight)))
{
MoveToNode(CharacterSettings.Instance.PullDistance, AOEunit);
}
erdbeben.Cast();
Thread.Sleep(BotCKS.ran.Next(200, 500));