public FriendNotificationComposer(int UserId, MessengerEventTypes type, string data) : base(ServerPacketHeader.FriendNotificationMessageComposer) { base.WriteString(UserId.ToString()); base.WriteInteger(MessengerEventTypesUtility.GetEventTypePacketNum(type)); base.WriteString(data); }
public static int GetEventTypePacketNum(MessengerEventTypes type) { switch (type) { case MessengerEventTypes.EVENT_STARTED: return(0); case MessengerEventTypes.ACHIEVEMENT_UNLOCKED: return(1); case MessengerEventTypes.QUEST_COMPLETED: return(2); case MessengerEventTypes.PLAYING_GAME: return(3); case MessengerEventTypes.FINISHED_GAME: return(4); case MessengerEventTypes.GAME_INVITE: return(5); default: return(-1); } }
public static int GetEventTypePacketNum(MessengerEventTypes type) { switch (type) { case MessengerEventTypes.EventStarted: return(0); case MessengerEventTypes.AchievementUnlocked: return(1); case MessengerEventTypes.QuestCompleted: return(2); case MessengerEventTypes.PlayingGame: return(3); case MessengerEventTypes.FinishedGame: return(4); case MessengerEventTypes.GameInvite: return(5); default: return(-1); } }
public static int GetEventTypePacketNum(MessengerEventTypes type) { switch (type) { case MessengerEventTypes.EVENT_STARTED: return 0; case MessengerEventTypes.ACHIEVEMENT_UNLOCKED: return 1; case MessengerEventTypes.QUEST_COMPLETED: return 2; case MessengerEventTypes.PLAYING_GAME: return 3; case MessengerEventTypes.FINISHED_GAME: return 4; case MessengerEventTypes.GAME_INVITE: return 5; default: return -1; } }
public FriendNotificationComposer(int UserId, MessengerEventTypes type, string data) : base(ServerPacketHeader.FriendNotificationMessageComposer) { this.UserId = UserId; this.Type = type; this.Data = data; }
public void BroadcastAchievement(int UserId, MessengerEventTypes Type, string Data) { IEnumerable <GameClient> MyFriends = PlusEnvironment.GetGame().GetClientManager().GetClientsById(this._friends.Keys); foreach (GameClient Client in MyFriends.ToList()) { if (Client.GetHabbo() != null && Client.GetHabbo().GetMessenger() != null) { Client.SendMessage(new FriendNotificationComposer(UserId, Type, Data)); Client.GetHabbo().GetMessenger().OnStatusChanged(true); } } }
public void BroadcastAchievement(int userId, MessengerEventTypes type, string data) { var myFriends = PlusEnvironment.GetGame().GetClientManager().GetClientsById(_friends.Keys); foreach (var client in myFriends.ToList()) { if (client.GetHabbo() != null && client.GetHabbo().GetMessenger() != null) { client.SendPacket(new FriendNotificationComposer(userId, type, data)); client.GetHabbo().GetMessenger().OnStatusChanged(true); } } }
public void BroadcastAchievement(int UserId, MessengerEventTypes Type, string Data) { IEnumerable<GameClient> MyFriends = PlusEnvironment.GetGame().GetClientManager().GetClientsById(this._friends.Keys); foreach (GameClient Client in MyFriends.ToList()) { if (Client.GetHabbo() != null && Client.GetHabbo().GetMessenger() != null) { Client.SendMessage(new FriendNotificationComposer(UserId, Type, Data)); Client.GetHabbo().GetMessenger().OnStatusChanged(true); } } }
public void BroadcastAchievement(int UserId, MessengerEventTypes Type, string Data) { var MyFriends = Program.GameContext.PlayerController.GetClientsById(_friends.Keys); foreach (var Client in MyFriends.ToList()) { if (Client.GetHabbo() != null && Client.GetHabbo().GetMessenger() != null) { Client.SendPacket(new FriendNotificationComposer(UserId, Type, Data)); Client.GetHabbo().GetMessenger().OnStatusChanged(true); } } }