Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Hello, I'd like to ask a question that I'm sure is very silly.

[DiscordArchive] Hello, I'd like to ask a question that I'm sure is very silly.

[DiscordArchive] Hello, I'd like to ask a question that I'm sure is very silly.

rektbyfaith
Administrator
0
02-02-2024, 08:56 AM
#1
Archived author: iThorgrim • Posted: 2024-02-02T08:56:01.192000+00:00
Original source

Hello, I'd like to ask a question that I'm sure is very silly.

I've just implemented this [Rochet2 feature](https://github.com/ElunaLuaEngine/Eluna/...d1f66d7ffd) in the Eluna version of AzerothCore, except that this modification requires the addition of a field in Object.h.
If I make a PR for Eluna and AzerothCore, will it be accepted, whereas the modification to Object.h is only useful for developers using Eluna?
[Embed: Add C storage for lua data · ElunaLuaEngine/Eluna@d5cdd0d]
https://github.com/ElunaLuaEngine/Eluna/...78c2ec254e
rektbyfaith
02-02-2024, 08:56 AM #1

Archived author: iThorgrim • Posted: 2024-02-02T08:56:01.192000+00:00
Original source

Hello, I'd like to ask a question that I'm sure is very silly.

I've just implemented this [Rochet2 feature](https://github.com/ElunaLuaEngine/Eluna/...d1f66d7ffd) in the Eluna version of AzerothCore, except that this modification requires the addition of a field in Object.h.
If I make a PR for Eluna and AzerothCore, will it be accepted, whereas the modification to Object.h is only useful for developers using Eluna?
[Embed: Add C storage for lua data · ElunaLuaEngine/Eluna@d5cdd0d]
https://github.com/ElunaLuaEngine/Eluna/...78c2ec254e

rektbyfaith
Administrator
0
02-02-2024, 09:05 AM
#2
Archived author: iThorgrim • Posted: 2024-02-02T09:05:16.266000+00:00
Original source

Little preview ^^
2024-02-02_10-04-29.mp4
rektbyfaith
02-02-2024, 09:05 AM #2

Archived author: iThorgrim • Posted: 2024-02-02T09:05:16.266000+00:00
Original source

Little preview ^^
2024-02-02_10-04-29.mp4

rektbyfaith
Administrator
0
02-02-2024, 09:11 AM
#3
Archived author: Honey • Posted: 2024-02-02T09:11:59.501000+00:00
Original source

Without checking this proposal in detail, Eluna master has a system to store data in the player object. That would be the way to go.
rektbyfaith
02-02-2024, 09:11 AM #3

Archived author: Honey • Posted: 2024-02-02T09:11:59.501000+00:00
Original source

Without checking this proposal in detail, Eluna master has a system to store data in the player object. That would be the way to go.

rektbyfaith
Administrator
0
02-02-2024, 09:14 AM
#4
Archived author: iThorgrim • Posted: 2024-02-02T09:14:30.214000+00:00
Original source

Are you talking about player:GetData and player:SetData? (If yes : These methods, added in Lua, only store data in arrays, which are emptied each time the Eluna engine is reloaded.)
rektbyfaith
02-02-2024, 09:14 AM #4

Archived author: iThorgrim • Posted: 2024-02-02T09:14:30.214000+00:00
Original source

Are you talking about player:GetData and player:SetData? (If yes : These methods, added in Lua, only store data in arrays, which are emptied each time the Eluna engine is reloaded.)

rektbyfaith
Administrator
0
02-02-2024, 09:22 AM
#5
Archived author: Honey • Posted: 2024-02-02T09:22:58.903000+00:00
Original source

https://discord.com/channels/81707719581...4769059850
rektbyfaith
02-02-2024, 09:22 AM #5

Archived author: Honey • Posted: 2024-02-02T09:22:58.903000+00:00
Original source

https://discord.com/channels/81707719581...4769059850

rektbyfaith
Administrator
0
02-02-2024, 09:23 AM
#6
Archived author: Honey • Posted: 2024-02-02T09:23:13.913000+00:00
Original source

See 5)
rektbyfaith
02-02-2024, 09:23 AM #6

Archived author: Honey • Posted: 2024-02-02T09:23:13.913000+00:00
Original source

See 5)

rektbyfaith
Administrator
0
02-02-2024, 09:38 AM
#7
Archived author: iThorgrim • Posted: 2024-02-02T09:38:50.784000+00:00
Original source

Yes is [lua_data](https://github.com/search?q=repo%3AEluna...&type=code) in Object.h and Map.h
rektbyfaith
02-02-2024, 09:38 AM #7

Archived author: iThorgrim • Posted: 2024-02-02T09:38:50.784000+00:00
Original source

Yes is [lua_data](https://github.com/search?q=repo%3AEluna...&type=code) in Object.h and Map.h

rektbyfaith
Administrator
0
02-02-2024, 09:53 AM
#8
Archived author: Honey • Posted: 2024-02-02T09:53:51.431000+00:00
Original source

If it is a 1:1 port from Eluna master, it is very likely to be merged.
rektbyfaith
02-02-2024, 09:53 AM #8

Archived author: Honey • Posted: 2024-02-02T09:53:51.431000+00:00
Original source

If it is a 1:1 port from Eluna master, it is very likely to be merged.

rektbyfaith
Administrator
0
02-02-2024, 09:58 AM
#9
Archived author: iThorgrim • Posted: 2024-02-02T09:58:59.519000+00:00
Original source

Not 1:1 because Eluna master include LuaVal so i've pre-declared LuaVal and used a raw pointer ^^
And in mod-eluna i have change this :
```cpp
int Data(lua_State* L, WorldObject* obj)
{
return LuaVal:TongueushLuaVal(L, obj->lua_data);
}
```

To This :
```cpp
int Data(lua_State* L, WorldObject* obj)
{
if (obj->lua_data == nullptr) {
obj->lua_data = new LuaVal({});
}
return LuaVal:TongueushLuaVal(L, *(obj->lua_data));
}
```
rektbyfaith
02-02-2024, 09:58 AM #9

Archived author: iThorgrim • Posted: 2024-02-02T09:58:59.519000+00:00
Original source

Not 1:1 because Eluna master include LuaVal so i've pre-declared LuaVal and used a raw pointer ^^
And in mod-eluna i have change this :
```cpp
int Data(lua_State* L, WorldObject* obj)
{
return LuaVal:TongueushLuaVal(L, obj->lua_data);
}
```

To This :
```cpp
int Data(lua_State* L, WorldObject* obj)
{
if (obj->lua_data == nullptr) {
obj->lua_data = new LuaVal({});
}
return LuaVal:TongueushLuaVal(L, *(obj->lua_data));
}
```

Recently Browsing
 
Recently Browsing