Renamed PickRandom to SelectRandom

This commit is contained in:
hondacrx
2017-06-21 11:57:04 -04:00
parent d16d6d57f0
commit 430507a10a
28 changed files with 54 additions and 53 deletions
+1 -1
View File
@@ -1040,7 +1040,7 @@ namespace Scripts.Spells.Druid
return;
}
Unit target = tempTargets.PickRandom();
Unit target = tempTargets.SelectRandom();
targets.Clear();
targets.Add(target);
}
+4 -4
View File
@@ -734,7 +734,7 @@ namespace Scripts.Spells.Items
PreventDefaultAction();
Unit caster = eventInfo.GetActor();
uint spellId = triggeredSpells[(int)caster.GetClass()].PickRandom();
uint spellId = triggeredSpells[(int)caster.GetClass()].SelectRandom();
caster.CastSpell(caster, spellId, true);
if (RandomHelper.randChance(10))
@@ -960,7 +960,7 @@ namespace Scripts.Spells.Items
if (randomSpells.Empty())
return;
uint spellId = randomSpells.PickRandom();
uint spellId = randomSpells.SelectRandom();
caster.CastSpell(caster, spellId, true);
}
@@ -1293,7 +1293,7 @@ namespace Scripts.Spells.Items
return;
}
caster.CastSpell(caster, possibleSpells.PickRandom(), true);
caster.CastSpell(caster, possibleSpells.SelectRandom(), true);
}
public override void Register()
@@ -2357,7 +2357,7 @@ namespace Scripts.Spells.Items
void HandleTeleport(uint effIndex)
{
PreventHitDefaultEffect(effIndex);
uint spellId = SpellIds.WormholeTargetLocations.PickRandom();
uint spellId = SpellIds.WormholeTargetLocations.SelectRandom();
GetCaster().CastSpell(GetHitUnit(), spellId, true);
}
+1 -1
View File
@@ -94,7 +94,7 @@ namespace Scripts.Spells.Rogue
{
while (!_targets.Empty())
{
ObjectGuid guid = _targets.PickRandom();
ObjectGuid guid = _targets.SelectRandom();
Unit target = Global.ObjAccessor.GetUnit(GetTarget(), guid);
if (target)
{