Ejemplo n.º 1
0
        protected void ApplyFriendlyBuff(WoWPlayer player, MonitoredSpell spell, string buffName = null)
        {
            if (buffName == null)
            {
                buffName = spell.Name;
            }

            if (spell.KnownSpell && !player.HaveBuff(buffName) &&
                player.GetDistance < spell.MaxRange)
            {
                player.TargetPlayer();
                spell.Cast();
            }
        }
Ejemplo n.º 2
0
    public void Buff()
    {
        WoWPlayer p;
        WoWObject obj;
        List <MemoryRobot.Int128> party = Party.GetPartyGUID();

        party.Add(ObjectManager.Me.Guid);
        foreach (var playerGuid in party)
        {
            if (playerGuid.IsNotZero())
            {
                obj = ObjectManager.GetObjectByGuid(playerGuid);
                if (obj.IsValid)
                {
                    p = new WoWPlayer(obj.GetBaseAddress);
                    ObjectManager.Me.FocusGuid = p.Guid;

                    if (!p.HaveBuff("Power Word: Fortitude") && PowerWordFortitude.KnownSpell && PowerWordFortitude.IsSpellUsable)
                    {
                        PowerWordFortitude.Launch(false, false, true, "focus");
                        return;
                    }
                    if (!needBurst(0.8f) && p.Health < p.MaxHealth * 0.8 && ShadowMend.KnownSpell && ShadowMend.IsSpellUsable)
                    {
                        ShadowMend.Launch(false, false, true, "focus");
                        return;
                    }
                    if (p.Health < p.MaxHealth * 0.9 && !p.HaveBuff(194384) && PowerWordShield.KnownSpell && PowerWordShield.IsSpellUsable)
                    {
                        PowerWordShield.Launch(false, false, true, "focus");
                        return;
                    }
                }
            }
        }
    }
 private bool SingleTargetHeal(WoWPlayer player, bool combat = true)
 {
     if (player.HealthPercent < 30 && cast.OnFocusUnit(FlashHeal, player))
     {
         return(true);
     }
     if (settings.UsePowerWordShield &&
         player.HealthPercent < 50 &&
         player.RagePercentage <= 0 &&
         player.HaveBuff("Power Word: Shield") &&
         !ToolBox.HasDebuff("Weakened Soul", player.Name) &&
         cast.OnFocusUnit(PowerWordShield, player))
     {
         return(true);
     }
     if (player.HealthPercent < 60 && cast.OnFocusUnit(GreaterHeal, player))
     {
         return(true);
     }
     if (player.HealthPercent < 80 && !player.HaveBuff(Renew.Name) && cast.OnFocusUnit(Renew, player))
     {
         return(true);
     }
     if (player.HealthPercent < 95 && !player.HaveBuff(Renew.Name) && cast.OnFocusUnit(RenewRank8, player))
     {
         return(true);
     }
     if (combat && player.HealthPercent < 100)
     {
         if (cast.OnFocusUnit(PrayerOfMending, player))
         {
             return(true);
         }
     }
     return(false);
 }