Thread Tools Display Modes
01-21-24, 08:17 PM   #1
Tottycek
A Defias Bandit
Join Date: Jan 2024
Posts: 2
Addon modifying help

Heya,

i have been trying to modify one addon, namely Quartz. It is an older version, it will be in use on the last patch of cataclysm 4.3.4

I tried out getting help from ChatGPT, Im a total newbie regarding lua coding, whenever i see the code, it makes sense to me and im able to understand it atleast in the most cases, but im unable to write it myself. Could use some help here, if you dont mind

local channelingTicks = {
-- warlock
[GetSpellInfo(1120)] = 6, -- drain soul
[GetSpellInfo(689)] = 3, -- drain life
[GetSpellInfo(5740)] = 4, -- rain of fire
-- druid
[GetSpellInfo(740)] = 4, -- Tranquility
[GetSpellInfo(16914)] = 10, -- Hurricane
-- priest
[GetSpellInfo(15407)] = 3, -- mind flay
[GetSpellInfo(48045)] = 5, -- mind sear
[GetSpellInfo(47540)] = 3, -- penance
-- mage
[GetSpellInfo(5143)] = 5, -- arcane missiles
[GetSpellInfo(10)] = 5, -- blizzard
[GetSpellInfo(12051)] = 4, -- evocation
}


the issue is, the ticks for spells are predetermined without taking into account any haste, so i would like to replace the numbers with dynamic values, based on the haste rating the player currently has.

Example:
If the player has 1280 haste or more, the Drain Soul tick is set at 5.
If the player has 1670 haste or mroe, the Drain soul tick is set at 6.

Im not directly asking for you guys to write the code directly, i wouldnt mind that i guess, but could you atleast point me towards the functions i should use? Also, am I even able to just do a bit of code before and then the output will be (lets say) "hasteValue", then replace the number itselft with "hasteValue" without changing the code completely?

Thanks alot of any answers.
  Reply With Quote
01-21-24, 08:34 PM   #2
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
I personally don't know if it is possible to get that sort of information in an addon. But if it was possible to see the *total* value that you could then calculate the difference from it would likely be while looking at the combat log when you use the spells.

If one of the damage meters seems to show that information, maybe you can take a look at their code and see if you can locate the block(s) of code where they deal with that info.


And, hopefully someone with more knowledge in this area will have a better answer for you

Good Luck
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
01-21-24, 08:37 PM   #3
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
There is a GetHaste function that you might be able to use to get a value to work with though.

https://warcraft.wiki.gg/wiki/API_GetHaste
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote
01-21-24, 08:59 PM   #4
Tottycek
A Defias Bandit
Join Date: Jan 2024
Posts: 2
I was able to get my spell haste value using
UnitSpellHaste("player")

atleast im moving somewhere
  Reply With Quote
01-21-24, 10:20 PM   #5
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,879
This site does not support people using private servers.
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.
  Reply With Quote
01-22-24, 05:57 AM   #6
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,934
To correct your original post regards Quartz.

It has been updated to both work in WoW Classic Era and Wow Retail
https://www.wowace.com/projects/quartz/files

3.7.7 for WoW 1.15.0 updated November 2023 ( WoW Classic Era Season of Discovery )
3.7.6 for WoW 10.1.5 updated July 2023 (WoW Retail Dragonflight )
3.6.12 for WoW 3.4.0 updated August 2022 ( WoW Classic WotLK )

If you are using one of the official servers then one of those will hopefully work.

And in regards to access to API help the most up to date site is https://warcraft.wiki.gg/wiki/World_of_Warcraft_API. All official servers are pretty much on the same API base, with just game functionality changing according to which version it is. Wow Classic Era (Season of ... ), Wow Classic ( WotLK ) and Retail ( Dragonflight ). UnitSpellHaste is no longer a function on the official servers - they replaced the API a few expansions back and all versions now use the same version for the most part.

So, as per Fizzle, we can't help if you are not working on an addon for official versions of the game. If you are working on an addon for one or more of the official versions. Try the Quartz versions I mentioned above.

If you are planning on an addon for the next Classic version ( which will be Cataclysm ), due to arrive in the next few months. Then, going back to the old Cataclysm version will not help, as most if not all of the functionality will have been replaced with new ones a la the wiki link above. When Cata Beta or PTR hits ( assuming it does ) you can try one of the versions of Quartz as I listed and linked above to see which one is likely to work the best ( probably 10.1.5 version until they make a new version for Cata Classic )
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Addon modifying help


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off