mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[10374] Fixes for EFLAG_RANDOM_ACTION
* Field limited to uint8 so use proper flag mask (0x20 now) * Search of selected action code also fixed.
This commit is contained in:
parent
a15b0916b6
commit
80cef02190
4 changed files with 18 additions and 14 deletions
|
|
@ -372,9 +372,15 @@ bool CreatureEventAI::ProcessEvent(CreatureEventAIHolder& pHolder, Unit* pAction
|
|||
|
||||
// find selected action, skipping not used
|
||||
uint32 j = 0;
|
||||
for (; idx; ++j)
|
||||
for (; ; ++j)
|
||||
{
|
||||
if (pHolder.Event.action[j].type != ACTION_T_NONE)
|
||||
{
|
||||
if (!idx)
|
||||
break;
|
||||
--idx;
|
||||
}
|
||||
}
|
||||
|
||||
ProcessAction(pHolder.Event.action[j], rnd, pHolder.Event.event_id, pActionInvoker);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue