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
@@ -2110,7 +2110,7 @@ namespace Game.Spells
}).ToList();
if (!usableDisplays.Empty())
displayId = usableDisplays.PickRandom().DisplayID;
displayId = usableDisplays.SelectRandom().DisplayID;
}
// TODO: CREATE TABLE mount_vehicle (mountId, vehicleCreatureId) for future mounts that are vehicles (new mounts no longer have proper data in MiscValue)
//if (MountVehicle const* mountVehicle = sObjectMgr->GetMountVehicle(mountEntry->Id))
+2 -2
View File
@@ -294,7 +294,7 @@ namespace Game.Spells
int maxTargets = Math.Min(3, attackers.Count);
for (uint i = 0; i < maxTargets; ++i)
{
Unit attacker = attackers.PickRandom();
Unit attacker = attackers.SelectRandom();
AddUnitTarget(attacker, 1 << 1);
attackers.Remove(attacker);
}
@@ -1408,7 +1408,7 @@ namespace Game.Spells
if (!avalibleElixirs.Empty())
{
// cast random elixir on target
m_caster.CastSpell(unitTarget, (uint)avalibleElixirs.PickRandom(), true, m_CastItem);
m_caster.CastSpell(unitTarget, (uint)avalibleElixirs.SelectRandom(), true, m_CastItem);
}
}
}