本文整理汇总了C#中WoWUnit.ShortGuid方法的典型用法代码示例。如果您正苦于以下问题:C# WoWUnit.ShortGuid方法的具体用法?C# WoWUnit.ShortGuid怎么用?C# WoWUnit.ShortGuid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WoWUnit
的用法示例。
在下文中一共展示了WoWUnit.ShortGuid方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: On_Cast
//.........这里部分代码省略.........
else if (StyxWoW.Me.GotAlivePet && Me.Pet.IsDead == false)
{
FTWLogger.log("cast tank-only spell {0} on pet", spell.Name);
if (SpellManager.CanCast(spell, Me.Pet))
{
FTWLogger.log("nope - failed cancast check.");
retval = SpellManager.Cast(spell, Me.Pet);
}
}
else
retval = false;
}
else if (spell.IsAreaSpell() == false)
{
// Most normal spells
if (spell.IsSelfOnlySpell)
retval = SpellManager.Cast(spell);
else
retval = SpellManager.Cast(spell, target);
// Post-spell processing
if (spellname == "Feign Death")
{
while (Me.HasAura("Feign Death"))
{
List<WoWUnit> mobs = (List<WoWUnit>)FTWCoreUnits.GetNearbyUnfriendlyUnits();
if (mobs.Count == 0 && StyxWoW.Me.HealthPercent > 95)
break;
Thread.Sleep(10);
}
}
}
else
{
// Area spell
WoWPoint loc;
if (spell.IsSelfOnlySpell && !spell.Name.EndsWith(" Trap"))
loc = StyxWoW.Me.Location;
else
loc = target.Location;
retval = SpellManager.Cast(spell);
DateTime stoptime = DateTime.Now.AddMilliseconds(500);
while (DateTime.Now < stoptime)
{
if (StyxWoW.Me.CurrentPendingCursorSpell != null)
break;
Thread.Sleep(10);
}
SpellManager.ClickRemoteLocation(loc);
stoptime = DateTime.Now.AddMilliseconds(500);
while (DateTime.Now < stoptime)
{
// Clear target spell, if one is up
if (StyxWoW.Me.CurrentPendingCursorSpell == null)
break;
Thread.Sleep(10);
}
// Clear target spell, if one is up
if (StyxWoW.Me.CurrentPendingCursorSpell != null)
Lua.DoString("SpellStopTargeting()");
}
// Add current spell to CastOnce dictionary
if (castonce == true)
FTWProps.CastOnce[spellname + target.Guid.ToString()] = DateTime.Now.AddSeconds(FTWProps.CastOnceTime);
// Wait until spell starts casting
if (spell.CastTime > 0)
{
DateTime dt = DateTime.Now.AddSeconds(1.5);
while (DateTime.Now < dt && !StyxWoW.Me.IsCasting && !StyxWoW.Me.IsChanneling)
Thread.Sleep(10);
}
// Save spell cooldown
if (retval == true)
{
FTWLogger.log(" {0} {1} on {2} {3} health {4:0} dist {5:0.0} aggro {6} {7} (addscount {8})", firstpart, spellname, target.SafeName(), target.ShortGuid(), target.HealthPercent, target.DistanceCalc(), (int)target.ThreatInfo.ThreatStatus, target.ThreatInfo.ThreatStatus, FTWProps.adds.Count);
FTWCoreStatus.SaveCooldown(spellname);
FTWProps.MovementCooldown = DateTime.Now.Add(TimeSpan.FromMilliseconds(Math.Min(1500, spell.CastTime)));
FTWProps.not_in_los_attempts = 0;
}
else
{
FTWLogger.log(Color.Gray, " - Couldn't cast spell {0} on {1} {2} at dist {3:0.0}", spellname, target.SafeName(), target.ShortGuid(), target.DistanceCalc());
}
if (FTWProps.Stuns.Contains(spellname))
{
// Don't attack again for 3 seconds - hb is slow in noticing cc's.
Blacklist.Add(target.Guid, BlacklistFlags.Combat, TimeSpan.FromSeconds(3));
if (target.Guid == StyxWoW.Me.CurrentTargetGuid)
StyxWoW.Me.ClearTarget();
}
MyTimer.Stop(fnname);
return retval;
}