[DiscordArchive] Maybe we could have a Unit::GetDisplayRace() method?
[DiscordArchive] Maybe we could have a Unit::GetDisplayRace() method?
Archived author: Natrist • Posted: 2023-10-28T14:00:39.969000+00:00
Original source
Because the server doesn't care whether the NPC is male/female or whatever race. It's irrelevant.
Archived author: Natrist • Posted: 2023-10-28T14:01:12.656000+00:00
Original source
The only server interaction I can see is for race/sex checks for scripts or what not, like reserving some actions to race/sex combinations.
Archived author: Natrist • Posted: 2023-10-28T14:06:35.176000+00:00
Original source
The struct name in the client is called CreatureDisplayInfoExtraRec (record, DBC).
It contains the displayRaceID, displaySexID, skinID, etc.
Archived author: Natrist • Posted: 2023-10-28T14:06:49.963000+00:00
Original source
Everything that's in the DBC, basically.
Archived author: sudlud • Posted: 2023-10-28T15:51:29.004000+00:00
Original source
I mean we already have sCreatureDisplayInfoExtraStore that holds all information from the dbc.
I could also just grep any information I need directly from there in my spell scripts
Archived author: sudlud • Posted: 2023-10-28T15:52:47.759000+00:00
Original source
It’s just that the scripts would work on players and NPCs if unit::getRace() always returns a useful value
Archived author: Natrist • Posted: 2023-10-28T16:13:02.746000+00:00
Original source
Maybe return GetDisplayRace() in GetRace() if the unit is a NPC?
Archived author: sudlud • Posted: 2023-10-28T17:18:50.216000+00:00
Original source
I think I’ll just implement GetDisplayRace() and maybe GetDisplayGender() and also add DISPLAY_RACE_xyz enum for now, which pulls the data from the dbc according to current modelid
Archived author: sudlud • Posted: 2023-10-28T17:20:46.538000+00:00
Original source
Would you put this into Unit or into Creature
Archived author: sudlud • Posted: 2023-10-28T17:21:21.307000+00:00
Original source
I mean all units can have a displayRace