Core/Random: Changed random functions returning doubles to return floats
Port From (https://github.com/TrinityCore/TrinityCore/commit/9894f6b802c974bb36acd7fbb0d083455a1f0f1b)
This commit is contained in:
@@ -276,7 +276,7 @@ namespace Scripts.Events
|
||||
|
||||
void HandleDummy(uint effIndex)
|
||||
{
|
||||
Position dest = GetCaster().GetFirstCollisionPosition(30.0f, (float)RandomHelper.NextDouble() * (float)(2 * MathF.PI));
|
||||
Position dest = GetCaster().GetFirstCollisionPosition(30.0f, RandomHelper.NextSingle() * (float)(2 * MathF.PI));
|
||||
GetCaster().CastSpell(dest, FlingTorch.SpellFlingTorchTriggered, true);
|
||||
GetCaster().CastSpell(dest, FlingTorch.SpellFlingTorchShadow);
|
||||
}
|
||||
@@ -355,7 +355,7 @@ namespace Scripts.Events
|
||||
}
|
||||
else
|
||||
{
|
||||
Position dest = player.GetFirstCollisionPosition(15.0f, (float)RandomHelper.NextDouble() * (float)(2 * MathF.PI));
|
||||
Position dest = player.GetFirstCollisionPosition(15.0f, RandomHelper.NextSingle() * (2 * MathF.PI));
|
||||
player.CastSpell(player, FlingTorch.SpellTorchesCaught);
|
||||
player.CastSpell(dest, FlingTorch.SpellFlingTorchTriggered, true);
|
||||
player.CastSpell(dest, FlingTorch.SpellFlingTorchShadow);
|
||||
|
||||
@@ -261,7 +261,7 @@ namespace Scripts.Events.ZalazaneFall
|
||||
me.SetDisplayId(trollmodel[RandomHelper.URand(0, 39)]);
|
||||
Player player = me.GetOwner().ToPlayer();
|
||||
if (player != null)
|
||||
me.GetMotionMaster().MoveFollow(player, 5.0f, (float)(RandomHelper.NextDouble() + 1.0f) * (float)(MathF.PI) / 3.0f * 4.0f);
|
||||
me.GetMotionMaster().MoveFollow(player, 5.0f, (RandomHelper.NextSingle() + 1.0f) * (MathF.PI) / 3.0f * 4.0f);
|
||||
}
|
||||
|
||||
public override void Reset()
|
||||
|
||||
Reference in New Issue
Block a user