mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
chore(Core/AI): Convert the hardcoded variadic RAND functions into one C++11 variadic template version. (#2239)
This commit is contained in:
@@ -85,9 +85,9 @@ class spell_winter_wondervolt_trap : public SpellScriptLoader
|
||||
|
||||
uint32 spellId = 0;
|
||||
if (target->getGender() == GENDER_MALE)
|
||||
spellId = RAND<uint32>(SPELL_WINTER_WONDERVOLT_RED_MAN, SPELL_WINTER_WONDERVOLT_GREEN_MAN);
|
||||
spellId = RAND(SPELL_WINTER_WONDERVOLT_RED_MAN, SPELL_WINTER_WONDERVOLT_GREEN_MAN);
|
||||
else
|
||||
spellId = RAND<uint32>(SPELL_WINTER_WONDERVOLT_RED_WOMEN, SPELL_WINTER_WONDERVOLT_GREEN_WOMEN);
|
||||
spellId = RAND(SPELL_WINTER_WONDERVOLT_RED_WOMEN, SPELL_WINTER_WONDERVOLT_GREEN_WOMEN);
|
||||
|
||||
// cast
|
||||
target->CastSpell(target, spellId, true);
|
||||
|
||||
@@ -798,7 +798,7 @@ class boss_prince_valanar_icc : public CreatureScript
|
||||
DoAction(ACTION_CAST_INVOCATION);
|
||||
currentInvocationIndex = 0;
|
||||
invocationOrder[0] = DATA_PRINCE_VALANAR_GUID;
|
||||
invocationOrder[1] = RAND<uint32>(DATA_PRINCE_KELESETH_GUID, DATA_PRINCE_TALDARAM_GUID);
|
||||
invocationOrder[1] = RAND(DATA_PRINCE_KELESETH_GUID, DATA_PRINCE_TALDARAM_GUID);
|
||||
invocationOrder[2] = DATA_PRINCE_KELESETH_GUID + DATA_PRINCE_TALDARAM_GUID - invocationOrder[1];
|
||||
|
||||
events.ScheduleEvent(EVENT_BERSERK, 600000);
|
||||
|
||||
Reference in New Issue
Block a user