mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
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:
@@ -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:
|
||||
|
||||
@@ -221,6 +221,7 @@ struct SmartEvent
|
||||
uint32 max;
|
||||
uint32 repeatMin;
|
||||
uint32 repeatMax;
|
||||
uint32 controller;
|
||||
} minMaxRepeat;
|
||||
|
||||
struct
|
||||
|
||||
Reference in New Issue
Block a user