fix: add range checks to npc combat skill behavior (#2003)

* fix: add range checks to npc combat skill behavior

tested that all enemies now cast skills smartly based on range to targets, and do not cast skills if they are out of range.

fixes an issue where the spider queen could attack you outside the normal range

fixes an issue where entering happy flower caused you to need to restart the client

fixes #965

* feedback
This commit is contained in:
David Markowitz
2026-06-18 23:27:49 -07:00
committed by GitHub
parent ce9d4e823c
commit 56504d9447
7 changed files with 74 additions and 10 deletions

View File

@@ -183,8 +183,9 @@ public:
/**
* Stuns the entity for a certain amount of time, will not work if the entity is stun immune
* @param time the time to stun the entity, if stunnable
* @param force whether or not to force the stun and ignore checks
*/
void Stun(float time);
void Stun(float time, const bool force = false);
/**
* Gets the radius that will cause this entity to get aggro'd, causing a target chase