[DiscordArchive] Is Unit::getRace() supposed to work on NPCs?
[DiscordArchive] Is Unit::getRace() supposed to work on NPCs?
Archived author: sudlud • Posted: 2023-10-26T19:30:05.928000+00:00
Original source
Is Unit::getRace() supposed to work on NPCs?
Archived author: Natrist • Posted: 2023-10-26T19:34:37.086000+00:00
Original source
Yes
Archived author: Natrist • Posted: 2023-10-26T19:35:26.847000+00:00
Original source
World of Warcraft uses an entity system of sort, back from before ECS was a hipster acronym for furry developers.
Archived author: Natrist • Posted: 2023-10-26T19:38:01.438000+00:00
Original source
Objects encapsulate pretty much everything like this: objects (units (**P**layer **C**haracters, **N**on **P**layer **C**haracters), game objects)
Archived author: sudlud • Posted: 2023-10-26T19:39:38.699000+00:00
Original source
Alright thanks! I’m always getting 0 from this function when called as an NPC so was wondering if I’m using it wrong
Archived author: sudlud • Posted: 2023-10-26T19:44:43.698000+00:00
Original source
Im within SpellAuraEffects.cpp and get the unit as the aura target, with player it works fine, NPC gender also but race is 0
Archived author: Natrist • Posted: 2023-10-26T19:45:10.109000+00:00
Original source
I'm not quite sure what the function returns exactly.
![[Image: Screenshot_2023-10-26_at_3.45.39_PM.png?...a6d5c26bd&]](https://cdn.discordapp.com/attachments/284323424032129024/1167187330981953587/Screenshot_2023-10-26_at_3.45.39_PM.png?ex=690c5228&is=690b00a8&hm=d0d613746b5e282665d47dae314f271d71333664e68fb7a567efac4a6d5c26bd&)
Archived author: Natrist • Posted: 2023-10-26T19:45:45.051000+00:00
Original source
![[Image: Screenshot_2023-10-26_at_3.45.39_PM.png?...a6d5c26bd&]](https://cdn.discordapp.com/attachments/284323424032129024/1167187330981953587/Screenshot_2023-10-26_at_3.45.39_PM.png?ex=690c5228&is=690b00a8&hm=d0d613746b5e282665d47dae314f271d71333664e68fb7a567efac4a6d5c26bd&)
Archived author: Natrist • Posted: 2023-10-26T19:46:27.905000+00:00
Original source
The highlighted line is what is being returned when the unit is not a Player Character.
Archived author: sudlud • Posted: 2023-10-26T19:53:27.208000+00:00
Original source
Thanks again - I’ll look deeper into this tomorrow, it seems that those field should hold the race but who knows why they’re wrong in my setup