[DiscordArchive] so what if i am only using 10 total races. freeing up ID's (example) 11-21. Should I just recycle
[DiscordArchive] so what if i am only using 10 total races. freeing up ID's (example) 11-21. Should I just recycle
Archived author: AngryPenguinStudio • Posted: 2022-03-14T18:25:18.283000+00:00
Original source
so what if i am only using 10 total races. freeing up ID's (example) 11-21. Should I just recycle those unused IDs in place of the new races?
Archived author: Dep • Posted: 2022-03-14T18:25:22.475000+00:00
Original source
All the table loadings check if the race is out of bounds and spit errors
Archived author: AngryPenguinStudio • Posted: 2022-03-14T18:25:49.883000+00:00
Original source
this way im keeping from using 22+ for an INT possibly outside of the array check
Archived author: Dep • Posted: 2022-03-14T18:26:46.725000+00:00
Original source
```cpp
// Race value is index in ChrRaces.dbc
// EnumUtils: DESCRIBE THIS
enum Races
{
RACE_NONE = 0, // SKIP
RACE_HUMAN = 1, // TITLE Human
RACE_ORC = 2, // TITLE Orc
RACE_DWARF = 3, // TITLE Dwarf
RACE_NIGHTELF = 4, // TITLE Night Elf
RACE_UNDEAD_PLAYER = 5, // TITLE Undead
RACE_TAUREN = 6, // TITLE Tauren
RACE_GNOME = 7, // TITLE Gnome
RACE_TROLL = 8, // TITLE Troll
//RACE_GOBLIN = 9,
RACE_BLOODELF = 10, // TITLE Blood Elf
RACE_DRAENEI = 11 //, TITLE Draenei
//RACE_FEL_ORC = 12,
//RACE_NAGA = 13,
//RACE_BROKEN = 14,
//RACE_SKELETON = 15,
//RACE_VRYKUL = 16,
//RACE_TUSKARR = 17,
//RACE_FOREST_TROLL = 18,
//RACE_TAUNKA = 19,
//RACE_NORTHREND_SKELETON = 20,
//RACE_ICE_TROLL = 21
};
// max+1 for player race
#define MAX_RACES 12
```
Archived author: Dep • Posted: 2022-03-14T18:26:48.582000+00:00
Original source
here this is again
Archived author: AngryPenguinStudio • Posted: 2022-03-14T18:26:54.948000+00:00
Original source
i guess, the question is, reusing the ID's not being used would be better practice ?
Archived author: AngryPenguinStudio • Posted: 2022-03-14T18:27:23.059000+00:00
Original source
and use #define +1 of actual available
Archived author: Dep • Posted: 2022-03-14T18:27:35.438000+00:00
Original source
I might test this sending something different to the client if I don't screw the build again
Archived author: AngryPenguinStudio • Posted: 2022-03-14T18:29:37.377000+00:00
Original source
i find it strange that the tables would assume a static max number. i mean it would be that much easier to check available, add to array, +1 ... who knnows the thought process and the process they used 20 years ago ... seems strange tho.
Archived author: <o> • Posted: 2022-03-14T18:30:26.614000+00:00
Original source
those enums are leftovers from like the earliest versions of mangos from what i remember, reading dbc data was a luxury at the time