Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] if its global, how would i then make some other function run after executing it?

[DiscordArchive] if its global, how would i then make some other function run after executing it?

[DiscordArchive] if its global, how would i then make some other function run after executing it?

Pages (5): Previous 1 2 3 4 5 Next
rektbyfaith
Administrator
0
04-21-2022, 01:44 PM
#21
Archived author: Foe • Posted: 2022-04-21T13:44:40.857000+00:00
Original source

yep
rektbyfaith
04-21-2022, 01:44 PM #21

Archived author: Foe • Posted: 2022-04-21T13:44:40.857000+00:00
Original source

yep

rektbyfaith
Administrator
0
04-21-2022, 01:45 PM
#22
Archived author: Foe • Posted: 2022-04-21T13:45:11.009000+00:00
Original source

you can intercept and modify the parameters if you want to as well
rektbyfaith
04-21-2022, 01:45 PM #22

Archived author: Foe • Posted: 2022-04-21T13:45:11.009000+00:00
Original source

you can intercept and modify the parameters if you want to as well

rektbyfaith
Administrator
0
04-21-2022, 01:46 PM
#23
Archived author: Foe • Posted: 2022-04-21T13:46:30.222000+00:00
Original source

```Lua
function functionA(arg1, arg2)
print(arg1, arg2)
end

local function functionXYZ()
print("extra")
-- do stuff
end

local origFunctionA = functionA;

functionA = function(...)
local foo, bar = ...

bar = "baz"
origFunctionA(foo, bar);
functionXYZ()
end

functionA("foo", "bar")```
rektbyfaith
04-21-2022, 01:46 PM #23

Archived author: Foe • Posted: 2022-04-21T13:46:30.222000+00:00
Original source

```Lua
function functionA(arg1, arg2)
print(arg1, arg2)
end

local function functionXYZ()
print("extra")
-- do stuff
end

local origFunctionA = functionA;

functionA = function(...)
local foo, bar = ...

bar = "baz"
origFunctionA(foo, bar);
functionXYZ()
end

functionA("foo", "bar")```

rektbyfaith
Administrator
0
04-21-2022, 01:48 PM
#24
Archived author: Grandold • Posted: 2022-04-21T13:48:11.057000+00:00
Original source

Ahh nice, very interesting. Mostly was thinking if that way it would be easy to modify existing ACore eluna/lua modules by just extending the code exactly in this way, but I would guess most functions in those are declared as local though.
rektbyfaith
04-21-2022, 01:48 PM #24

Archived author: Grandold • Posted: 2022-04-21T13:48:11.057000+00:00
Original source

Ahh nice, very interesting. Mostly was thinking if that way it would be easy to modify existing ACore eluna/lua modules by just extending the code exactly in this way, but I would guess most functions in those are declared as local though.

rektbyfaith
Administrator
0
04-21-2022, 01:48 PM
#25
Archived author: Foe • Posted: 2022-04-21T13:48:29.938000+00:00
Original source

They should be
rektbyfaith
04-21-2022, 01:48 PM #25

Archived author: Foe • Posted: 2022-04-21T13:48:29.938000+00:00
Original source

They should be

rektbyfaith
Administrator
0
04-21-2022, 01:49 PM
#26
Archived author: Grandold • Posted: 2022-04-21T13:49:03.517000+00:00
Original source

yea back to the drawing board
rektbyfaith
04-21-2022, 01:49 PM #26

Archived author: Grandold • Posted: 2022-04-21T13:49:03.517000+00:00
Original source

yea back to the drawing board

rektbyfaith
Administrator
0
04-21-2022, 01:49 PM
#27
Archived author: Foe • Posted: 2022-04-21T13:49:06.721000+00:00
Original source

But since it's Lua you can always edit the original ‍♂️
rektbyfaith
04-21-2022, 01:49 PM #27

Archived author: Foe • Posted: 2022-04-21T13:49:06.721000+00:00
Original source

But since it's Lua you can always edit the original ‍♂️

rektbyfaith
Administrator
0
04-21-2022, 01:49 PM
#28
Archived author: Grandold • Posted: 2022-04-21T13:49:53.119000+00:00
Original source

yea it was just some weird idea that popped into my head, ofc I do have access to the files but sounded interesting
rektbyfaith
04-21-2022, 01:49 PM #28

Archived author: Grandold • Posted: 2022-04-21T13:49:53.119000+00:00
Original source

yea it was just some weird idea that popped into my head, ofc I do have access to the files but sounded interesting

rektbyfaith
Administrator
0
04-21-2022, 01:49 PM
#29
Archived author: Grandold • Posted: 2022-04-21T13:49:55.506000+00:00
Original source

and it was!
rektbyfaith
04-21-2022, 01:49 PM #29

Archived author: Grandold • Posted: 2022-04-21T13:49:55.506000+00:00
Original source

and it was!

rektbyfaith
Administrator
0
04-21-2022, 01:50 PM
#30
Archived author: Foe • Posted: 2022-04-21T13:50:52.885000+00:00
Original source

I generally use function overrides to hijack client functionality in custom client code
rektbyfaith
04-21-2022, 01:50 PM #30

Archived author: Foe • Posted: 2022-04-21T13:50:52.885000+00:00
Original source

I generally use function overrides to hijack client functionality in custom client code

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