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


C# ServerMessage.AppendRawUInt方法代碼示例

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


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

示例1: RemoveFurniture

 public void RemoveFurniture(GameClient Session, uint Id, bool Delete, bool ReGenerateMap)
 {
     RoomItem Item = this.GetItem(Id);
     if (Item != null)
     {
         Dictionary<int, AffectedTile> dictionary = this.GetAffectedTiles(Item.GetBaseItem().Length, Item.GetBaseItem().Width, Item.GetX, Item.GetY, Item.Rot);
         Item.Interactor.OnRemove(Session, Item);
         if (Item.IsWallItem)
         {
             ServerMessage Message = new ServerMessage(84);
             Message.AppendRawUInt(Item.Id);
             Message.AppendStringWithBreak("");
             Message.AppendBoolean(false);
             this.SendMessage(Message, null);
         }
         else
         {
             if (Item.IsFloorItem)
             {
                 ServerMessage Message = new ServerMessage(94);
                 Message.AppendRawUInt(Item.Id);
                 Message.AppendStringWithBreak("");
                 Message.AppendBoolean(false);
                 this.SendMessage(Message, null);
                 string text = Item.GetBaseItem().InteractionType.ToLower();
                 switch (text)
                 {
                     case "bb_patch":
                         this.bbTiles.Remove(Item);
                         if (Item.ExtraData == "5")
                         {
                             this.bbrTiles.Remove(Item);
                         }
                         else if (Item.ExtraData == "8")
                         {
                             this.bbgTiles.Remove(Item);
                         }
                         else if (Item.ExtraData == "11")
                         {
                             this.bbbTiles.Remove(Item);
                         }
                         else if (Item.ExtraData == "14")
                         {
                             this.bbyTiles.Remove(Item);
                         }
                         break;
                     case "blue_score":
                         this.BlueScoreboards.Remove(Item);
                         break;
                     case "green_score":
                         this.GreenScoreboards.Remove(Item);
                         break;
                     case "red_score":
                         this.RedScoreboards.Remove(Item);
                         break;
                     case "yellow_score":
                         this.YellowScoreboards.Remove(Item);
                         break;
                     case "stickiepole":
                         this.StickiePoles.Remove(Item);
                         break;
                     case "wf_trg_onsay":
                     case "wf_trg_enterroom":
                     case "wf_trg_furnistate":
                     case "wf_trg_onfurni":
                     case "wf_trg_offfurni":
                     case "wf_trg_gameend":
                     case "wf_trg_gamestart":
                     case "wf_trg_attime":
                     case "wf_trg_atscore":
                         this.WF_Triggers.Remove(Item);
                         break;
                     case "wf_trg_timer":
                         Item.TimerRunning = false;
                         this.WF_Triggers.Remove(Item);
                         break;
                     case "wf_act_saymsg":
                     case "wf_act_moveuser":
                     case "wf_act_togglefurni":
                     case "wf_act_givepoints":
                     case "wf_act_moverotate":
                     case "wf_act_matchfurni":
                     case "wf_act_give_phx":
                         this.WF_Effects.Remove(Item);
                         break;
                     case "wf_cnd_trggrer_on_frn":
                     case "wf_cnd_furnis_hv_avtrs":
                     case "wf_cnd_has_furni_on":
                     case "wf_cnd_phx":
                         this.WF_Conditions.Remove(Item);
                         break;
                 }
             }
         }
         if (Item.IsWallItem)
         {
             this.mWallItems.Remove(Item.Id);
         }
         else
         {
//.........這裏部分代碼省略.........
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:101,代碼來源:Room.cs

示例2: RemoveAllFurniture

        internal List<RoomItem> RemoveAllFurniture(GameClient Session)
        {
            List<RoomItem> list = new List<RoomItem>();
            foreach (RoomItem @class in this.Hashtable_0.Values)
            {
                @class.Interactor.OnRemove(Session, @class);
                ServerMessage Message = new ServerMessage(94u);
                Message.AppendRawUInt(@class.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                this.SendMessage(Message, null);
                list.Add(@class);
            }
            foreach (RoomItem @class in this.Hashtable_1.Values)
            {
                @class.Interactor.OnRemove(Session, @class);
                ServerMessage Message = new ServerMessage(84u);
                Message.AppendRawUInt(@class.Id);
                Message.AppendStringWithBreak("");
                Message.AppendBoolean(false);
                this.SendMessage(Message, null);
                list.Add(@class);
            }
            this.mWallItems.Clear();
            this.mFloorItems.Clear();
            this.mRemovedItems.Clear();
            this.mMovedItems.Clear();
            this.mAddedItems.Clear();
            using (DatabaseClient class2 = PhoenixEnvironment.GetDatabase().GetClient())
            {
                class2.ExecuteQuery(string.Concat(new object[]
				{
					"UPDATE items SET room_id = 0, user_id = '",
					Session.GetHabbo().Id,
					"' WHERE room_id = '",
					this.RoomId,
					"'"
				}));
            }
            this.GenerateMaps();
            this.method_83();
            return list;
        }
開發者ID:neto737,項目名稱:Phoenix_3.0,代碼行數:43,代碼來源:Room.cs


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