Ordush 185 Posted November 21, 2017 Share Posted November 21, 2017 (edited) Hey all i've begun rewritting my fightclases to C#. I am using IsSpellUsable which is all nice and good. I've looked in the dll, which is obviously obfusticated. I can't seem to find heads and toe on what IsSpellUsable does? I know that it checks if you have cooldown on spell, and i'm guessing that it checks if target is in line of sight. Does it also check if you are already casting something? Because i for some spells like frost bolt etc. you don't want to wait with casting till you are not casting, due to the lag making you able to cast faster if you spam the button. :) Also what about launch? CastSpellByName ? Edited November 21, 2017 by Ordush Link to comment https://wrobot.eu/forums/topic/7757-what-does-isspellusable-check-for/ Share on other sites More sharing options...
Droidz 2738 Posted November 21, 2017 Share Posted November 21, 2017 Hello, WRobot method "IsSpellUsable" check if spell is not gray in action bar (mana, cooldown, usable on target, ...: https://wow.gamepedia.com/API_IsUsableSpell and https://wow.gamepedia.com/API_GetSpellCooldown ). if it is not a spell at cast on self, you need to check if target is in "line of sight" and target distance: var notInLineOfSight = TraceLine.TraceLineGo(ObjectManager.ObjectManager.Target.Position); var isGoodDistance = spell.IsDistanceGood; Matenia 1 Link to comment https://wrobot.eu/forums/topic/7757-what-does-isspellusable-check-for/#findComment-35513 Share on other sites More sharing options...
Ordush 185 Posted November 21, 2017 Author Share Posted November 21, 2017 4 hours ago, Droidz said: Hello, WRobot method "IsSpellUsable" check if spell is not gray in action bar (mana, cooldown, usable on target, ...: https://wow.gamepedia.com/API_IsUsableSpell and https://wow.gamepedia.com/API_GetSpellCooldown ). if it is not a spell at cast on self, you need to check if target is in "line of sight" and target distance: var notInLineOfSight = TraceLine.TraceLineGo(ObjectManager.ObjectManager.Target.Position); var isGoodDistance = spell.IsDistanceGood; Ah cool. @Droidz The most important thing for me was just to know whether or not it was trying to cast while casting. (UnitCastingInfo("player") == nil) :) Link to comment https://wrobot.eu/forums/topic/7757-what-does-isspellusable-check-for/#findComment-35518 Share on other sites More sharing options...
Coleman 1 Posted December 27, 2017 Share Posted December 27, 2017 How does it work without the spell on the action bar? Link to comment https://wrobot.eu/forums/topic/7757-what-does-isspellusable-check-for/#findComment-37108 Share on other sites More sharing options...
Matenia 628 Posted December 28, 2017 Share Posted December 28, 2017 On 27.12.2017 at 3:32 AM, Coleman said: How does it work without the spell on the action bar? In vanilla, it doesn't, because you can only check for IsUsableAction. For TBC onwards, there is IsUsableSpell Link to comment https://wrobot.eu/forums/topic/7757-what-does-isspellusable-check-for/#findComment-37157 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now