diff --git a/Framework/Constants/Authentication/RealmConst.cs b/Framework/Constants/Authentication/RealmConst.cs
index a030a864d..155f75c12 100644
--- a/Framework/Constants/Authentication/RealmConst.cs
+++ b/Framework/Constants/Authentication/RealmConst.cs
@@ -14,9 +14,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+using System;
namespace Framework.Constants
{
+ [Flags]
public enum RealmFlags
{
None = 0x00,
diff --git a/Framework/Util/CollectionExtensions.cs b/Framework/Util/CollectionExtensions.cs
index a72b0b684..ab7c7c54c 100644
--- a/Framework/Util/CollectionExtensions.cs
+++ b/Framework/Util/CollectionExtensions.cs
@@ -126,7 +126,6 @@ namespace System.Collections.Generic
list = listCopy;
}
-
public static T SelectRandom(this IEnumerable source)
{
return source.SelectRandom(1).Single();
diff --git a/Game/Combat/ThreatManager.cs b/Game/Combat/ThreatManager.cs
index 087c4b80b..38d66b3ff 100644
--- a/Game/Combat/ThreatManager.cs
+++ b/Game/Combat/ThreatManager.cs
@@ -359,7 +359,7 @@ namespace Game.Combat
public void update()
{
if (iDirty && threatList.Count > 1)
- threatList.OrderByDescending(p => p.getThreat());
+ threatList = threatList.OrderByDescending(p => p.getThreat()).ToList();
iDirty = false;
}
diff --git a/Game/DataStorage/DB2Manager.cs b/Game/DataStorage/DB2Manager.cs
index 68116f0c0..2e89f416e 100644
--- a/Game/DataStorage/DB2Manager.cs
+++ b/Game/DataStorage/DB2Manager.cs
@@ -149,8 +149,8 @@ namespace Game.DataStorage
_curvePoints[curvePoint.CurveID].Add(curvePoint);
}
- foreach (var key in _curvePoints.Keys)
- _curvePoints[key].OrderBy(point => point.Index);
+ foreach (var key in _curvePoints.Keys.ToList())
+ _curvePoints[key] = _curvePoints[key].OrderBy(point => point.Index).ToList();
foreach (EmotesTextSoundRecord emoteTextSound in CliDB.EmotesTextSoundStorage.Values)
_emoteTextSounds[Tuple.Create((uint)emoteTextSound.EmotesTextId, emoteTextSound.RaceId, emoteTextSound.SexId, emoteTextSound.ClassId)] = emoteTextSound;
diff --git a/Game/Entities/Player/CinematicManager.cs b/Game/Entities/Player/CinematicManager.cs
index 18d18fd36..e42810f7b 100644
--- a/Game/Entities/Player/CinematicManager.cs
+++ b/Game/Entities/Player/CinematicManager.cs
@@ -124,19 +124,19 @@ namespace Game.Entities
angle += 2 * MathFunctions.PI;
// Look for position around 2 second ahead of us.
- uint workDiff = m_cinematicDiff;
+ int workDiff = (int)m_cinematicDiff;
// Modify result based on camera direction (Humans for example, have the camera point behind)
- workDiff += (uint)((2 * Time.InMilliseconds) * Math.Cos(angle));
+ workDiff += (int)((2 * Time.InMilliseconds) * Math.Cos(angle));
// Get an iterator to the last entry in the cameras, to make sure we don't go beyond the end
var endItr = m_cinematicCamera.LastOrDefault();
if (endItr != null && workDiff > endItr.timeStamp)
- workDiff = endItr.timeStamp;
+ workDiff = (int)endItr.timeStamp;
// Never try to go back in time before the start of cinematic!
if (workDiff < 0)
- workDiff = m_cinematicDiff;
+ workDiff = (int)m_cinematicDiff;
// Obtain the previous and next waypoint based on timestamp
foreach (FlyByCamera cam in m_cinematicCamera)
@@ -153,11 +153,11 @@ namespace Game.Entities
// Never try to go beyond the end of the cinematic
if (workDiff > nextTimestamp)
- workDiff = nextTimestamp;
+ workDiff = (int)nextTimestamp;
// Interpolate the position for this moment in time (or the adjusted moment in time)
uint timeDiff = nextTimestamp - lastTimestamp;
- uint interDiff = workDiff - lastTimestamp;
+ uint interDiff = (uint)(workDiff - lastTimestamp);
float xDiff = nextPosition.posX - lastPosition.posX;
float yDiff = nextPosition.posY - lastPosition.posY;
float zDiff = nextPosition.posZ - lastPosition.posZ;
diff --git a/Game/Spells/SpellInfo.cs b/Game/Spells/SpellInfo.cs
index 57a3e5058..2b8333088 100644
--- a/Game/Spells/SpellInfo.cs
+++ b/Game/Spells/SpellInfo.cs
@@ -89,8 +89,9 @@ namespace Game.Spells
if (visuals != null)
_visuals = visuals;
+
// sort all visuals so that the ones without a condition requirement are last on the list
- foreach (var key in _visuals.Keys)
+ foreach (var key in _visuals.Keys.ToList())
_visuals[key] = _visuals[key].OrderByDescending(x => x.PlayerConditionID).ToList();
// SpellScalingEntry