本文整理汇总了C#中Cyber.Messages.ServerMessage.AppendUInt方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendUInt方法的具体用法?C# ServerMessage.AppendUInt怎么用?C# ServerMessage.AppendUInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cyber.Messages.ServerMessage
的用法示例。
在下文中一共展示了ServerMessage.AppendUInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Trade
internal Trade(uint UserOneId, uint UserTwoId, uint RoomId)
{
this.oneId = UserOneId;
this.twoId = UserTwoId;
this.Users = new TradeUser[2];
this.Users[0] = new TradeUser(UserOneId, RoomId);
this.Users[1] = new TradeUser(UserTwoId, RoomId);
this.TradeStage = 1;
this.RoomId = RoomId;
TradeUser[] users = this.Users;
for (int i = 0; i < users.Length; i++)
{
TradeUser tradeUser = users[i];
if (!tradeUser.GetRoomUser().Statusses.ContainsKey("trd"))
{
tradeUser.GetRoomUser().AddStatus("trd", "");
tradeUser.GetRoomUser().UpdateNeeded = true;
}
}
ServerMessage serverMessage = new ServerMessage(Outgoing.TradeStartMessageComposer);
serverMessage.AppendUInt(UserOneId);
serverMessage.AppendInt32(1);
serverMessage.AppendUInt(UserTwoId);
serverMessage.AppendInt32(1);
this.SendMessageToUsers(serverMessage);
}
示例2: ForumDataMessage
internal ServerMessage ForumDataMessage(uint RequesterId)
{
ServerMessage Message = new ServerMessage(Outgoing.GroupForumDataMessageComposer);
Message.AppendUInt(this.Id);
Message.AppendString(this.Name);//nombre del foro
Message.AppendString(this.Description);
Message.AppendString(this.Badge);
Message.AppendInt32(0);// nosé
Message.AppendInt32(0);
Message.AppendUInt(this.ForumMessagesCount);//Mensajes
Message.AppendInt32(0);//Mensajes no leídos
Message.AppendInt32(0);//mensajes?
Message.AppendUInt(this.ForumLastPosterId);//Id de quien publicó el último mensaje
Message.AppendString(this.ForumLastPosterName);//Quién publicó eL último mensaje.
Message.AppendInt32(this.ForumLastPostTime);//hace cuantos segundos se publicó
Message.AppendInt32(0);
Message.AppendInt32(1);
Message.AppendInt32(1);
Message.AppendInt32(2);
Message.AppendString(""); // (si no está vacío: Acceso denegado para ver el foro)
Message.AppendString((this.Members.ContainsKey(RequesterId) ? "" : "not_member"));
Message.AppendString((this.Members.ContainsKey(RequesterId) ? "" : "not_member"));
Message.AppendString((this.Admins.ContainsKey(RequesterId) ? "" : "not_admin"));
Message.AppendString(""); //
Message.AppendBoolean(false);
Message.AppendBoolean(false);
return Message;
}
示例3: Compose
internal static ServerMessage Compose(GameClient Session, Quest Quest)
{
int amountOfQuestsInCategory = CyberEnvironment.GetGame().GetQuestManager().GetAmountOfQuestsInCategory(Quest.Category);
int i = (Quest == null) ? amountOfQuestsInCategory : Quest.Number;
int i2 = (Quest == null) ? 0 : Session.GetHabbo().GetQuestProgress(Quest.Id);
ServerMessage serverMessage = new ServerMessage(Outgoing.QuestCompletedMessageComposer);
serverMessage.AppendString(Quest.Category);
serverMessage.AppendInt32(i);
serverMessage.AppendInt32(Quest.Name.Contains("xmas2012") ? 1 : amountOfQuestsInCategory);
serverMessage.AppendInt32((Quest == null) ? 3 : Quest.RewardType);
serverMessage.AppendUInt((Quest == null) ? 0u : Quest.Id);
serverMessage.AppendBoolean(Quest != null && Session.GetHabbo().CurrentQuestId == Quest.Id);
serverMessage.AppendString((Quest == null) ? string.Empty : Quest.ActionName);
serverMessage.AppendString((Quest == null) ? string.Empty : Quest.DataBit);
serverMessage.AppendInt32((Quest == null) ? 0 : Quest.Reward);
serverMessage.AppendString((Quest == null) ? string.Empty : Quest.Name);
serverMessage.AppendInt32(i2);
serverMessage.AppendUInt((Quest == null) ? 0u : Quest.GoalData);
serverMessage.AppendInt32((Quest == null) ? 0 : Quest.TimeUnlock);
serverMessage.AppendString("");
serverMessage.AppendString("");
serverMessage.AppendBoolean(true);
serverMessage.AppendBoolean(true);
return serverMessage;
}
示例4: Compose
internal static ServerMessage Compose(int PlaylistCapacity, List<SongInstance> Playlist)
{
ServerMessage serverMessage = new ServerMessage(Outgoing.JukeboxPlaylistMessageComposer);
serverMessage.AppendInt32(PlaylistCapacity);
serverMessage.AppendInt32(Playlist.Count);
foreach (SongInstance current in Playlist)
{
serverMessage.AppendUInt(current.DiskItem.itemID);
serverMessage.AppendUInt(current.SongData.Id);
}
return serverMessage;
}
示例5: SerializeQuest
internal static void SerializeQuest(ServerMessage Message, GameClient Session, Quest Quest, string Category)
{
if (Message == null || Session == null)
{
return;
}
int amountOfQuestsInCategory = CyberEnvironment.GetGame().GetQuestManager().GetAmountOfQuestsInCategory(Category);
checked
{
int num = (Quest == null) ? amountOfQuestsInCategory : (Quest.Number - 1);
int num2 = (Quest == null) ? 0 : Session.GetHabbo().GetQuestProgress(Quest.Id);
if (Quest != null && Quest.IsCompleted(num2))
{
num++;
}
Message.AppendString(Category);
Message.AppendInt32((Quest == null) ? 0 : (Quest.Category.Contains("xmas2012") ? 0 : num));
Message.AppendInt32((Quest == null) ? 0 : (Quest.Category.Contains("xmas2012") ? 0 : amountOfQuestsInCategory));
Message.AppendInt32((Quest == null) ? 3 : Quest.RewardType);
Message.AppendUInt((Quest == null) ? 0u : Quest.Id);
Message.AppendBoolean(Quest != null && Session.GetHabbo().CurrentQuestId == Quest.Id);
Message.AppendString((Quest == null) ? string.Empty : Quest.ActionName);
Message.AppendString((Quest == null) ? string.Empty : Quest.DataBit);
Message.AppendInt32((Quest == null) ? 0 : Quest.Reward);
Message.AppendString((Quest == null) ? string.Empty : Quest.Name);
Message.AppendInt32(num2);
Message.AppendUInt((Quest == null) ? 0u : Quest.GoalData);
Message.AppendInt32((Quest == null) ? 0 : Quest.TimeUnlock);
Message.AppendString("");
Message.AppendString("");
Message.AppendBoolean(true);
}
}
示例6: Serialize
internal void Serialize(ServerMessage Request)
{
Request.AppendUInt(this.FromUser);
Request.AppendString(this.mUsername);
Habbo habboForName = CyberEnvironment.getHabboForName(this.mUsername);
Request.AppendString((habboForName != null) ? habboForName.Look : "");
}
示例7: ComposePlayingComposer
public static ServerMessage ComposePlayingComposer(uint SongId, int PlaylistItemNumber, int SyncTimestampMs)
{
ServerMessage serverMessage = new ServerMessage(Outgoing.JukeboxNowPlayingMessageComposer);
if (SongId == 0)
{
serverMessage.AppendInt32(-1);
serverMessage.AppendInt32(-1);
serverMessage.AppendInt32(-1);
serverMessage.AppendInt32(-1);
serverMessage.AppendInt32(0);
}
else
{
serverMessage.AppendUInt(SongId);
serverMessage.AppendInt32(PlaylistItemNumber);
serverMessage.AppendUInt(SongId);
serverMessage.AppendInt32(0);
serverMessage.AppendInt32(SyncTimestampMs);
}
return serverMessage;
}
示例8: Searialize
internal void Searialize(ServerMessage reply)
{
reply.AppendUInt(this.userID);
reply.AppendString(this.username);
reply.AppendString(this.motto);
bool b = CyberEnvironment.GetGame().GetClientManager().GetClient(this.userID) != null;
reply.AppendBoolean(b);
reply.AppendBoolean(false);
reply.AppendString(string.Empty);
reply.AppendInt32(0);
reply.AppendString(this.look);
reply.AppendString(this.last_online);
}
示例9: SerializeWall
internal void SerializeWall(ServerMessage Message, bool Inventory)
{
Message.AppendUInt(this.Id);
Message.AppendString(this.mBaseItem.Type.ToString().ToUpper());
Message.AppendUInt(this.Id);
Message.AppendInt32(this.GetBaseItem().SpriteId);
if (this.GetBaseItem().Name.Contains("a2"))
{
Message.AppendInt32(3);
}
else
{
if (this.GetBaseItem().Name.Contains("wallpaper"))
{
Message.AppendInt32(2);
}
else
{
if (this.GetBaseItem().Name.Contains("landscape"))
{
Message.AppendInt32(4);
}
else
{
Message.AppendInt32(1);
}
}
}
Message.AppendInt32(0);
Message.AppendString(this.ExtraData);
Message.AppendBoolean(this.GetBaseItem().AllowRecycle);
Message.AppendBoolean(this.GetBaseItem().AllowTrade);
Message.AppendBoolean(this.GetBaseItem().AllowInventoryStack);
Message.AppendBoolean(false);
Message.AppendInt32(-1);
Message.AppendBoolean(true);
Message.AppendInt32(-1);
}
示例10: Compose
internal static ServerMessage Compose(Achievement Achievement, int Level, int PointReward, int PixelReward)
{
ServerMessage serverMessage = new ServerMessage(Outgoing.UnlockAchievementMessageComposer);
serverMessage.AppendUInt(Achievement.Id);
serverMessage.AppendInt32(Level);
serverMessage.AppendInt32(144);
serverMessage.AppendString(Achievement.GroupName + Level);
serverMessage.AppendInt32(PointReward);
serverMessage.AppendInt32(PixelReward);
serverMessage.AppendInt32(0);
serverMessage.AppendInt32(10);
serverMessage.AppendInt32(21);
serverMessage.AppendString(Level > 1 ? Achievement.GroupName + checked(Level - 1) : string.Empty);
serverMessage.AppendString(Achievement.Category);
serverMessage.AppendBoolean(true);
return serverMessage;
}
示例11: Serialize
public void Serialize(ServerMessage Message, int QuestionNumber)
{
Message.AppendUInt(this.Index);
Message.AppendInt32(QuestionNumber);
Message.AppendInt32((int)this.AType);
Message.AppendString(this.Question);
if (this.AType == PollQuestion.PollAnswerType.Selection || this.AType == PollQuestion.PollAnswerType.RadioSelection)
{
Message.AppendInt32(1);
Message.AppendInt32(this.Answers.Count);
foreach (string current in this.Answers)
{
Message.AppendString(current);
Message.AppendString(current);
}
}
}
示例12: Compose
internal static ServerMessage Compose(Achievement Achievement, int TargetLevel, AchievementLevel TargetLevelData, int TotalLevels, UserAchievement UserData)
{
ServerMessage serverMessage = new ServerMessage(Outgoing.AchievementProgressMessageComposer);
serverMessage.AppendUInt(Achievement.Id);
serverMessage.AppendInt32(TargetLevel);
serverMessage.AppendString(Achievement.GroupName + TargetLevel);
serverMessage.AppendInt32(TargetLevelData.Requirement);
serverMessage.AppendInt32(TargetLevelData.Requirement);
serverMessage.AppendInt32(TargetLevelData.RewardPixels);
serverMessage.AppendInt32(0);
serverMessage.AppendInt32(UserData != null ? UserData.Progress : 0);
serverMessage.AppendBoolean(UserData != null && UserData.Level >= TotalLevels);
serverMessage.AppendString(Achievement.Category);
serverMessage.AppendString(string.Empty);
serverMessage.AppendInt32(TotalLevels);
serverMessage.AppendInt32(0);
return serverMessage;
}
示例13: Compose
internal static ServerMessage Compose(GameClient Session, List<Achievement> Achievements)
{
ServerMessage serverMessage = new ServerMessage(Outgoing.AchievementListMessageComposer);
serverMessage.AppendInt32(Achievements.Count);
foreach (Achievement achievement in Achievements)
{
UserAchievement achievementData = Session.GetHabbo().GetAchievementData(achievement.GroupName);
int i = achievementData != null ? checked(achievementData.Level + 1) : 1;
int count = achievement.Levels.Count;
if (i > count)
{
i = count;
}
AchievementLevel achievementLevel = achievement.Levels[i];
AchievementLevel oldLevel = (achievement.Levels.ContainsKey(i - 1)) ? achievement.Levels[i - 1] : achievementLevel;
serverMessage.AppendUInt(achievement.Id);
serverMessage.AppendInt32(i);
serverMessage.AppendString(achievement.GroupName + i);
serverMessage.AppendInt32(oldLevel.Requirement); // Requisito Anterior
serverMessage.AppendInt32(achievementLevel.Requirement); // Requisito Nuevo
serverMessage.AppendInt32(achievementLevel.RewardPoints);
serverMessage.AppendInt32(0);
serverMessage.AppendInt32(achievementData != null ? achievementData.Progress : 0); // Progreso Total
if (achievementData == null)
{
serverMessage.AppendBoolean(false);
}
else if (achievementData.Level >= count)
{
serverMessage.AppendBoolean(true);
}
else
{
serverMessage.AppendBoolean(false); // Terminado
}
serverMessage.AppendString(achievement.Category);
serverMessage.AppendString(string.Empty);
serverMessage.AppendInt32(count); // Número de niveles
serverMessage.AppendInt32(0);
}
serverMessage.AppendString("");
return serverMessage;
}
示例14: RemoveAllFurniture
internal List<RoomItem> RemoveAllFurniture(GameClient Session)
{
List<RoomItem> list = new List<RoomItem>();
RoomItem[] array = this.mFloorItems.Values.ToArray<RoomItem>();
for (int i = 0; i < array.Length; i++)
{
RoomItem roomItem = array[i];
roomItem.Interactor.OnRemove(Session, roomItem);
ServerMessage serverMessage = new ServerMessage(Outgoing.PickUpFloorItemMessageComposer);
serverMessage.AppendString(roomItem.Id + string.Empty);
serverMessage.AppendBoolean(false);
serverMessage.AppendInt32(0);
serverMessage.AppendUInt(roomItem.UserID);
this.room.SendMessage(serverMessage);
list.Add(roomItem);
}
RoomItem[] array2 = this.mWallItems.Values.ToArray<RoomItem>();
for (int j = 0; j < array2.Length; j++)
{
RoomItem roomItem2 = array2[j];
roomItem2.Interactor.OnRemove(Session, roomItem2);
ServerMessage serverMessage2 = new ServerMessage(Outgoing.PickUpWallItemMessageComposer);
serverMessage2.AppendString(roomItem2.Id + string.Empty);
serverMessage2.AppendUInt(roomItem2.UserID);
this.room.SendMessage(serverMessage2);
list.Add(roomItem2);
}
this.mWallItems.Clear();
this.mFloorItems.Clear();
this.mRemovedItems.Clear();
this.mMovedItems.Clear();
this.mAddedItems.Clear();
this.mRollers.QueueDelegate(new onCycleDoneDelegate(this.ClearRollers));
using (IQueryAdapter queryreactor = CyberEnvironment.GetDatabaseManager().getQueryReactor())
{
queryreactor.runFastQuery("UPDATE items SET room_id='0' WHERE room_id = " + this.room.RoomId);
}
this.room.GetGameMap().GenerateMaps(true);
this.room.GetGameMap().lazyWalkablePoints();
this.room.GetRoomUserManager().UpdateUserStatusses();
return list;
}
示例15: Parse
//.........这里部分代码省略.........
if (str13.ToLower() == Session.GetHabbo().Username.ToLower())
{
Session.SendNotif("You can't summon yourself!");
return true;
}
GameClient client11 = CyberEnvironment.GetGame().GetClientManager().GetClientByUsername(str13);
if (client11 == null)
{
this.Session.SendNotif("Could not find user \"" + str13 + "\"");
return true;
}
if (Session.GetHabbo().CurrentRoom != null && Session.GetHabbo().CurrentRoomId != client11.GetHabbo().CurrentRoomId)
{
client11.GetMessageHandler().PrepareRoomForUser(Session.GetHabbo().CurrentRoom.RoomId, Session.GetHabbo().CurrentRoom.Password);
}
return true;
}
this.Session.SendNotif("No use specified");
}
return true;
case "summonall":
if (this.Session.GetHabbo().GotCommand("summonall"))
{
string str14 = Input.Substring(9);
foreach (GameClient client12 in CyberEnvironment.GetGame().GetClientManager().clients.Values)
{
client12.SendNotif("* Todos hab\x00e9is sido atra\x00eddos por " + this.Session.GetHabbo().Username + ":\r\n" + str14);
CyberEnvironment.GetGame().GetRoomManager().GenerateRoomData(this.Session.GetHabbo().CurrentRoomId).SerializeRoomData(new ServerMessage(), client12.GetHabbo().CurrentRoom == null, client12, false);
ServerMessage roomFwd = new ServerMessage(Outgoing.RoomForwardMessageComposer);
roomFwd.AppendUInt(this.Session.GetHabbo().CurrentRoomId);
client12.SendMessage(roomFwd);
}
}
return true;
case "follow":
case "seguir":
case "stalk":
if (this.Session.GetHabbo().GotCommand("follow"))
{
GameClient client13 = CyberEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
if ((client13 != null) && (client13.GetHabbo() != null))
{
if (((client13 != null) && (client13.GetHabbo().CurrentRoom != null)) && (client13.GetHabbo().CurrentRoom != this.Session.GetHabbo().CurrentRoom))
{
ServerMessage roomFwd = new ServerMessage(Outgoing.RoomForwardMessageComposer);
roomFwd.AppendUInt(client13.GetHabbo().CurrentRoom.RoomId);
Session.SendMessage(roomFwd);
}
return true;
}
this.Session.SendNotif("This user could not be found");
}
return true;
case "roomkick":
if (this.Session.GetHabbo().GotCommand("roomkick"))
{
Room room23 = this.Session.GetHabbo().CurrentRoom;
room23 = CyberEnvironment.GetGame().GetRoomManager().GetRoom(this.Session.GetHabbo().CurrentRoomId);
if (room23 != null)
{