Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] uint32values: is this the ElunaQuery:GetUInt32?

[DiscordArchive] uint32values: is this the ElunaQuery:GetUInt32?

[DiscordArchive] uint32values: is this the ElunaQuery:GetUInt32?

Pages (2): Previous 1 2
rektbyfaith
Administrator
0
05-01-2024, 06:36 PM
#11
Archived author: kabi • Posted: 2024-05-01T18:36:07.922000+00:00
Original source

it's better in general performance-wise to do it via these methods?
rektbyfaith
05-01-2024, 06:36 PM #11

Archived author: kabi • Posted: 2024-05-01T18:36:07.922000+00:00
Original source

it's better in general performance-wise to do it via these methods?

rektbyfaith
Administrator
0
05-01-2024, 06:36 PM
#12
Archived author: Foe • Posted: 2024-05-01T18:36:37.277000+00:00
Original source

yes
rektbyfaith
05-01-2024, 06:36 PM #12

Archived author: Foe • Posted: 2024-05-01T18:36:37.277000+00:00
Original source

yes

rektbyfaith
Administrator
0
05-01-2024, 06:41 PM
#13
Archived author: kabi • Posted: 2024-05-01T18:41:04.001000+00:00
Original source

this may be offtopic, but does your commit need to be adopted by mod-eluna? or does "porting it" mean that the base is already there in mod-eluna and one does "only" need to add it?
rektbyfaith
05-01-2024, 06:41 PM #13

Archived author: kabi • Posted: 2024-05-01T18:41:04.001000+00:00
Original source

this may be offtopic, but does your commit need to be adopted by mod-eluna? or does "porting it" mean that the base is already there in mod-eluna and one does "only" need to add it?

rektbyfaith
Administrator
0
05-01-2024, 06:41 PM
#14
Archived author: kabi • Posted: 2024-05-01T18:41:59.547000+00:00
Original source

if the latter is the case i think i'll dive in
rektbyfaith
05-01-2024, 06:41 PM #14

Archived author: kabi • Posted: 2024-05-01T18:41:59.547000+00:00
Original source

if the latter is the case i think i'll dive in

rektbyfaith
Administrator
0
05-01-2024, 06:42 PM
#15
Archived author: Foe • Posted: 2024-05-01T18:42:50.484000+00:00
Original source

mod-eluna is a fork of Eluna maintained by Azerothcore
rektbyfaith
05-01-2024, 06:42 PM #15

Archived author: Foe • Posted: 2024-05-01T18:42:50.484000+00:00
Original source

mod-eluna is a fork of Eluna maintained by Azerothcore

rektbyfaith
Administrator
0
05-01-2024, 06:43 PM
#16
Archived author: Foe • Posted: 2024-05-01T18:43:14.754000+00:00
Original source

Quite a bit behind atm but I assume they'd accept a PR
rektbyfaith
05-01-2024, 06:43 PM #16

Archived author: Foe • Posted: 2024-05-01T18:43:14.754000+00:00
Original source

Quite a bit behind atm but I assume they'd accept a PR

rektbyfaith
Administrator
0
05-01-2024, 06:45 PM
#17
Archived author: kabi • Posted: 2024-05-01T18:45:20.224000+00:00
Original source

ok, thank you for clarifying
rektbyfaith
05-01-2024, 06:45 PM #17

Archived author: kabi • Posted: 2024-05-01T18:45:20.224000+00:00
Original source

ok, thank you for clarifying

rektbyfaith
Administrator
0
05-01-2024, 08:18 PM
#18
Archived author: kabi • Posted: 2024-05-01T20:18:00.709000+00:00
Original source

i figured it out Foe

mod-eluna
- CreatureMethods.h
```c++
/**
* Returns the [Creature]'s rank.
*
* @return [Rank] rank
*/
int GetRank(lua_State* L, Creature* creature)
{
Eluna:Tongueush(L, creature->GetCreatureTemplate()->rank);
return 1;
}
```

- LuaFunctions.cpp
```c++
ElunaRegister<Creature> CreatureMethods[] =
{
// Getters
// ...
{ "GetRank", &LuaCreature::GetRank },
// ...
};
```
lua_scripts
- test-rare.lua
```lua
local function PlayerKillsRare(event, player)
local creature = player:GetSelection()
if creature then
if (creature:GetRank() == 2) then
print("Rare creature killed.")
else
print("Normal creature killed.")
end
else
return false;
end
end

RegisterPlayerEvent(7, PlayerKillsRare)
```
this prints the expected values to the console
now i just need to learn how to use Github and PRs. thank you for nudging me in the right direction.
rektbyfaith
05-01-2024, 08:18 PM #18

Archived author: kabi • Posted: 2024-05-01T20:18:00.709000+00:00
Original source

i figured it out Foe

mod-eluna
- CreatureMethods.h
```c++
/**
* Returns the [Creature]'s rank.
*
* @return [Rank] rank
*/
int GetRank(lua_State* L, Creature* creature)
{
Eluna:Tongueush(L, creature->GetCreatureTemplate()->rank);
return 1;
}
```

- LuaFunctions.cpp
```c++
ElunaRegister<Creature> CreatureMethods[] =
{
// Getters
// ...
{ "GetRank", &LuaCreature::GetRank },
// ...
};
```
lua_scripts
- test-rare.lua
```lua
local function PlayerKillsRare(event, player)
local creature = player:GetSelection()
if creature then
if (creature:GetRank() == 2) then
print("Rare creature killed.")
else
print("Normal creature killed.")
end
else
return false;
end
end

RegisterPlayerEvent(7, PlayerKillsRare)
```
this prints the expected values to the console
now i just need to learn how to use Github and PRs. thank you for nudging me in the right direction.

rektbyfaith
Administrator
0
05-01-2024, 08:24 PM
#19
Archived author: Foe • Posted: 2024-05-01T20:24:50.764000+00:00
Original source

gj
rektbyfaith
05-01-2024, 08:24 PM #19

Archived author: Foe • Posted: 2024-05-01T20:24:50.764000+00:00
Original source

gj

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