What's new
  • Visit Rebornbuddy
  • Visit Resources
  • Visit API Documentation
  • Visit Downloads
  • Visit Portal
  • Visit Panda Profiles
  • Visit LLamamMagic

Need Feedback on Casting

Ama

New Member
Joined
Jun 6, 2011
Messages
1,171
Reaction score
33
I noticed i've been rewriting and reusing lots of methods in all the CCs I have worked on, so I wanted to write a cast manager to simplify the code in the CCs. I am not finished, but I wanted to do a small iteration and get feedback before doing more work.

Here is the class file: CastHelper.cs

I'm also putting checks for dots in. So the CC doesn't do checks, it just calls for spells. If the spell can be cast and needs to be cast, it will cast it, log it, and return true.

The use would look like this...

PHP:
Class MyCC
{
        CastHelper.CastHelper Cast = new CastHelper.CastHelper();

        public override void Combat()
        {
                if(Cast.Buff("Seal if Truth"))
                     return;
                if(Cast.BuffGroup("Blessing of Might"))
                     return;
                if(Cast.Spell("Hand of Reckoning", 30))     //30 is distance to target
                     return;
                if(Cast.Spell("Crusader Strike"))
                     return;

or this...
                Cast.Buff("Seal if Truth");
                Cast.BuffGroup("Blessing of Might");
                Cast.Spell("Hand of Reckoning", 30);     //30 is distance to target
                Cast.Spell("Crusader Strike");
        }
}

One thing I am trying to figure out... is there a way for me to make a list in which items added to the list will expire and remove themselves?
 
Did some work on this last night and this morning. I chose Affliction Warlock for my testing class since it has a lot of dots and I wanted a good way to avoid double casting. To manage this, when a dot is cast, an ExpiringItem is created and added to a blacklist. After a few seconds the ExpiringItem turns to an empty string and later pruned from the blacklist.

SVN: CastHelper

Here is what the actual CC looks like....
PHP:
class Affliction : CombatRoutine
    {
        public override sealed string Name { get { return "CastHelper Testing"; } }
        public override WoWClass Class { get { return WoWClass.Warlock; } }
        private static LocalPlayer Me { get { return ObjectManager.Me; } }
        private CastHelper Cast = new CastHelper();

        public override void Combat()
        {
            //Cast.Buff("Fel Armor", true);
            Cast.Spell(10, "Soul Swap");
            Cast.Spell(25, "Drain Soul");
            Cast.Dot("Corruption");            
            Cast.Dot("Shadowflame"); 
            Cast.Dot("Curse of the Elements");  
            Cast.Dot("Bane of Doom");
            Cast.Spell("Demon Soul");
            Cast.Dot("Unstable Affliction");
            Cast.Dot("Haunt");
            Cast.Spell("Summon Doomguard");
            Cast.Dot("Shadow Bolt", "Shadow Embrace", 3);
            Cast.Self(50, 50, "Life Tap");
            Cast.Moving("Fel Flame");
            Cast.Spell("Shadow Bolt");
        }
    }
 
Did some work on this last night and this morning. I chose Affliction Warlock for my testing class since it has a lot of dots and I wanted a good way to avoid double casting. To manage this, when a dot is cast, an ExpiringItem is created and added to a blacklist. After a few seconds the ExpiringItem turns to an empty string and later pruned from the blacklist.

SVN: CastHelper

Here is what the actual CC looks like....
PHP:
class Affliction : CombatRoutine
    {
        public override sealed string Name { get { return "CastHelper Testing"; } }
        public override WoWClass Class { get { return WoWClass.Warlock; } }
        private static LocalPlayer Me { get { return ObjectManager.Me; } }
        private CastHelper Cast = new CastHelper();

        public override void Combat()
        {
            //Cast.Buff("Fel Armor", true);
            Cast.Spell(10, "Soul Swap");
            Cast.Spell(25, "Drain Soul");
            Cast.Dot("Corruption");            
            Cast.Dot("Shadowflame"); 
            Cast.Dot("Curse of the Elements");  
            Cast.Dot("Bane of Doom");
            Cast.Spell("Demon Soul");
            Cast.Dot("Unstable Affliction");
            Cast.Dot("Haunt");
            Cast.Spell("Summon Doomguard");
            Cast.Dot("Shadow Bolt", "Shadow Embrace", 3);
            Cast.Self(50, 50, "Life Tap");
            Cast.Moving("Fel Flame");
            Cast.Spell("Shadow Bolt");
        }
    }

Hmm, that definately something Shaddar and i would be interested in for the Warlock CCs
 
Back
Top