fix(Core/Smart Scripts): Add param5 flag for range event (#13049)

* fix(Core/Smart Scripts): Add param5 flag for range event to prevent cast on entering combat.
This commit is contained in:
Malcrom
2022-09-18 10:36:15 -03:00
committed by GitHub
parent 3dde9d904c
commit f06f5a1334
2 changed files with 8 additions and 2 deletions

View File

@@ -3430,8 +3430,13 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
if (me->IsInRange(me->GetVictim(), (float)e.event.minMaxRepeat.min, (float)e.event.minMaxRepeat.max))
ProcessTimedAction(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax, me->GetVictim());
else // xinef: make it predictable
RecalcTimer(e, 500, 500);
else
{
if (!e.event.minMaxRepeat.controller)
RecalcTimer(e, 500, 500); // xinef: make it predictable "Malcrom: This seems to be done to standardize min, max start rather than using the range values for the timer."
else
RecalcTimer(e, e.event.minMaxRepeat.repeatMin, e.event.minMaxRepeat.repeatMax); // Malcrom: if param5 value is greater than 0 first action will not happen until after repeat timer fires.
}
break;
}
case SMART_EVENT_VICTIM_CASTING: