feat(Core/SmartAI): introduce new SMART_EVENT_IS_IN_MELEE_RANGE - #20575
Conversation
Prevents non-instant spell casting if victim is in melee
|
We can just use SMART_EVENT_RANGE instead of SMART_EVENT_UPDATE_IC. |
There's no way to input melee range in the Ofcourse, you can just put in 5 or 8 and call it good enough 😆 |
|
There has to be a better way to do this, perhaps a 7th param for event_range that does that range calculation, or a specific number for both distances that does that calculation (e.g 9999 on both)? |
|
In keira take a look at npc |
|
19707 is an abomination. |
Do you have any newer Smart AI entries that could be used an a better example? |
|
@sogladev What's the state of this PR? |
This can be reviewed. I did not find another approach than to introduce a cast flag |
Ok, tested. Currently the irespeaker go too near to the player when taunted (It should not come close to the player). Curse of Weakness should be used by the npc only when the player is in melee range (this is what I've noted in cata classic ptr). Naturally my informations come from Cata Classic PTR, so I could be wrong, but unfortunally I've not other sources. |
|
I think this might just need a new event similar to I do wonder if this creature is using the correct spellIds? Usually spell ranges and cost are set in the spell info. Setting trigger flags to make it cost with 0 mana does Irespeaker (24999) cast 35913 'Fel Fireball' and 'Fel Consumption' 45023 ? |
SMARTCAST_NO_CAST_IN_MELEESMART_EVENT_IS_IN_MELEE_RANGE
|
Instead of using cast flags, added a new Also made the casts triggered to not cast mana |
delete castflags, use new smartAI SMART_EVENT_IS_IN_MELEE_RANGE
I think that they use Fel Consumption only on the crystals near them. |
…CAST_NO_CAST_IN_MELEE" This reverts commit 76c1206.
|
|
|
Irespeaker use Fel Fireball only one time, then she goes near the player. |
|
lowered the time between fireball events or the mob idles too long, does it look okay? irespeaker_castflag_trigger_nocombatmov.mp4 |
|
It works now. It can be merged for me. |


Changes Proposed:
This PR proposes changes to:
Issues Addressed:
SOURCE:
The changes have been validated through:
Tests Performed:
This PR has been:
How to Test the Changes:
.go c id 24999Known Issues and TODO List:
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.