Add on update for Bfa/pre-patch

Questions about addon itself.
97 posts Page 7 of 10
Kaminaris
Site Admin
Posts: 322
Joined: 25 Jun 2017, 03:45


Gamebred
Posts: 2
Joined: 29 Jul 2018, 17:01


31 Jul 2018, 15:59Kaminaris wrote:
Oh come on, http://www.wowinterface.com/downloads/a ... 26565.html
ROFL
Wulfknightz
Posts: 11
Joined: 18 Jul 2018, 17:49


wasnt for me :) was trying to help with all the people too lazy to ready
mah6288
Posts: 3
Joined: 23 Jul 2018, 22:47


Shadow Priest

local _ShadowWordPain = 589;
local _VampiricTouch = 34914;
local _ MindBlast = 8092;
local _MindSear = 48045;
local _MindFlay = 15407;
local _VoidEruption = 228260;
local _VoidBolt = 228266
local _ShadowFiend = 34433;
local _ShadowForm = 232698;
local _Dispersion = 47585;
local _VoidForm = 194249;
local _ShadowWordVoid = 205351;
local _ShadowWordDeath = 32379;
local_MindBender = 200174;
local _ShadowCrash = 205385;

Disc Priest

local _ShadowWordPain = 589;
local _Penance = 47540;
local _Smite = 585;
local _MindBender = 200174;
local _ShadowFiend = 34433;
local _Halo = 120517;

Holy Priest

local _HolyWordChastise = 88625;
local _Smite = 585;
local _HolyNova = 132157;
local _HolyFire = 14914;
Last edited by mah6288 on 02 Aug 2018, 11:25, edited 1 time in total.
mah6288
Posts: 3
Joined: 23 Jul 2018, 22:47


Arcane Mage
local _ChargedUp = 205032;
local _ArcaneBlast = 30451;
local _ArcaneMissles = 5143;
local _ArcaneExplosion = 1449;
local _ArcaneBarrage = 44425;
local _TimeWarp = 80353;
local _ArcanePower = 12042;
local _MirrorImage = 55342;
local _PresenceOfMind = 205025;
local _ArcaneOrb = 153626;
local _NetherTempest = 114923;
local _RuneOfPower = 116011;
local _Overpowered = 155147;
local _Resonance = 205028;

Fire Mage
local _FireBlast = 108853
local _DragonsBreath = 31661;
local _Flamestrike = 2120;
local _Scorch = 2948;
local _Pyroblast = 11366;
local _Fireball = 133;
local _MirrorImage = 55342;
local _Combustion = 190319;
local _RuneOfPower = 116011;
local _PhoenixsFlames = 194466;
local _LivingBomb = 44457;

Frost Mage
local _Blizzard = 190356;
local _ConeOfCold = 120;
local _Flurry = 44614;
local _FrostBolt = 116;
local _FrozenOrb = 84714;
local _IceLance = 30455;
local _SummonWaterElemental = 31687;
local _IcyVeins = 12472;
local _MirrorImage = 55342;
local _RuneOfPower = 116011;
local _Ebonbolt = 257537;
Last edited by mah6288 on 02 Aug 2018, 11:34, edited 1 time in total.
Kaminaris
Site Admin
Posts: 322
Joined: 25 Jun 2017, 03:45


Can you remove spells that are not offensive?
Chem
Posts: 3
Joined: 02 Aug 2018, 07:15


Hey, first of all I just wanted to thank you for the work you've done. My girl has played since vanilla beta, and I recently started learning to play with her. Trying to juggle a bunch of skills, most of which needed to be used in specific orders to be effective, was driving me crazy. Spent most of my time staring at the skill bar trying to figure out which one I wanted to use next.

I'm playing a Demonology Warlock, and everything is working fantastic (at least appears to be, debug log suggests otherwise, see below), except for Implosion. It never seems to get highlighted for cast, and with something like 6 imps out, it's capable of hitting for 420 damage AoE without crits. Seems to make a huge difference when I throw it in rotation with 6 or more imps from Hand of Guldan casts.

v8.0.1-beta
Image

