Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Thank you for the info Foe.

[DiscordArchive] Thank you for the info Foe.

[DiscordArchive] Thank you for the info Foe.

Pages (3): 1 2 3 Next
rektbyfaith
Administrator
0
05-18-2024, 04:19 PM
#1
Archived author: Sylian • Posted: 2024-05-18T16:19:32.822000+00:00
Original source

Thank you for the info Foe.

Just got a question.

So in LUA I can set the value of stats via the SetUInt32Value, and that shows up in the character window like you also said it would.

Then if I call the Update Allstats function, it resets it back to the old value.

How can that be? In the UpdateAllStats function it does a loop where it first gets a stats value and then sets it again.

So shouldn't it work when I set that stat via LUA and then update?
rektbyfaith
05-18-2024, 04:19 PM #1

Archived author: Sylian • Posted: 2024-05-18T16:19:32.822000+00:00
Original source

Thank you for the info Foe.

Just got a question.

So in LUA I can set the value of stats via the SetUInt32Value, and that shows up in the character window like you also said it would.

Then if I call the Update Allstats function, it resets it back to the old value.

How can that be? In the UpdateAllStats function it does a loop where it first gets a stats value and then sets it again.

So shouldn't it work when I set that stat via LUA and then update?

rektbyfaith
Administrator
0
05-18-2024, 04:22 PM
#2
Archived author: Sylian • Posted: 2024-05-18T16:22:34.342000+00:00
Original source

Or would it be better to just make it a module and call the function "SetStats" inside the C++ code in my core?
rektbyfaith
05-18-2024, 04:22 PM #2

Archived author: Sylian • Posted: 2024-05-18T16:22:34.342000+00:00
Original source

Or would it be better to just make it a module and call the function "SetStats" inside the C++ code in my core?

rektbyfaith
Administrator
0
05-18-2024, 04:25 PM
#3
Archived author: Rymercyble • Posted: 2024-05-18T16:25:14.402000+00:00
Original source

i would assume update will reevaluate everything and therefore ur change means nothing bcs core data didnt change and result is same as it was before ur change
rektbyfaith
05-18-2024, 04:25 PM #3

Archived author: Rymercyble • Posted: 2024-05-18T16:25:14.402000+00:00
Original source

i would assume update will reevaluate everything and therefore ur change means nothing bcs core data didnt change and result is same as it was before ur change

rektbyfaith
Administrator
0
05-18-2024, 04:26 PM
#4
Archived author: Sylian • Posted: 2024-05-18T16:26:16.753000+00:00
Original source

Yeah, I kind of assumed it might be just client side it changes.
rektbyfaith
05-18-2024, 04:26 PM #4

Archived author: Sylian • Posted: 2024-05-18T16:26:16.753000+00:00
Original source

Yeah, I kind of assumed it might be just client side it changes.

rektbyfaith
Administrator
0
05-18-2024, 04:26 PM
#5
Archived author: Rymercyble • Posted: 2024-05-18T16:26:56.518000+00:00
Original source

if u want to change how stats are calculated u need either hook which is part of that calculation (i dont think there are any right now) or change core
rektbyfaith
05-18-2024, 04:26 PM #5

Archived author: Rymercyble • Posted: 2024-05-18T16:26:56.518000+00:00
Original source

if u want to change how stats are calculated u need either hook which is part of that calculation (i dont think there are any right now) or change core

rektbyfaith
Administrator
0
05-18-2024, 04:28 PM
#6
Archived author: Sylian • Posted: 2024-05-18T16:28:25.127000+00:00
Original source

I am already hooking the function that does the update of all stats and also calculates everything again.
There is a function called "SetStat" where you put the stat into it, but how would the performance be if I made so I could call the function via LUA compared to just making it a module that does it.
rektbyfaith
05-18-2024, 04:28 PM #6

Archived author: Sylian • Posted: 2024-05-18T16:28:25.127000+00:00
Original source

I am already hooking the function that does the update of all stats and also calculates everything again.
There is a function called "SetStat" where you put the stat into it, but how would the performance be if I made so I could call the function via LUA compared to just making it a module that does it.

rektbyfaith
Administrator
0
05-18-2024, 04:33 PM
#7
Archived author: Foe • Posted: 2024-05-18T16:33:34.326000+00:00
Original source

The core evaluates how many stats you have from different things, like buffs and items, adds them together and calculate all the other things like secondaries
rektbyfaith
05-18-2024, 04:33 PM #7

Archived author: Foe • Posted: 2024-05-18T16:33:34.326000+00:00
Original source

The core evaluates how many stats you have from different things, like buffs and items, adds them together and calculate all the other things like secondaries

rektbyfaith
Administrator
0
05-18-2024, 04:34 PM
#8
Archived author: Foe • Posted: 2024-05-18T16:34:15.413000+00:00
Original source

You need your own path in there to add your custom stats to the pool of stats from items etc before all the calculations are done and the unit values are written
rektbyfaith
05-18-2024, 04:34 PM #8

Archived author: Foe • Posted: 2024-05-18T16:34:15.413000+00:00
Original source

You need your own path in there to add your custom stats to the pool of stats from items etc before all the calculations are done and the unit values are written

rektbyfaith
Administrator
0
05-18-2024, 04:36 PM
#9
Archived author: Sylian • Posted: 2024-05-18T16:36:38.697000+00:00
Original source

So this function wont be enough to do it?
I thought this might be enough because it updates everything in one function
[Image: image.png?ex=690c25d6&is=690ad456&hm=332...1ff1930f7&]
rektbyfaith
05-18-2024, 04:36 PM #9

Archived author: Sylian • Posted: 2024-05-18T16:36:38.697000+00:00
Original source

So this function wont be enough to do it?
I thought this might be enough because it updates everything in one function
[Image: image.png?ex=690c25d6&is=690ad456&hm=332...1ff1930f7&]

rektbyfaith
Administrator
0
05-18-2024, 04:37 PM
#10
Archived author: Foe • Posted: 2024-05-18T16:37:26.891000+00:00
Original source

Possibly, but you need to add your stats somewhere
rektbyfaith
05-18-2024, 04:37 PM #10

Archived author: Foe • Posted: 2024-05-18T16:37:26.891000+00:00
Original source

Possibly, but you need to add your stats somewhere

Pages (3): 1 2 3 Next
Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)