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


C# WoWUnit.Interact方法代码示例

本文整理汇总了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);
 }
开发者ID:Borgsen,项目名称:celisuis-honorbuddy-pack,代码行数:23,代码来源:LootNPCsAction.cs

示例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;
		}
开发者ID:timglide,项目名称:hb-plugins,代码行数:22,代码来源:LoveTokenBuyBot.cs

示例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();
 }
开发者ID:nikolascoppi,项目名称:jwyles-scripts,代码行数:9,代码来源:MrLunarFestival2011.cs

示例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));
开发者ID:nikolascoppi,项目名称:jwyles-scripts,代码行数:67,代码来源:CritterKillSquad_1.0.7.cs


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