Core/Random: Changed random functions returning doubles to return floats
Port From (https://github.com/TrinityCore/TrinityCore/commit/9894f6b802c974bb36acd7fbb0d083455a1f0f1b)
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Game.Spells
|
||||
continue;
|
||||
|
||||
_effects.EnsureWritableListIndex((uint)spellEffect.EffectIndex, new SpellEffectInfo(this));
|
||||
_effects[(int)spellEffect.EffectIndex] = new SpellEffectInfo(this, spellEffect);
|
||||
_effects[spellEffect.EffectIndex] = new SpellEffectInfo(this, spellEffect);
|
||||
}
|
||||
|
||||
// Correct EffectIndex for blank effects
|
||||
@@ -1007,7 +1007,7 @@ namespace Game.Spells
|
||||
|
||||
if (HasAttribute(SpellAttr8.OnlyTargetIfSameCreator))
|
||||
{
|
||||
ObjectGuid getCreatorOrSelf(WorldObject obj)
|
||||
var getCreatorOrSelf = (WorldObject obj) =>
|
||||
{
|
||||
ObjectGuid creator = obj.GetCreatorGUID();
|
||||
if (creator.IsEmpty())
|
||||
@@ -5005,7 +5005,7 @@ namespace Game.Spells
|
||||
case SpellTargetDirectionTypes.FrontLeft:
|
||||
return pi / 4;
|
||||
case SpellTargetDirectionTypes.Random:
|
||||
return (float)RandomHelper.NextDouble() * (2 * pi);
|
||||
return RandomHelper.NextSingle() * (2 * pi);
|
||||
default:
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user