當前位置: 首頁>>代碼示例>>C#>>正文


C# ServerMessage.Init方法代碼示例

本文整理匯總了C#中Phoenix.Messages.ServerMessage.Init方法的典型用法代碼示例。如果您正苦於以下問題:C# ServerMessage.Init方法的具體用法?C# ServerMessage.Init怎麽用?C# ServerMessage.Init使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Phoenix.Messages.ServerMessage的用法示例。


在下文中一共展示了ServerMessage.Init方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: UpdateState

		internal void UpdateState(bool inDb, bool inRoom)
		{
			if (inDb)
			{
				this.GetRoom().UpdateItem(this);
			}
			if (inRoom)
			{
				ServerMessage Message = new ServerMessage();
				if (this.IsFloorItem)
				{
					Message.Init(88);
					Message.AppendStringWithBreak(this.Id.ToString());
					Message.AppendStringWithBreak(this.ExtraData);
				}
				else
				{
					Message.Init(85);
					this.Serialize(Message);
				}
				this.GetRoom().SendMessage(Message, null);
			}
		}
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:23,代碼來源:RoomItem.cs

示例2: GenerateUsersOnlineList

 internal List<ServerMessage> GenerateUsersOnlineList()
 {
     List<ServerMessage> list = new List<ServerMessage>();
     int num = 0;
     ServerMessage Message = new ServerMessage();
     Message.Init(161);
     Message.AppendStringWithBreak("Users online:\r");
     for (int i = 0; i < this.Session.Length; i++)
     {
         GameClient Session = this.Session[i];
         if (Session != null && Session.GetHabbo() != null)
         {
             if (num > 20)
             {
                 list.Add(Message);
                 num = 0;
                 Message = new ServerMessage();
                 Message.Init(161);
             }
             num++;
             Message.AppendStringWithBreak(string.Concat(new object[] {	Session.GetHabbo().Username, " {", Session.GetHabbo().Rank, "}\r" }));
         }
     }
     list.Add(Message);
     return list;
 }
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:26,代碼來源:GameClientManager.cs

示例3: method_40

 private void method_40(RoomItem RoomItem_0, int int_17, int int_18, uint uint_2, double double_3)
 {
     ServerMessage Message = new ServerMessage();
     Message.Init(230u);
     Message.AppendInt32(RoomItem_0.GetX);
     Message.AppendInt32(RoomItem_0.GetY);
     Message.AppendInt32(int_17);
     Message.AppendInt32(int_18);
     Message.AppendInt32(1);
     Message.AppendUInt(RoomItem_0.Id);
     Message.AppendStringWithBreak(RoomItem_0.GetZ.ToString().Replace(',', '.'));
     Message.AppendStringWithBreak(double_3.ToString().Replace(',', '.'));
     Message.AppendUInt(uint_2);
     this.SendMessage(Message, null);
     this.method_81(RoomItem_0, int_17, int_18, double_3);
 }
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:16,代碼來源:Room.cs

示例4: method_42

 private void method_42(RoomUser RoomUser_1, Coord gstruct1_1, uint uint_2, double double_3)
 {
     ServerMessage Message = new ServerMessage();
     Message.Init(230u);
     Message.AppendInt32(RoomUser_1.X);
     Message.AppendInt32(RoomUser_1.Y);
     Message.AppendInt32(gstruct1_1.X);
     Message.AppendInt32(gstruct1_1.Y);
     Message.AppendInt32(0);
     Message.AppendUInt(uint_2);
     Message.AppendString("J");
     Message.AppendInt32(RoomUser_1.VirtualId);
     Message.AppendStringWithBreak(RoomUser_1.Z.ToString().Replace(',', '.'));
     Message.AppendStringWithBreak(double_3.ToString().Replace(',', '.'));
     this.SendMessage(Message, null);
     this.byte_0[RoomUser_1.X, RoomUser_1.Y] = 1;
     RoomUser_1.X = gstruct1_1.X;
     RoomUser_1.Y = gstruct1_1.Y;
     RoomUser_1.Z = double_3;
     RoomUser_1.SetX = gstruct1_1.X;
     RoomUser_1.SetY = gstruct1_1.Y;
     RoomUser_1.SetZ = double_3;
     RoomUser_1.int_9 = 2;
     this.byte_0[RoomUser_1.X, RoomUser_1.Y] = 0;
     this.UpdateUserStatus(RoomUser_1, false, true);
 }
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:26,代碼來源:Room.cs

示例5: SendNotif

 public void SendNotif(string Message, int Type)
 {
     ServerMessage nMessage = new ServerMessage();
     switch (Type)
     {
         case 0:
             nMessage.Init(161);
             break;
         case 1:
             nMessage.Init(139);
             break;
         case 2:
             nMessage.Init(810);
             nMessage.AppendUInt(1);
             break;
         default:
             nMessage.Init(161);
             break;
     }
     nMessage.AppendStringWithBreak(Message);
     this.GetConnection().SendMessage(nMessage);
 }
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:22,代碼來源:GameClient.cs


注:本文中的Phoenix.Messages.ServerMessage.Init方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。