mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Core/SAI): Allow LINK events to use event_chance (#16308)
This commit is contained in:
@@ -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)
|
void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, uint32 var1, bool bvar, SpellInfo const* spell, GameObject* gob)
|
||||||
{
|
{
|
||||||
//calc random
|
//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);
|
uint32 rnd = urand(1, 100);
|
||||||
if (e.event.event_chance <= rnd)
|
if (e.event.event_chance <= rnd)
|
||||||
|
|||||||
Reference in New Issue
Block a user