[DiscordArchive] Trying to do this void OnCombatStart(Unit* who, bool first) override and on "OnCombatStart" is givi
[DiscordArchive] Trying to do this void OnCombatStart(Unit* who, bool first) override and on "OnCombatStart" is givi
Archived author: Rafael • Posted: 2024-08-08T15:58:28.714000+00:00
Original source
Trying to do this void OnCombatStart(Unit* who, bool first) override and on "OnCombatStart" is giving me error what would be the correct function for it?
![[Image: image.png?ex=690c1e77&is=690accf7&hm=8b1...21c25db7f&]](https://cdn.discordapp.com/attachments/1255602330431127753/1271137142252244992/image.png?ex=690c1e77&is=690accf7&hm=8b107351247b35b6d08ddbbc7b732fd4c7be3040552a58ef36a2b5521c25db7f&)
Archived author: Revision • Posted: 2024-08-08T16:05:11.279000+00:00
Original source
There is no such function.
![[Image: image.png?ex=690c1e77&is=690accf7&hm=8b1...21c25db7f&]](https://cdn.discordapp.com/attachments/1255602330431127753/1271137142252244992/image.png?ex=690c1e77&is=690accf7&hm=8b107351247b35b6d08ddbbc7b732fd4c7be3040552a58ef36a2b5521c25db7f&)
Archived author: Revision • Posted: 2024-08-08T16:10:04.679000+00:00
Original source
Depending on what you want, you have these
**Player**
```cpp
void OnPlayerEnterCombat(Player* /*player*/, Unit* /*enemy*/)
```
**Unit**
```cpp
void OnUnitEnterCombat(Unit* /*unit*/, Unit* /*victim*/)
```