TrinityCore / TrinityCore/TrinityCore

[Creature] - Fixed auto attacks in the Passive rack caused by SmartAI

Open
#29,905 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Branch-3.3.5a
Dominant language
C++
Stars
10.8k
Forks
6.4k
Avg merge
3d 16m
Merged PRs (30d)
6

Description

Description

When setting the NPC flag passive via SmartAI, the NPC does not know how to auto attack. Below is a fix that solves this problem.

https://gist.github.com/vahzxz/5cf24c07356494810eb9fb9418552de0

Close: #29783

Expected behaviour

The NPC must attack the target with the auto attack command

Steps to reproduce the problem

Set any NPC to a passive state and give him the command to attack.

Branch

3.3.5

TC rev. hash/commit

2ae8c0d32da8a5cb167de82e93c993a4f7145418

Operating system

Win Server 2022

Custom changes

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked fix gist and reproduce the issue on the 3.3.5 branch with an NPC set to passive through SmartAI. The work is done when the passive NPC executes the auto attack command against its target without regressing other creature behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.