BAndysc / BAndysc/WoWDatabaseEditor

Action Invoker source/target doesn’t work with `wait` meta action

Open
#33 0 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
C#
Stars
564
Forks
169
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
ActionInvoker is null after `wait` action.

**Version (commit hash)**
d2ad04b3f53abf5738ab2e178f3a2796d52e66fe

**To Reproduce**
Steps to reproduce the behaviour:
1. Create a script
2. Create any event which has „invoker”
3. Add action `wait`
4. Add any action with invoker source
5. Test in game - doesn’t work, because invoker is null there

**Expected behaviour**
Action Invoker should work as expected after `wait` action.

**Proposed solution**
Best option would be to change TC to pass invoker here https://github.com/TrinityCore/TrinityCore/blob/master/src/server/game/AI/SmartScripts/SmartScript.cpp#L1542

Another option would be to change invoker to storedTarget in the editor, but there is a risk, this storedTargetID will be taken already. We can inform user during exporting that some storedTarget will be reserved?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the script described in the issue: an event with an invoker, a wait action, and a later action using the invoker source. Inspect the editor's handling of invoker and storedTarget during export, then review TrinityCore's SmartScript.cpp around line 1542. Done means the later action still receives the expected invoker after wait.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.