chore(Core/AI): Convert the hardcoded variadic RAND functions into one C++11 variadic template version. (#2239)

This commit is contained in:
Viste
2019-09-01 09:44:28 +03:00
committed by Stoabrogga
parent 8853302da9
commit 4effe04a5c
3 changed files with 9 additions and 287 deletions

View File

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