Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] what are the arrays used for?

[DiscordArchive] what are the arrays used for?

[DiscordArchive] what are the arrays used for?

Pages (2): 1 2 Next
rektbyfaith
Administrator
0
04-30-2024, 06:28 AM
#1
Archived author: Anchy • Posted: 2024-04-30T06:28:35.074000+00:00
Original source

what are the arrays used for?
rektbyfaith
04-30-2024, 06:28 AM #1

Archived author: Anchy • Posted: 2024-04-30T06:28:35.074000+00:00
Original source

what are the arrays used for?

rektbyfaith
Administrator
0
04-30-2024, 06:37 AM
#2
Archived author: Frost® • Posted: 2024-04-30T06:37:43.281000+00:00
Original source

<@251803844307189761> are u happy with these https://github.com/azerothcore/azerothco...pull/18805 as the applyspellfix version you determine it as a hackfix
[Embed: fix(Scripts/IcecrownCitadel): Gunship Cannons generates heat on Cas...]
Makes the Cannons on Gunship Blizzlike. They generate power (heat) on cast and not on Hit.
Still uses spellscript effect but on cast instead.

Changes Proposed:

This PR proposes changes to:

Core...
https://github.com/azerothcore/azerothco...pull/18805
rektbyfaith
04-30-2024, 06:37 AM #2

Archived author: Frost® • Posted: 2024-04-30T06:37:43.281000+00:00
Original source

<@251803844307189761> are u happy with these https://github.com/azerothcore/azerothco...pull/18805 as the applyspellfix version you determine it as a hackfix
[Embed: fix(Scripts/IcecrownCitadel): Gunship Cannons generates heat on Cas...]
Makes the Cannons on Gunship Blizzlike. They generate power (heat) on cast and not on Hit.
Still uses spellscript effect but on cast instead.

Changes Proposed:

This PR proposes changes to:

Core...
https://github.com/azerothcore/azerothco...pull/18805

rektbyfaith
Administrator
0
04-30-2024, 07:16 AM
#3
Archived author: sudlud • Posted: 2024-04-30T07:16:48.260000+00:00
Original source

Schedule for a firework show, about 500-2000 entries per location
rektbyfaith
04-30-2024, 07:16 AM #3

Archived author: sudlud • Posted: 2024-04-30T07:16:48.260000+00:00
Original source

Schedule for a firework show, about 500-2000 entries per location

rektbyfaith
Administrator
0
04-30-2024, 07:17 AM
#4
Archived author: sudlud • Posted: 2024-04-30T07:17:09.692000+00:00
Original source

(Timestamp, gameobject id, spawn position)
rektbyfaith
04-30-2024, 07:17 AM #4

Archived author: sudlud • Posted: 2024-04-30T07:17:09.692000+00:00
Original source

(Timestamp, gameobject id, spawn position)

rektbyfaith
Administrator
0
04-30-2024, 07:17 AM
#5
Archived author: sudlud • Posted: 2024-04-30T07:17:59.928000+00:00
Original source

I mean I can also make a separate script for each location but that would also be a lot of copy and paste code
rektbyfaith
04-30-2024, 07:17 AM #5

Archived author: sudlud • Posted: 2024-04-30T07:17:59.928000+00:00
Original source

I mean I can also make a separate script for each location but that would also be a lot of copy and paste code

rektbyfaith
Administrator
0
04-30-2024, 07:23 AM
#6
Archived author: Anchy • Posted: 2024-04-30T07:23:15.936000+00:00
Original source

by location do you mean area? or map?
rektbyfaith
04-30-2024, 07:23 AM #6

Archived author: Anchy • Posted: 2024-04-30T07:23:15.936000+00:00
Original source

by location do you mean area? or map?

rektbyfaith
Administrator
0
04-30-2024, 07:35 AM
#7
Archived author: Anchy • Posted: 2024-04-30T07:35:00.360000+00:00
Original source

i would probably store this data in a table and load it as required
rektbyfaith
04-30-2024, 07:35 AM #7

Archived author: Anchy • Posted: 2024-04-30T07:35:00.360000+00:00
Original source

i would probably store this data in a table and load it as required

rektbyfaith
Administrator
0
04-30-2024, 08:08 AM
#8
Archived author: walkline • Posted: 2024-04-30T08:08:01.724000+00:00
Original source

Something like this?
```
void initArrayA(uint32** &array, size_t &size) {
uint32_t staticArray[][3] = {
{1, 2, 3},
{4, 5, 6},
};

size = sizeof(staticArray) / sizeof(staticArray[0]);

array = new uint32*[size];
for (size_t i = 0; i < size; ++i) {
array[i] = new uint32_t[3];
for (size_t j = 0; j < 3; ++j) {
array[i][j] = staticArray[i][j];
}
}
}


void initArrayB(uint32** &array, size_t &size)
{
//...
}


void main()
{
uint32** array;
size_t arraySize;
if (myConditionTrue)
initArrayA(array, arraySize);
else
initArrayB(array, arraySize);
}
```
rektbyfaith
04-30-2024, 08:08 AM #8

Archived author: walkline • Posted: 2024-04-30T08:08:01.724000+00:00
Original source

Something like this?
```
void initArrayA(uint32** &array, size_t &size) {
uint32_t staticArray[][3] = {
{1, 2, 3},
{4, 5, 6},
};

size = sizeof(staticArray) / sizeof(staticArray[0]);

array = new uint32*[size];
for (size_t i = 0; i < size; ++i) {
array[i] = new uint32_t[3];
for (size_t j = 0; j < 3; ++j) {
array[i][j] = staticArray[i][j];
}
}
}


void initArrayB(uint32** &array, size_t &size)
{
//...
}


void main()
{
uint32** array;
size_t arraySize;
if (myConditionTrue)
initArrayA(array, arraySize);
else
initArrayB(array, arraySize);
}
```

rektbyfaith
Administrator
0
04-30-2024, 08:10 AM
#9
Archived author: walkline • Posted: 2024-04-30T08:10:26.856000+00:00
Original source

But you also need to have a code to deallocate that array.
rektbyfaith
04-30-2024, 08:10 AM #9

Archived author: walkline • Posted: 2024-04-30T08:10:26.856000+00:00
Original source

But you also need to have a code to deallocate that array.

rektbyfaith
Administrator
0
04-30-2024, 09:02 AM
#10
Archived author: sudlud • Posted: 2024-04-30T09:02:17.778000+00:00
Original source

thanks! that is a good approach, but maybe I did not make my use case clear enough.
rektbyfaith
04-30-2024, 09:02 AM #10

Archived author: sudlud • Posted: 2024-04-30T09:02:17.778000+00:00
Original source

thanks! that is a good approach, but maybe I did not make my use case clear enough.

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