azerothcore / mod-eluna

Eluna Lua Engine © for WoW Emulators
https://elunaluaengine.github.io/
GNU General Public License v3.0
98 stars 128 forks source link

fix(core/func): GetSpeedRate + SetSpeedRate + ifdefs #155

Closed svenbledt closed 1 year ago

svenbledt commented 1 year ago

Fixxed: SetSpeed and GetSpeed Function Added: SetSpeedRate and GetSpeedRate Removed: Unnecessary Ifdef's

Foe recognized on the azerothcore mod-eluna repo that the SetSpeed function is using the wrong SetSpeedRate member of unit.

This PR changes that and seperates the functions from each other.

Also we decided to remove the ifdefs that are not needed as the module is only for azerothcore and not for Trinty or Mangos.

You can test this PR by using the functions in a script and check the impact ;)

Thanks for your time!

55Honey commented 1 year ago

Thanks for the PR!

r-o-b-o-t-o commented 1 year ago

Thanks for your PR! It would have been nice if the ifdefs were removed in a separate PR, it would have improved readability and traceability 😛

It looks like you're not using forced in SetSpeedRate? If that was a leftover from copy-pasting the other function, please remove the variable.

55Honey commented 1 year ago

@svenbledt build is failing. Want to adjust?

svenbledt commented 1 year ago

@svenbledt build is failing. Want to adjust?

i sadly dont know why build is failing :D worked fine on my end :o