Core/SmartAI: There's a function for that

This commit is contained in:
ariel-
2016-10-10 19:05:28 -03:00
parent f749dea8b2
commit e2a8cf6809

View File

@@ -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