当前位置: 首页>>代码示例>>C#>>正文


C# ServerMessage.AppendInt32方法代码示例

本文整理汇总了C#中Cyber.Messages.ServerMessage.AppendInt32方法的典型用法代码示例。如果您正苦于以下问题:C# ServerMessage.AppendInt32方法的具体用法?C# ServerMessage.AppendInt32怎么用?C# ServerMessage.AppendInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cyber.Messages.ServerMessage的用法示例。


在下文中一共展示了ServerMessage.AppendInt32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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;
 }
开发者ID:kessiler,项目名称:habboServer,代码行数:28,代码来源:Guild.cs

示例2: 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);
			}
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:33,代码来源:QuestListComposer.cs

示例3: 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);
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:26,代码来源:Trade.cs

示例4: Serialize

		internal ServerMessage Serialize(ServerMessage Composer)
		{
			Composer.AppendInt32(this.Index);
			Composer.AppendString(this.Header);
			Composer.AppendString(this.Body);
			Composer.AppendString(this.Button);
			Composer.AppendInt32(this.inGamePromo);
			Composer.AppendString(this.SpecialAction);
			Composer.AppendString(this.Image);
			return Composer;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:11,代码来源:SmallPromo.cs

示例5: 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;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:13,代码来源:JukeboxComposer.cs

示例6: SerializeTool

		internal ServerMessage SerializeTool()
		{
			ServerMessage serverMessage = new ServerMessage(Outgoing.LoadModerationToolMessageComposer);
			serverMessage.AppendInt32(this.Tickets.Count);
			foreach (SupportTicket current in this.Tickets)
			{
				current.Serialize(serverMessage);
			}
			serverMessage.AppendInt32(this.UserMessagePresets.Count);
			foreach (string current2 in this.UserMessagePresets)
			{
				serverMessage.AppendString(current2);
			}
			IEnumerable<ModerationTemplate> enumerable = 
				from x in this.ModerationTemplates.Values
				where x.Category == -1
				select x;
			serverMessage.AppendInt32(enumerable.Count<ModerationTemplate>());
			using (IEnumerator<ModerationTemplate> enumerator3 = enumerable.GetEnumerator())
			{
				while (enumerator3.MoveNext())
				{
					ModerationTemplate Template = enumerator3.Current;
					IEnumerable<ModerationTemplate> enumerable2 = 
						from x in this.ModerationTemplates.Values
						where (long)x.Category == (long)((ulong)Template.Id)
						select x;
					serverMessage.AppendString(Template.Caption);
					serverMessage.AppendBoolean(true);
					serverMessage.AppendInt32(enumerable2.Count<ModerationTemplate>());
					foreach (ModerationTemplate current3 in enumerable2)
					{
						serverMessage.AppendString(current3.Caption);
						serverMessage.AppendString(current3.BanMessage);
						serverMessage.AppendInt32((int)current3.BanHours);
						serverMessage.AppendInt32(CyberEnvironment.BoolToInteger(current3.AvatarBan));
						serverMessage.AppendInt32(CyberEnvironment.BoolToInteger(current3.Mute));
						serverMessage.AppendInt32(CyberEnvironment.BoolToInteger(current3.TradeLock));
						serverMessage.AppendString(current3.WarningMessage);
					}
				}
			}
			serverMessage.AppendBoolean(true);
			serverMessage.AppendBoolean(true);
			serverMessage.AppendBoolean(true);
			serverMessage.AppendBoolean(true);
			serverMessage.AppendBoolean(true);
			serverMessage.AppendBoolean(true);
			serverMessage.AppendBoolean(true);
			serverMessage.AppendInt32(this.RoomMessagePresets.Count);
			foreach (string current4 in this.RoomMessagePresets)
			{
				serverMessage.AppendString(current4);
			}
			return serverMessage;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:56,代码来源:ModerationTool.cs

示例7: SerializeFlatCategories

		internal ServerMessage SerializeFlatCategories(GameClient Session)
		{
			ServerMessage serverMessage = new ServerMessage(Outgoing.FlatCategoriesMessageComposer);
			serverMessage.AppendInt32(this.PrivateCategories.Count);
			foreach (FlatCat flatCat in this.PrivateCategories.Values)
			{
				serverMessage.AppendInt32(flatCat.Id);
				serverMessage.AppendString(flatCat.Caption);
				serverMessage.AppendBoolean(flatCat.MinRank <= Session.GetHabbo().Rank);
                serverMessage.AppendBoolean(false); // New Build Fix by Finn
                serverMessage.AppendString("NONE"); // New Build Fix by Finn
                serverMessage.AppendString(""); // New Build Fix by Finn
			}
			return serverMessage;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:15,代码来源:Navigator.cs

示例8: CompleteUserTalent

		internal void CompleteUserTalent(GameClient Session, Talent Talent)
		{
			if (Session == null || Session.GetHabbo() == null || Session.GetHabbo().CurrentTalentLevel < Talent.Level)
			{
				return;
			}
			if (!this.LevelIsCompleted(Session, Talent.Level))
			{
				return;
			}
			if (Talent.Prize != "" && Talent.PrizeBaseItem > 0u)
			{
				Item item = CyberEnvironment.GetGame().GetItemManager().GetItem(Talent.PrizeBaseItem);
				CyberEnvironment.GetGame().GetCatalog().DeliverItems(Session, item, 1, "", 0, 0, "");
			}
			UserTalent value = new UserTalent(Talent.Id, 1);
			Session.GetHabbo().Talents.Add(Talent.Id, value);
			using (IQueryAdapter queryreactor = CyberEnvironment.GetDatabaseManager().getQueryReactor())
			{
				queryreactor.runFastQuery(string.Concat(new object[]
				{
					"REPLACE INTO user_talents VALUES (",
					Session.GetHabbo().Id,
					", ",
					Talent.Id,
					", ",
					1,
					");"
				}));
				queryreactor.runFastQuery(string.Concat(new object[]
				{
					"UPDATE users SET talent_status = '",
					Talent.Type,
					"' WHERE id = ",
					Session.GetHabbo().Id,
					";"
				}));
			}
			ServerMessage serverMessage = new ServerMessage(Outgoing.TalentLevelUpMessageComposer);
			serverMessage.AppendString(Session.GetHabbo().TalentStatus);
			serverMessage.AppendInt32(Talent.Level);
			serverMessage.AppendInt32(0);
			serverMessage.AppendInt32(1);
			serverMessage.AppendString(Talent.Prize);
			serverMessage.AppendInt32(0);
			Session.SendMessage(serverMessage);
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:47,代码来源:TalentManager.cs

示例9: 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);
				}
			}
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:17,代码来源:PollQuestion.cs

示例10: SerializeNewFlatCategories

        internal ServerMessage SerializeNewFlatCategories()
        {
            var flatcat = CyberEnvironment.GetGame().GetNavigator().PrivateCategories.OfType<FlatCat>();
            var rooms = CyberEnvironment.GetGame().GetRoomManager().loadedRooms;

            ServerMessage Message = new ServerMessage(Outgoing.NavigatorNewFlatCategoriesMessageComposer);
            Message.AppendInt32(flatcat.Count());

            foreach (FlatCat cat in flatcat)
            {
                Message.AppendInt32(cat.Id);
                Message.AppendInt32(cat.UsersNow);
                Message.AppendInt32(500);
            }
            
            return Message;
        }
开发者ID:kessiler,项目名称:habboServer,代码行数:17,代码来源:Navigator.cs

示例11: SmallPromoComposer

		internal ServerMessage SmallPromoComposer(ServerMessage Message)
		{
			Message.AppendInt32(this.HotelViewPromosIndexers.Count);
			foreach (SmallPromo current in this.HotelViewPromosIndexers)
			{
				current.Serialize(Message);
			}
			return Message;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:9,代码来源:HotelView.cs

示例12: Compose

		internal static ServerMessage Compose(GameClient Session, List<Quest> Quests, bool Send)
		{
			Dictionary<string, int> dictionary = new Dictionary<string, int>();
			Dictionary<string, Quest> dictionary2 = new Dictionary<string, Quest>();
			foreach (Quest current in Quests)
			{
				if (!current.Category.Contains("xmas2012"))
				{
					if (!dictionary.ContainsKey(current.Category))
					{
						dictionary.Add(current.Category, 1);
						dictionary2.Add(current.Category, null);
					}
					if (current.Number >= dictionary[current.Category])
					{
						int questProgress = Session.GetHabbo().GetQuestProgress(current.Id);
						if (Session.GetHabbo().CurrentQuestId != current.Id && (long)questProgress >= (long)((ulong)current.GoalData))
						{
							dictionary[current.Category] = checked(current.Number + 1);
						}
					}
				}
			}
			foreach (Quest current2 in Quests)
			{
				foreach (KeyValuePair<string, int> current3 in dictionary)
				{
					if (!current2.Category.Contains("xmas2012") && current2.Category == current3.Key && current2.Number == current3.Value)
					{
						dictionary2[current3.Key] = current2;
						break;
					}
				}
			}
			ServerMessage serverMessage = new ServerMessage(Outgoing.QuestListMessageComposer);
			serverMessage.AppendInt32(dictionary2.Count);
			foreach (KeyValuePair<string, Quest> current4 in dictionary2)
			{
				if (current4.Value != null)
				{
					QuestListComposer.SerializeQuest(serverMessage, Session, current4.Value, current4.Key);
				}
			}
			foreach (KeyValuePair<string, Quest> current5 in dictionary2)
			{
				if (current5.Value == null)
				{
					QuestListComposer.SerializeQuest(serverMessage, Session, current5.Value, current5.Key);
				}
			}
			serverMessage.AppendBoolean(Send);
			return serverMessage;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:53,代码来源:QuestListComposer.cs

示例13: 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;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:25,代码来源:QuestCompletedComposer.cs

示例14: 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);
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:13,代码来源:SearchResult.cs

示例15: GenerateExtraData

		internal ServerMessage GenerateExtraData(ServerMessage Message)
		{
			Message.AppendInt32(0);
			Message.AppendInt32(5);
			Message.AppendInt32(4);
			Message.AppendInt32(this.Enabled);
			Message.AppendInt32(this.Data1);
			Message.AppendInt32(this.Data2);
			Message.AppendInt32(this.Data3);
			return Message;
		}
开发者ID:kessiler,项目名称:habboServer,代码行数:11,代码来源:TonerData.cs


注:本文中的Cyber.Messages.ServerMessage.AppendInt32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。