November 21, 20178 yr 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, 20178 yr by Ordush
November 21, 20178 yr 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;
November 21, 20178 yr Author 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) :)
December 28, 20178 yr 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
Create an account or sign in to comment