ski
Well-Known Member
- Joined
- Feb 12, 2010
- Messages
- 3,720
I tried changing all my spell casts to a massive switch/case statement, so that the conditions would be checked each time combat() is called (to allow for better reactions instead of just running through all the if-thens sequentially) but there is like 5 seconds between each spell cast.
Do we know how often Combat() is run through? Is there a better way of doing combat logic then a bunch of if's or nested-ifs? I want it to make a decision on each spellcast, as opposed to a series of sequential decisions.
With Ifs:
- Check to see if we should death coil
- Check to see if we should heal
- Check to see if we should dot
- Check to see if we should heal pet
- Check to see if we should sbolt
- Repeat
Now the problem with that is, if I don't meat the conditions for step 1 right as I hit it, I have to run through every other conditional check (and subsequent casts) before I can hit step 1 again.
What I'd like to happen:
- Check to see if we should death coil, or heal, or dot, or heal pet, or shadowbolt
- Repeat
I'd like it to check to cast before each spell, that way the logic is more intelligent. Is there a good way to do that with the current way Combat is called?
Do we know how often Combat() is run through? Is there a better way of doing combat logic then a bunch of if's or nested-ifs? I want it to make a decision on each spellcast, as opposed to a series of sequential decisions.
With Ifs:
- Check to see if we should death coil
- Check to see if we should heal
- Check to see if we should dot
- Check to see if we should heal pet
- Check to see if we should sbolt
- Repeat
Now the problem with that is, if I don't meat the conditions for step 1 right as I hit it, I have to run through every other conditional check (and subsequent casts) before I can hit step 1 again.
What I'd like to happen:
- Check to see if we should death coil, or heal, or dot, or heal pet, or shadowbolt
- Repeat
I'd like it to check to cast before each spell, that way the logic is more intelligent. Is there a good way to do that with the current way Combat is called?