本文整理汇总了C#中WoWUnit.IsAboveTheGround方法的典型用法代码示例。如果您正苦于以下问题:C# WoWUnit.IsAboveTheGround方法的具体用法?C# WoWUnit.IsAboveTheGround怎么用?C# WoWUnit.IsAboveTheGround使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WoWUnit
的用法示例。
在下文中一共展示了WoWUnit.IsAboveTheGround方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckTarget
private void CheckTarget(WoWUnit unit, ref WoWGuid prevGuid, string description, OnTargetChange onchg)
{
// there are moments where CurrentTargetGuid != 0 but CurrentTarget == null. following
// .. tries to handle by only checking CurrentTarget reference and treating null as guid = 0
if (unit == null)
{
if (prevGuid.IsValid)
{
prevGuid = WoWGuid.Empty;
onchg(unit);
if (SingularSettings.Debug)
Logger.WriteDebug(description + ": changed to: (null)");
}
}
else if (unit.Guid != prevGuid)
{
prevGuid = unit.Guid;
onchg(unit);
if (SingularSettings.Debug)
{
//Logger.WriteDebug( "GuidInfo: {0}", unit.Guid.ToString());
//Logger.WriteDebug("GuidInfo: {0:X4} {1:X4} {2:X4} {3:X4}", unit.Guid.Highest, unit.Guid.Higher, unit.Guid.Lower, unit.Guid.Lowest);
string info = "";
if (Styx.CommonBot.POI.BotPoi.Current.Guid == Me.CurrentTargetGuid)
info += string.Format(", IsBotPoi={0}", Styx.CommonBot.POI.BotPoi.Current.Type);
if (Styx.CommonBot.Targeting.Instance.TargetList.Contains(Me.CurrentTarget))
info += string.Format(", TargetIndex={0}", Styx.CommonBot.Targeting.Instance.TargetList.IndexOf(Me.CurrentTarget) + 1);
string playerInfo = "N";
if (unit.IsPlayer)
{
WoWPlayer p = unit.ToPlayer();
playerInfo = string.Format("Y, Friend={0}, IsPvp={1}, CtstPvp={2}, FfaPvp={3}", Me.IsHorde == p.IsHorde, p.IsPvPFlagged, p.ContestedPvPFlagged, p.IsFFAPvPFlagged);
}
else
{
info += string.Format(", creature={0}, tagme={1}, tagother={2}, tapall={3}",
unit.CreatureType,
unit.TaggedByMe.ToYN(),
unit.TaggedByOther.ToYN(),
unit.TappedByAllThreatLists.ToYN()
);
}
Logger.WriteDebug(description + ": changed to: {0} lvl={1} h={2:F1}%, maxh={3}, d={4:F1} yds, box={5:F1}, boss={6}, trivial={7}, player={8}, attackable={9}, neutral={10}, hostile={11}, entry={12}, faction={13}, loss={14}, facing={15}, blacklist={16}, combat={17}, flying={18}, abovgrnd={19}" + info,
unit.SafeName(),
unit.Level,
unit.HealthPercent,
unit.MaxHealth,
unit.Distance,
unit.CombatReach,
unit.IsBoss().ToYN(),
unit.IsTrivial().ToYN(),
playerInfo,
unit.Attackable.ToYN(),
unit.IsNeutral().ToYN(),
unit.IsHostile.ToYN(),
unit.Entry,
unit.FactionId,
unit.InLineOfSpellSight.ToYN(),
Me.IsSafelyFacing(unit).ToYN(),
Blacklist.Contains(unit.Guid, BlacklistFlags.Combat).ToYN(),
unit.Combat.ToYN(),
unit.IsFlying.ToYN(),
unit.IsAboveTheGround().ToYN()
);
}
}
}