Skip to content

Commit 2d7b8d5

Browse files
committed
Core/SAI: allow timed events from SMART_ACTION_CREATE_TIMED_EVENT to inherit their parent's SMART_EVENT_FLAG_WHILE_CHARMED flag
1 parent 4ad41d7 commit 2d7b8d5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/server/game/AI/SmartScripts/SmartScript.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1542,6 +1542,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
15421542
if (!ne.minMaxRepeat.repeatMin && !ne.minMaxRepeat.repeatMax)
15431543
ne.event_flags |= SMART_EVENT_FLAG_NOT_REPEATABLE;
15441544

1545+
if (e.event.event_flags != 0 && (e.event.event_flags & SMART_EVENT_FLAG_WHILE_CHARMED) != 0)
1546+
ne.event_flags |= SMART_EVENT_FLAG_WHILE_CHARMED;
1547+
15451548
SmartAction ac = SmartAction();
15461549
ac.type = (SMART_ACTION)SMART_ACTION_TRIGGER_TIMED_EVENT;
15471550
ac.timeEvent.id = e.action.timeEvent.id;

0 commit comments

Comments
 (0)