Forums WoW Modding Support Archives TrinityCore Discord Archives [DiscordArchive] is that one of those things that you can duplicate if needed ?

[DiscordArchive] is that one of those things that you can duplicate if needed ?

[DiscordArchive] is that one of those things that you can duplicate if needed ?

Pages (3): Previous 1 2 3 Next
rektbyfaith
Administrator
0
03-09-2024, 07:23 PM
#11
Archived author: Foe • Posted: 2024-03-09T19:23:37.021000+00:00
Original source

I have some documentation how to do it, one sec
rektbyfaith
03-09-2024, 07:23 PM #11

Archived author: Foe • Posted: 2024-03-09T19:23:37.021000+00:00
Original source

I have some documentation how to do it, one sec

rektbyfaith
Administrator
0
03-09-2024, 07:25 PM
#12
Archived author: Foe • Posted: 2024-03-09T19:25:28.231000+00:00
Original source

```Lua
playerBig Grinata():Set("foo", { 111,222,333 }) -- save a table
playerBig Grinata():Set("foo", 2, nil) -- delete a key from the table
print(playerBig Grinata():Get("foo", 3)) -- Read data
local data = playerBig Grinata():Get("foo") -- Can store the subtable into local variable also
for k,v in pairs(data:AsLua(1)) do print(k,v) end -- convert one layer of a potentially nested table into lua table/data and iterate through it to print contents

-- You can refer to same C table from multiple places and set values to it
data:Set("bar", 666)
print(data:Get("bar") == playerBig Grinata():Set("bar"))

LuaVal.new({1,2,3}) -- one can create a new C data structure that is detached from a player if they want```
rektbyfaith
03-09-2024, 07:25 PM #12

Archived author: Foe • Posted: 2024-03-09T19:25:28.231000+00:00
Original source

```Lua
playerBig Grinata():Set("foo", { 111,222,333 }) -- save a table
playerBig Grinata():Set("foo", 2, nil) -- delete a key from the table
print(playerBig Grinata():Get("foo", 3)) -- Read data
local data = playerBig Grinata():Get("foo") -- Can store the subtable into local variable also
for k,v in pairs(data:AsLua(1)) do print(k,v) end -- convert one layer of a potentially nested table into lua table/data and iterate through it to print contents

-- You can refer to same C table from multiple places and set values to it
data:Set("bar", 666)
print(data:Get("bar") == playerBig Grinata():Set("bar"))

LuaVal.new({1,2,3}) -- one can create a new C data structure that is detached from a player if they want```

rektbyfaith
Administrator
0
03-09-2024, 07:26 PM
#13
Archived author: Foe • Posted: 2024-03-09T19:26:27.500000+00:00
Original source

if you use AsLua then you fetch it as a Lua table
rektbyfaith
03-09-2024, 07:26 PM #13

Archived author: Foe • Posted: 2024-03-09T19:26:27.500000+00:00
Original source

if you use AsLua then you fetch it as a Lua table

rektbyfaith
Administrator
0
03-09-2024, 07:26 PM
#14
Archived author: Foe • Posted: 2024-03-09T19:26:41.505000+00:00
Original source

And then you can use it that way
rektbyfaith
03-09-2024, 07:26 PM #14

Archived author: Foe • Posted: 2024-03-09T19:26:41.505000+00:00
Original source

And then you can use it that way

rektbyfaith
Administrator
0
03-09-2024, 07:26 PM
#15
Archived author: Tea • Posted: 2024-03-09T19:26:50.902000+00:00
Original source

i see AsTable in c++ tho, not AsLua
rektbyfaith
03-09-2024, 07:26 PM #15

Archived author: Tea • Posted: 2024-03-09T19:26:50.902000+00:00
Original source

i see AsTable in c++ tho, not AsLua

rektbyfaith
Administrator
0
03-09-2024, 07:26 PM
#16
Archived author: Tea • Posted: 2024-03-09T19:26:55.863000+00:00
Original source

on the metatable
rektbyfaith
03-09-2024, 07:26 PM #16

Archived author: Tea • Posted: 2024-03-09T19:26:55.863000+00:00
Original source

on the metatable

rektbyfaith
Administrator
0
03-09-2024, 07:26 PM
#17
Archived author: Foe • Posted: 2024-03-09T19:26:59.898000+00:00
Original source

Oh, maybe I renamed it
rektbyfaith
03-09-2024, 07:26 PM #17

Archived author: Foe • Posted: 2024-03-09T19:26:59.898000+00:00
Original source

Oh, maybe I renamed it

rektbyfaith
Administrator
0
03-09-2024, 07:27 PM
#18
Archived author: Foe • Posted: 2024-03-09T19:27:03.861000+00:00
Original source

Let me check
rektbyfaith
03-09-2024, 07:27 PM #18

Archived author: Foe • Posted: 2024-03-09T19:27:03.861000+00:00
Original source

Let me check

rektbyfaith
Administrator
0
03-09-2024, 07:28 PM
#19
Archived author: Foe • Posted: 2024-03-09T19:28:02.960000+00:00
Original source

lua_pushcfunction(L, &LuaVal::lua_asLua);
lua_setfield(L, -2, "AsTable");

Yep
rektbyfaith
03-09-2024, 07:28 PM #19

Archived author: Foe • Posted: 2024-03-09T19:28:02.960000+00:00
Original source

lua_pushcfunction(L, &LuaVal::lua_asLua);
lua_setfield(L, -2, "AsTable");

Yep

rektbyfaith
Administrator
0
03-09-2024, 07:28 PM
#20
Archived author: Tea • Posted: 2024-03-09T19:28:07.937000+00:00
Original source

yeah, AsTable works
rektbyfaith
03-09-2024, 07:28 PM #20

Archived author: Tea • Posted: 2024-03-09T19:28:07.937000+00:00
Original source

yeah, AsTable works

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