mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/SmartAI: There's a function for that
This commit is contained in:
@@ -98,8 +98,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
//calc random
|
||||
if (e.GetEventType() != SMART_EVENT_LINK && e.event.event_chance < 100 && e.event.event_chance)
|
||||
{
|
||||
uint32 rnd = urand(1, 100);
|
||||
if (e.event.event_chance <= rnd)
|
||||
if (!roll_chance_i(e.event.event_chance))
|
||||
return;
|
||||
}
|
||||
e.runOnce = true;//used for repeat check
|
||||
|
||||
Reference in New Issue
Block a user