当前位置: 首页>>代码示例>>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;未经允许,请勿转载。