[DiscordArchive] in order to execute auto attacks on every X seconds ?
[DiscordArchive] in order to execute auto attacks on every X seconds ?
Archived author: Armegon • Posted: 2022-08-31T21:56:54.825000+00:00
Original source
in order to execute auto attacks on every X seconds ?
Archived author: HelloKitty • Posted: 2022-09-01T02:13:52.476000+00:00
Original source
Afaik in 335 branch autoattack is handled in Player::Update which is called in Map::Update on one of the mapupdate worker pool threads. The timers are just tracked as state on the Unit and checked each update with isAttackReady. You can find it by searching for this in Player::Update: ```
// do attack
AttackerStateUpdate(victim, BASE_ATTACK);
resetAttackTimer(BASE_ATTACK);
```