From d696a85797fbdd1e793ab7e71353c70c2e2bb39e Mon Sep 17 00:00:00 2001 From: Gultask <100873791+Gultask@users.noreply.github.com> Date: Wed, 24 May 2023 14:01:11 -0300 Subject: [PATCH] fix(Core/SAI): Allow LINK events to use event_chance (#16308) --- src/server/game/AI/SmartScripts/SmartScript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index e089c7c24..929bb626a 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -114,7 +114,7 @@ void SmartScript::ProcessEventsFor(SMART_EVENT e, Unit* unit, uint32 var0, uint3 void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob) { //calc random - if (e.GetEventType() != SMART_EVENT_LINK && e.event.event_chance < 100 && e.event.event_chance) + if (e.event.event_chance < 100 && e.event.event_chance) { uint32 rnd = urand(1, 100); if (e.event.event_chance <= rnd)