public override void Compose(Yupi.Protocol.ISender session, ChatMessage msg, int count = -1) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.Append(msg, count); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender room, int groupId) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(groupId); room.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, CatalogOffer item) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.Append(item); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int status) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(status); // TODO Use enum session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, RoomData data) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.Append(data.Chat); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, ErrorCode error) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger((int)error); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, short code = 0) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendShort(code); // TODO Also possible without code & what does code mean. session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(0); // TODO What does 0 mean? session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int points) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(points); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int credits) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendString(credits.ToString()); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, bool isPlaying) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendBool(isPlaying); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, string machineId) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendString(machineId); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, Yupi.Model.Domain.AvatarEffect effect) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(effect.EffectId); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, string badgeName, bool hasBadge) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendString(badgeName); message.AppendBool(hasBadge); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendBool(true); //isOpen message.AppendBool(false); session.Send(message); } }
// TODO Create enum for Dances // TODO Replace entityId with RoomEntity EVERYWHERE! public override void Compose(Yupi.Protocol.ISender room, int entityId, Dance dance) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(entityId); message.AppendInteger(dance.Value); room.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int credits, int seasonalCurrency) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(credits); message.AppendInteger(seasonalCurrency); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int petId, int randomValue) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(petId); message.AppendInteger(randomValue); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int roomId) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(roomId); message.AppendInteger(0); // TODO Hardcoded session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int rating, bool canVote) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(rating); message.AppendBool(canVote); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int itemId, int z) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(itemId); message.AppendInteger(Convert.ToUInt32(z * 100)); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, RoomData room) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendString(room.Model.DisplayName); message.AppendInteger(room.Id); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender room, int entityId, bool isAsleep) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(entityId); message.AppendBool(isAsleep); room.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, int status, string name) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(status); message.AppendString(name); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, TradeUser first, TradeUser second) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { Serialize(first, message); Serialize(second, message); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, UserInfo user) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(user.UsersRooms.Count >= 75 ? 1 : 0); // TODO Enum message.AppendInteger(75); // TODO Magic number session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, string text) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendString(text); message.AppendString(string.Empty); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, UserInfo habbo) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendString(habbo.Look); message.AppendString(habbo.Gender.ToUpper()); // TODO Make sure gender is stored UPPER session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, uint roomId, uint userId) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendInteger(roomId); message.AppendInteger(userId); session.Send(message); } }
public override void Compose(Yupi.Protocol.ISender session, WallItem item, int pickerId) { using (ServerMessage message = Pool.GetMessageBuffer(Id)) { message.AppendString(item.Id.ToString()); message.AppendInteger(pickerId); session.Send(message); } }