- Fixed rebase/merge errors

This commit is contained in:
lukeIam committed 2013-12-13 18:26:47 +01:00
1 parent fc0fad5248
commit fc35885425
4 files changed
+13 -115

No files matched your search

-41
View File
@@ -83,47 +83,6 @@ namespace Vocaluxe.Base.Server
}
#endregion Login
#region Keyboard
#endregion Keyboard
#region Profiles
public static byte[] CreateCommandSendAvatarPicture(int width, int height, byte[] data)
{
var ap = new SAvatarPicture {Height = height, Width = width, Data = new byte[data.Length]};
Array.Copy(data, ap.Data, data.Length);
return _Serialize(CommandSendAvatarPicture, ap);
}
public static bool DecodeCommandSendAvatarPicture(byte[] message, out SAvatarPicture avatarPicture)
{
return _TryDeserialize(message, out avatarPicture);
}
public static byte[] CreateCommandSendAvatarPictureJpg(byte[] avatarJpgData)
{
var ap = new SAvatarPicture {Height = 0, Width = 0, Data = new byte[avatarJpgData.Length]};
Array.Copy(avatarJpgData, ap.Data, avatarJpgData.Length);
return _Serialize(CommandSendAvatarPictureJpg, ap);
}
public static byte[] CreateCommandSendProfile(byte[] avatarJpgData, string playerName, int difficulty)
{
var ap = new SAvatarPicture {Height = 0, Width = 0, Data = new byte[avatarJpgData.Length]};
Array.Copy(avatarJpgData, ap.Data, avatarJpgData.Length);
var profile = new SProfile {Avatar = ap, PlayerName = playerName, Difficulty = difficulty};
return _Serialize(CommandSendProfile, profile);
}
public static bool DecodeCommandSendProfile(byte[] message, out SProfile profile)
{
return _TryDeserialize(message, out profile);
}
#endregion Profiles
#region Serializing
private static byte[] _Serialize<T>(T obj)
{
+2 -2
View File
@@ -442,8 +442,8 @@ namespace Vocaluxe.Base.Server
{
result.Title = song.Title;
result.Artist = song.Artist;
result.Genre = song.Genre.FirstOrDefault();
result.Language = song.Language.FirstOrDefault();
result.Genre = song.Genres.FirstOrDefault();
result.Language = song.Languages.FirstOrDefault();
result.Year = song.Year;
result.IsDuet = song.IsDuet;
result.SongId = song.ID;