Is this intentional? I apologize if it is, I'm not at all familiar with the mechanics of this game or the MaxDPS scripts themselves.

Thank you!
Chem
Posts: 3
Joined: 02 Aug 2018, 07:15


Oh wow, I just had a look at the Lua from your script. I'd never seen a World of Warcraft addon code before.

Everything is so clean, the language looks very similar to Ruby and it would appear the WoW devs did a great job with exposing the games API for developers.

I think something like this should work?

Image

The CanCast function obviously isn't needed, I just saw MaxDps:SpellAvailable(spellName, _timeShift) being used and it seemed cleaner and easier to read with a local function that returned the result without having to pass in timeShift called CanCast. I'm not sure if this is even correct, or if you needed to pass in different values than timeShift.

Edit:

Ahh, I see why. The TargetAura and Aura functions all seem to have time offsets. Is it possible in Lua to do something like this, a sort of meta-programming by passing dynamic module function names?
Code: Select all
function Get(func, spell, timeShiftOffset)
 timeShiftOffset = timeShiftOffset or 0 -- If function is called with only two args, set to 0
 return MaxDps:[func](spell, timeShift + timeShiftOffset)
end
Then you'd be able to have a unified API:
Code: Select all
Check('SpellAvailable', _SummonVilefiend)
Check('TargetAura', _UnstableAfflictionAura, 2)
Just random ideas. Let me know if you ever want any help developing this stuff, I don't know Lua but I've written code for long enough I feel comfortable picking it up and may be able to contribute something. It's certainly a beautiful language syntactically and your modules and logic are easy to follow.

Well done

Edit 2:

Oh hey, it works.

Image
Kaminaris
Site Admin
Posts: 322
Joined: 25 Jun 2017, 03:45


This function needs to be as fast as possible to adding proxy functions is not a good idea plus:
1. timeShift is crucial and NEEDs to be passed. MaxDps doesnt show you which spell you should cast right now, but a spell what you need to cast AFTER current cast will be finished.
2. Sometimes you modify timeShift when some ability is uber important by adding 1-3 seconds to it. Same goes for auras. Times added in auras is basically a pandemic 30% of initial duration.

So no, proxy functions are out of question plus timeShift is uber important. This function executes once per 150ms. And just because It is written that way its almost no CPU load.

WowApi is actually a garbage, its only clean because MaxDps has helper functions to make it look clean.
If you wanna know whats under hood look at helper.lua inside MaxDps

Check my next stream today at 20:00 CEST i will be streaming addon development.
https://www.twitch.tv/kaminaris
Chem
Posts: 3
Joined: 02 Aug 2018, 07:15


02 Aug 2018, 12:33Kaminaris wrote:
This function needs to be as fast as possible to adding proxy functions is not a good idea plus:
1. timeShift is crucial and NEEDs to be passed. MaxDps doesnt show you which spell you should cast right now, but a spell what you need to cast AFTER current cast will be finished.
2. Sometimes you modify timeShift when some ability is uber important by adding 1-3 seconds to it. Same goes for auras. Times added in auras is basically a pandemic 30% of initial duration.

So no, proxy functions are out of question plus timeShift is uber important. This function executes once per 150ms. And just because It is written that way its almost no CPU load.

WowApi is actually a garbage, its only clean because MaxDps has helper functions to make it look clean.
If you wanna know whats under hood look at helper.lua inside MaxDps

Check my next stream today at 20:00 CEST i will be streaming addon development.
https://www.twitch.tv/kaminaris
Ahh, the proxy function thing I could see being detrimental to performance.

What is table performance like in Lua?

Since essentially each spell or ability has a resource cost (Soul Shards for Warlocks), optional requirements (like talents), and a MaxDps helper check, you could do something like this:

Image

So then something like this:
if talents[_GrimoireFelguard] and MaxDps:SpellAvailable(_GrimoireFelguard, timeShift) and SoulShards >= 1

Becomes:

if CanCast(_GrimoireFelguard)

I will be watching stream!
97 posts Page 7 of 10
drogie łóżka stolik kawowy stół dębowy rozkładany