thebk150 2 Posted April 27, 2020 Share Posted April 27, 2020 I'm writing a simple combat routine for an Enhancement shaman in 5.4.8 and am running into an issue that I'm hoping someone can provide a bit of insight. I'm using Marsbars' video as a framework. I have a while loop that runs when _IsRunning is true and invokes a function that has cascading 'if' statements that checks which spell to run. Before the combat routine function is called, I lock the frame and immediately unlock the frame after running spell.Launch(). The issue is that every time a spell is launcher, the client locks up for 1/3 of a second. I've added a simple timer to time how long the .launch() function is taking and it appears to be taking ~300 ms per invocation which makes sense why I'm seeing frame jutter as everything needs to execute faster than 16.67 ms. ... var watch = System.Diagnostics.Stopwatch.StartNew(); FlameShock.Launch(); Logging.WriteFight("Iteration took " + watch.ElapsedMilliseconds + "ms"); ... [F] 12:18:13 - Iteration took 306ms [F] 12:18:13 - [Spell] Cast Stormstrike (Stormstrike) Is there a better way to invoke the use of spells? Am I way off base and in over my head with how I'm implementing my combat routine? Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/ Share on other sites More sharing options...
TheSmokie 242 Posted April 27, 2020 Share Posted April 27, 2020 Yeah, message me, I’ll help. Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/#findComment-57866 Share on other sites More sharing options...
TheSmokie 242 Posted April 27, 2020 Share Posted April 27, 2020 I’m completely baffled that everyone in there mother wants to use a ingame lua inject banner Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/#findComment-57867 Share on other sites More sharing options...
Matenia 628 Posted April 27, 2020 Share Posted April 27, 2020 Spell.Launch does a lot more than a simple Lua.LuaDoString($"CastSpellByName('{spell.NameInGame}()'"); So you might wanna try the latter Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/#findComment-57868 Share on other sites More sharing options...
thebk150 2 Posted April 27, 2020 Author Share Posted April 27, 2020 Thanks for the pointer! I figured it was doing quite a bit if one invocation was taking 300 ms on a 6700k. Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/#findComment-57870 Share on other sites More sharing options...
Matenia 628 Posted April 27, 2020 Share Posted April 27, 2020 Depends on what you're doing inside the framelock. From what you showed in your example just launching the spell with no checks besides that took 300ms. If you optimize your stuff, you should be able to keep iterations below 50ms for all spells. Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/#findComment-57871 Share on other sites More sharing options...
thebk150 2 Posted April 27, 2020 Author Share Posted April 27, 2020 I'm planning on leaving most interrupt logic out and having that be manually done. I'm also planning on having a manual toggle between single-target and AoE so there shouldn't be too much positional check stuff going on. As far as the above, I'm attempting to invoke spells using Lua instead of spell.launch now. Just to make sure I have it working, I've added a Lua.LuaDoString("CastSpellByName('Lava Lash')"); That always runs unconditionally. I've verified that is spelled correctly on my current game client but it does not cast. I've also tried the following: wManager.Wow.Helpers.SpellManager.CastSpellByNameLUA("Lava Lash"); wManager.Wow.Helpers.SpellManager.CastSpellByIdLUA(60103); Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/#findComment-57873 Share on other sites More sharing options...
thebk150 2 Posted April 27, 2020 Author Share Posted April 27, 2020 Never mind I'm a complete idiot. I was building the dll to the wrong directory, rookie mistake. Everything is working way better now and iterations through my basic combat logic are taking 7-8 ms. Link to comment https://wrobot.eu/forums/topic/12086-spelllaunch-causing-frame-jutters-w-framelock/#findComment-57874 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